mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 18:29:14 +02:00
Begin migrating away from stupid "Oh no, an error occurred!"
This commit is contained in:
@@ -26,13 +26,9 @@ module.exports = class AsciiCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg, { image }) {
|
||||
try {
|
||||
const { body } = await request.get(image);
|
||||
const asciiImg = await this.ascii(body);
|
||||
return msg.code(null, asciiImg);
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
const { body } = await request.get(image);
|
||||
const asciiImg = await this.ascii(body);
|
||||
return msg.code(null, asciiImg);
|
||||
}
|
||||
|
||||
async ascii(image) {
|
||||
|
||||
Reference in New Issue
Block a user