mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 14:20:51 +02:00
Don't need tsubaki if I can just make it myself
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
const path = require('path');
|
||||
const { promisifyAll } = require('tsubaki');
|
||||
const { promisifyAll } = require('../../util/Util');
|
||||
const fs = promisifyAll(require('fs'));
|
||||
|
||||
module.exports = class DECTalkCommand extends Command {
|
||||
|
||||
+1
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "49.3.1",
|
||||
"version": "49.3.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "XiaoBot.js",
|
||||
"scripts": {
|
||||
@@ -39,7 +39,6 @@
|
||||
"erlpack": "github:discordapp/erlpack",
|
||||
"node-opus": "^0.2.7",
|
||||
"snekfetch": "^3.5.5",
|
||||
"tsubaki": "^1.2.0",
|
||||
"uws": "^8.14.1",
|
||||
"xml-js": "^1.5.1"
|
||||
},
|
||||
|
||||
@@ -48,6 +48,14 @@ class Util {
|
||||
return `${prefix.slice(text.length)}${text}`;
|
||||
}
|
||||
|
||||
static promisifyAll(obj, suffix = 'Async') {
|
||||
for (const key of Object.keys(obj)) {
|
||||
if (typeof obj[key] !== 'function') continue;
|
||||
obj[`${key}${suffix}`] = promisify(obj[key]);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
static greyscale(ctx, x, y, width, height) {
|
||||
const data = ctx.getImageData(x, y, width, height);
|
||||
for (let i = 0; i < data.data.length; i += 4) {
|
||||
|
||||
Reference in New Issue
Block a user