mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 07:46:43 +02:00
Fix Jimp Commands
This commit is contained in:
@@ -35,7 +35,7 @@ module.exports = class YearsCommand extends Command {
|
||||
const [avatar, years] = await Promise.all(images);
|
||||
avatar.resize(200, 200);
|
||||
years.blit(avatar, 461, 127);
|
||||
return years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.send({file: buff});
|
||||
});
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = class BeautifulCommand extends Command {
|
||||
beautiful.blit(avatar, 432, 42);
|
||||
avatar.resize(190, 190);
|
||||
beautiful.blit(avatar, 451, 434);
|
||||
return beautiful.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
beautiful.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.send({file: buff});
|
||||
});
|
||||
|
||||
@@ -39,7 +39,7 @@ module.exports = class BobRossCommand extends Command {
|
||||
avatar.resize(300, 300);
|
||||
nothing.composite(avatar, 44, 85);
|
||||
nothing.composite(bob, 0, 0);
|
||||
return nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.send({file: buff});
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ module.exports = class RIPCommand extends Command {
|
||||
const [avatar, gravestone] = await Promise.all(images);
|
||||
avatar.resize(200, 200);
|
||||
gravestone.blit(avatar, 60, 65);
|
||||
return gravestone.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
gravestone.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.send({file: buff});
|
||||
});
|
||||
|
||||
@@ -40,7 +40,7 @@ module.exports = class SteamCardCommand extends Command {
|
||||
nothing.composite(avatar, 25, 25);
|
||||
nothing.composite(steamcard, 0, 0);
|
||||
nothing.print(font, 38, 20, userDisplayName);
|
||||
return nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.send({file: buff});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user