mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
send instead of sendFile for buffers
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class YearsCommand extends Command {
|
||||
years.blit(avatar, 461, 127);
|
||||
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.sendFile(buff);
|
||||
return message.channel.send({file: {attachment: buff} });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ module.exports = class BeautifulCommand extends Command {
|
||||
beautiful.blit(avatar, 451, 434);
|
||||
beautiful.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.sendFile(buff);
|
||||
return message.channel.send({file: {attachment: buff} });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ module.exports = class BobRossCommand extends Command {
|
||||
nothing.composite(bob, 0, 0);
|
||||
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.sendFile(buff);
|
||||
return message.channel.send({file: {attachment: buff} });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ module.exports = class RIPCommand extends Command {
|
||||
gravestone.blit(avatar, 60, 65);
|
||||
gravestone.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.sendFile(buff);
|
||||
return message.channel.send({file: {attachment: buff} });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ module.exports = class SteamCardCommand extends Command {
|
||||
nothing.print(font, 38, 20, userDisplayName);
|
||||
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||
if (err) return message.say(':x: Error! Something went wrong!');
|
||||
return message.channel.sendFile(buff);
|
||||
return message.channel.send({file: {attachment: buff} });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ module.exports = class MapCommand extends Command {
|
||||
try {
|
||||
const response = await snekfetch
|
||||
.get(`https://maps.googleapis.com/maps/api/staticmap?center=${location}&zoom=${zoom}&size=500x500&key=${process.env.GOOGLE_KEY}`);
|
||||
return message.channel.sendFile(response.body);
|
||||
return message.channel.send({file: {attachment: response.body} });
|
||||
}
|
||||
catch (err) {
|
||||
return message.say(':x: Error! Something went wrong! Make sure you entered the location correctly!');
|
||||
|
||||
Reference in New Issue
Block a user