mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 00:04:48 +02:00
Finish removing "Oh no, an error occurred"
This commit is contained in:
@@ -21,11 +21,7 @@ module.exports = class GithubZenCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { text } = await request.get('https://api.github.com/zen');
|
||||
return msg.say(text);
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
const { text } = await request.get('https://api.github.com/zen');
|
||||
return msg.say(text);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user