Remove nsfw/useless commands, refactor stuff

This commit is contained in:
Dragon Fire
2018-08-15 19:34:34 -04:00
parent cc3680009a
commit b3c6b591d3
38 changed files with 192 additions and 531 deletions
+2 -4
View File
@@ -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
View File
@@ -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;
};