mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
msg
This commit is contained in:
@@ -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}]});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user