mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Remove nsfw/useless commands, refactor stuff
This commit is contained in:
+2
-4
@@ -1,4 +1,4 @@
|
||||
class CanvasUtil {
|
||||
module.exports = class CanvasUtil {
|
||||
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) {
|
||||
@@ -93,6 +93,4 @@ class CanvasUtil {
|
||||
while (ctx.measureText(text).width > maxWidth) text = text.substr(0, text.length - 1);
|
||||
return shorten ? `${text}...` : text;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CanvasUtil;
|
||||
};
|
||||
|
||||
+2
-4
@@ -5,7 +5,7 @@ const yes = ['yes', 'y', 'ye', 'yeah', 'yup', 'yea'];
|
||||
const no = ['no', 'n', 'nah', 'nope'];
|
||||
const { SUCCESS_EMOJI_ID } = process.env;
|
||||
|
||||
class Util {
|
||||
module.exports = class Util {
|
||||
static delay(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
@@ -125,6 +125,4 @@ class Util {
|
||||
if (no.includes(choice)) return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Util;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user