mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
better errors
This commit is contained in:
@@ -18,6 +18,6 @@ module.exports = class XiaoCommand extends Command {
|
||||
return msg.say('This Command requires the `Attach Files` Permission.');
|
||||
const xiao = Math.floor(Math.random() * 10) + 1;
|
||||
return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', `xiaopai${xiao}.png`)] })
|
||||
.catch(() => msg.say('An Error Occurred while sending the image.'));
|
||||
.catch(err => msg.say(`${err.name}: ${err.message}`));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user