This commit is contained in:
Daniel Odendahl Jr
2017-04-30 22:56:59 +00:00
parent 83e990ae1c
commit 877f720cfc
105 changed files with 460 additions and 461 deletions
+6 -6
View File
@@ -19,10 +19,10 @@ module.exports = class YearsCommand extends Command {
});
}
async run(message, args) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
async run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args;
const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
let images = [];
@@ -32,8 +32,8 @@ module.exports = class YearsCommand extends Command {
avatar.resize(200, 200);
az.composite(avatar, 461, 127);
az.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say('An Unknown Error Occurred.');
return message.channel.send({files: [{attachment: buff}]});
if (err) return msg.say('An Unknown Error Occurred.');
return msg.channel.send({files: [{attachment: buff}]});
});
}
};
+6 -6
View File
@@ -19,10 +19,10 @@ module.exports = class BeautifulCommand extends Command {
});
}
async run(message, args) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
async run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args;
const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
let images = [];
@@ -34,8 +34,8 @@ module.exports = class BeautifulCommand extends Command {
avatar.resize(190, 190);
grunkle.composite(avatar, 451, 434);
grunkle.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say('An Unknown Error Occurred.');
return message.channel.send({files: [{attachment: buff}]});
if (err) return msg.say('An Unknown Error Occurred.');
return msg.channel.send({files: [{attachment: buff}]});
});
}
};
+6 -6
View File
@@ -19,10 +19,10 @@ module.exports = class BobRossCommand extends Command {
});
}
async run(message, args) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
async run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args;
const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
const blank = new Jimp(600, 775, 0xFFFFFFFF);
@@ -35,8 +35,8 @@ module.exports = class BobRossCommand extends Command {
blank.composite(avatar, 44, 85);
blank.composite(bob, 0, 0);
blank.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say('An Unknown Error Occurred.');
return message.channel.send({files: [{attachment: buff}]});
if (err) return msg.say('An Unknown Error Occurred.');
return msg.channel.send({files: [{attachment: buff}]});
});
}
};
+6 -6
View File
@@ -20,10 +20,10 @@ module.exports = class RIPCommand extends Command {
});
}
async run(message, args) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
async run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args;
const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
let images = [];
@@ -33,8 +33,8 @@ module.exports = class RIPCommand extends Command {
avatar.resize(200, 200);
grave.composite(avatar, 158, 51);
grave.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say('An Unknown Error Occurred.');
return message.channel.send({files: [{attachment: buff}]});
if (err) return msg.say('An Unknown Error Occurred.');
return msg.channel.send({files: [{attachment: buff}]});
});
}
};
+7 -7
View File
@@ -19,12 +19,12 @@ module.exports = class SteamCardCommand extends Command {
});
}
async run(message, args) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
async run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args;
const username = message.guild ? message.guild.member(user).displayName : user.username;
const username = msg.guild ? msg.guild.member(user).displayName : user.username;
const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
const blank = new Jimp(494, 568, 0xFFFFFFFF);
let images = [];
@@ -37,8 +37,8 @@ module.exports = class SteamCardCommand extends Command {
blank.composite(card, 0, 0);
blank.print(font, 38, 20, username);
blank.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say('An Unknown Error Occurred.');
return message.channel.send({files: [{attachment: buff}]});
if (err) return msg.say('An Unknown Error Occurred.');
return msg.channel.send({files: [{attachment: buff}]});
});
}
};
+6 -6
View File
@@ -16,10 +16,10 @@ module.exports = class TriggeredCommand extends Command {
});
}
async run(message, args) {
if (message.channel.type !== 'dm')
if (!message.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return message.say('This Command requires the `Attach Files` Permission.');
async run(msg, args) {
if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args;
const avatarURL = user.displayAvatarURL.replace(/(png|jpg|jpeg|gif|webp)/, 'png');
const blank = new Jimp(320, 371, 0xFFFFFFFF);
@@ -31,8 +31,8 @@ module.exports = class TriggeredCommand extends Command {
blank.composite(avatar, 0, 0);
blank.composite(triggered, 0, 0);
blank.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) return message.say('An Unknown Error Occurred.');
return message.channel.send({files: [{attachment: buff}]});
if (err) return msg.say('An Unknown Error Occurred.');
return msg.channel.send({files: [{attachment: buff}]});
});
}
};