mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -33,8 +33,8 @@ module.exports = class EmojiImageCommand extends Command {
|
||||
const { body } = await request.get(parsed[0].url);
|
||||
const emojiImage = await loadImage(body);
|
||||
if (parsed[0].url.endsWith('svg')) {
|
||||
emojiImage.width *= 4;
|
||||
emojiImage.height *= 4;
|
||||
emojiImage.width = 512;
|
||||
emojiImage.height = 512;
|
||||
}
|
||||
const canvas = createCanvas(512, 512);
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
+2
-2
@@ -81,7 +81,7 @@ module.exports = class CommandClient extends Client {
|
||||
if (msg.guild && command.clientPermissions.length) {
|
||||
for (const permission of command.clientPermissions) {
|
||||
if (msg.channel.permissionsFor(this.user).has(permission)) continue;
|
||||
await msg.reply(`The \`${command.name}\` command requires me to have the "${permission}" permission.`);
|
||||
await msg.reply('Looks like I\'m missing the permissions required for this command.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ module.exports = class CommandClient extends Client {
|
||||
if (msg.guild && command.userPermissions.length) {
|
||||
for (const permission of command.userPermissions) {
|
||||
if (msg.channel.permissionsFor(msg.author).has(permission)) continue;
|
||||
await msg.reply(`You need the "${permission}" permission to use the \`${command.name}\` command.`);
|
||||
await msg.reply(`You do not have the required permissions to use the \`${command.name}\` command.`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user