mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 22:14:34 +02:00
file is deprecated, make some changes in emoji
This commit is contained in:
@@ -35,7 +35,7 @@ module.exports = class YearsCommand extends Command {
|
|||||||
years.blit(avatar, 461, 127);
|
years.blit(avatar, 461, 127);
|
||||||
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||||
if (err) return message.say(':x: Error! Something went wrong!');
|
if (err) return message.say(':x: Error! Something went wrong!');
|
||||||
return message.channel.send({file: {attachment: buff}});
|
return message.channel.send({files: [{attachment: buff}]});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ module.exports = class BeautifulCommand extends Command {
|
|||||||
beautiful.blit(avatar, 451, 434);
|
beautiful.blit(avatar, 451, 434);
|
||||||
beautiful.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
beautiful.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||||
if (err) return message.say(':x: Error! Something went wrong!');
|
if (err) return message.say(':x: Error! Something went wrong!');
|
||||||
return message.channel.send({file: {attachment: buff}});
|
return message.channel.send({files: [{attachment: buff}]});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ module.exports = class BobRossCommand extends Command {
|
|||||||
nothing.composite(bob, 0, 0);
|
nothing.composite(bob, 0, 0);
|
||||||
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||||
if (err) return message.say(':x: Error! Something went wrong!');
|
if (err) return message.say(':x: Error! Something went wrong!');
|
||||||
return message.channel.send({file: {attachment: buff}});
|
return message.channel.send({files: [{attachment: buff}]});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ module.exports = class RIPCommand extends Command {
|
|||||||
gravestone.blit(avatar, 60, 65);
|
gravestone.blit(avatar, 60, 65);
|
||||||
gravestone.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
gravestone.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||||
if (err) return message.say(':x: Error! Something went wrong!');
|
if (err) return message.say(':x: Error! Something went wrong!');
|
||||||
return message.channel.send({file: {attachment: buff}});
|
return message.channel.send({files: [{attachment: buff}]});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ module.exports = class SteamCardCommand extends Command {
|
|||||||
nothing.print(font, 38, 20, user.username);
|
nothing.print(font, 38, 20, user.username);
|
||||||
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||||
if (err) return message.say(':x: Error! Something went wrong!');
|
if (err) return message.say(':x: Error! Something went wrong!');
|
||||||
return message.channel.send({file: {attachment: buff}});
|
return message.channel.send({files: [{attachment: buff}]});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,6 +21,6 @@ module.exports = class EmojiCommand extends Command {
|
|||||||
if (message.channel.type !== 'dm') {
|
if (message.channel.type !== 'dm') {
|
||||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||||
}
|
}
|
||||||
return message.say(message.guild.emojis.map(e => e).join(' '));
|
return message.say(message.guild.emojis.map(e => e).join('')).catch(() => message.say(':x: Error! Something went wrong!'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ module.exports = class MapCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
.get(`https://maps.googleapis.com/maps/api/staticmap?center=${location}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`);
|
.get(`https://maps.googleapis.com/maps/api/staticmap?center=${location}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`);
|
||||||
return message.channel.send({file: {attachment: body}});
|
return message.channel.send({files: [{attachment: body}]});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return message.say(':x: Error! Something went wrong! Make sure you entered the location correctly!');
|
return message.say(':x: Error! Something went wrong! Make sure you entered the location correctly!');
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "30.0.1",
|
"version": "30.1.0",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "shardingmanager.js",
|
"main": "shardingmanager.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user