This commit is contained in:
Daniel Odendahl Jr
2017-10-13 17:49:26 +00:00
parent a673fb43fa
commit b57e817988
34 changed files with 35 additions and 133 deletions
+1 -4
View File
@@ -41,10 +41,7 @@ module.exports = class YearsCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.drawImage(avatar, 461, 127, 200, 200);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: '3000-years.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -41,10 +41,7 @@ module.exports = class ApprovedCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(avatar, 0, 0);
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'approved.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'approved.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -51,10 +51,7 @@ module.exports = class AvatarFusionCommand extends Command {
ctx.globalAlpha = 0.5;
ctx.drawImage(baseAvatar, 0, 0);
ctx.drawImage(overlayAvatar, 0, 0, baseAvatar.width, baseAvatar.height);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'avatar-fusion.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'avatar-fusion.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -42,10 +42,7 @@ module.exports = class BeautifulCommand extends Command {
ctx.drawImage(base, 0, 0);
ctx.drawImage(avatar, 341, 35, 117, 135);
ctx.drawImage(avatar, 343, 301, 117, 135);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'beautiful.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'beautiful.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -45,10 +45,7 @@ module.exports = class BobRossCommand extends Command {
ctx.drawImage(avatar, 69, 102, 256, 256);
ctx.rotate(-3 * (Math.PI / 180));
ctx.drawImage(base, 0, 0);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'bob-ross.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'bob-ross.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -63,10 +63,7 @@ module.exports = class CardCommand extends Command {
ctx.font = '14px Noto';
ctx.fillText(user.id, 30, 355);
ctx.fillText(`#${user.discriminator}`, 313, 355);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'card.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -41,10 +41,7 @@ module.exports = class ChallengerCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.drawImage(avatar, 484, 98, 256, 256);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'challenger.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'challenger.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -40,10 +40,7 @@ module.exports = class ChristmasHatCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(avatar, 0, 0);
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'christmas-hat.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'christmas-hat.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -42,10 +42,7 @@ module.exports = class DexterCommand extends Command {
ctx.rotate(-11 * (Math.PI / 180));
ctx.drawImage(avatar, 234, 274, 225, 225);
ctx.rotate(11 * (Math.PI / 180));
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'dexter.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'dexter.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -42,10 +42,7 @@ module.exports = class FoodBrokeCommand extends Command {
ctx.drawImage(base, 0, 0);
ctx.drawImage(avatar, 23, 9, 125, 125);
ctx.drawImage(avatar, 117, 382, 75, 75);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'food-broke.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'food-broke.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -47,10 +47,7 @@ module.exports = class GreyscaleCommand extends Command {
data[i + 2] = brightness;
}
ctx.putImageData(imgData, 0, 0);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'greyscale.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'greyscale.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -43,10 +43,7 @@ module.exports = class HeLivesInYouCommand extends Command {
ctx.rotate(-24 * (Math.PI / 180));
ctx.drawImage(avatar, 75, 160, 130, 150);
ctx.rotate(24 * (Math.PI / 180));
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'he-lives-in-you.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'he-lives-in-you.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -43,10 +43,7 @@ module.exports = class IHaveThePowerCommand extends Command {
ctx.rotate(18.3 * (Math.PI / 180));
ctx.drawImage(avatar, 332, -125, 175, 175);
ctx.rotate(-18.3 * (Math.PI / 180));
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'i-have-the-power.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'i-have-the-power.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -45,10 +45,7 @@ module.exports = class InvertCommand extends Command {
data[i + 2] = 255 - data[i + 2];
}
ctx.putImageData(imgData, 0, 0);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'invert.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'invert.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
@@ -43,10 +43,7 @@ module.exports = class LookAtThisPhotographCommand extends Command {
ctx.rotate(-13.5 * (Math.PI / 180));
ctx.drawImage(avatar, 280, 218, 175, 125);
ctx.rotate(13.5 * (Math.PI / 180));
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'look-at-this-photograph.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'look-at-this-photograph.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -42,10 +42,7 @@ module.exports = class PhotographCommand extends Command {
ctx.rotate(-8.21 * (Math.PI / 180));
ctx.drawImage(avatar, 85, 116, 150, 150);
ctx.rotate(8.21 * (Math.PI / 180));
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'photograph.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'photograph.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -38,10 +38,7 @@ module.exports = class PixelizeCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.imageSmoothingEnabled = false;
ctx.drawImage(avatar, 0, 0, 512, 512);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'pixelize.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'pixelize.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -41,10 +41,7 @@ module.exports = class RainbowCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(avatar, 0, 0);
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'rainbow.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rainbow.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -41,10 +41,7 @@ module.exports = class RejctedCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(avatar, 0, 0);
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'rejected.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rejected.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -50,10 +50,7 @@ module.exports = class RIPCommand extends Command {
data[i + 2] = brightness;
}
ctx.putImageData(imgData, 158, 51);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'rip.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rip.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -49,10 +49,7 @@ module.exports = class SteamCardCommand extends Command {
ctx.drawImage(base, 0, 0);
ctx.font = '30px Noto';
ctx.fillText(member.displayName, 35, 48);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'steam-card.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-card.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -57,10 +57,7 @@ module.exports = class SteamNowPlayingCommand extends Command {
if (ctx.measureText(game).width > 160) shorten = true;
while (ctx.measureText(game).width > 160) game = game.substr(0, game.length - 1);
ctx.fillText(shorten ? `${game}...` : game, 63, 54);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'steam-now-playing.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-now-playing.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -49,10 +49,7 @@ module.exports = class ThugLifeCommand extends Command {
data[i + 2] = brightness;
}
ctx.putImageData(imgData, 0, 0);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'thug-life.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'thug-life.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -46,10 +46,7 @@ module.exports = class TriggeredCommand extends Command {
for (let i = 0; i < data.length; i += 4) data[i] = Math.max(255, data[i]);
ctx.putImageData(imgData, 0, 0);
ctx.drawImage(base, 0, 0);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'triggered.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -41,10 +41,7 @@ module.exports = class WantedCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.drawImage(avatar, 150, 360, 430, 430);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'wanted.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'wanted.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
+1 -4
View File
@@ -41,10 +41,7 @@ module.exports = class YuGiOhTokenCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.drawImage(avatar, 45, 102, 293, 294);
return msg.say({ files: [{
attachment: canvas.toBuffer(),
name: 'yu-gi-oh-token.png'
}] });
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'yu-gi-oh-token.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}