mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Fix Error
This commit is contained in:
@@ -13,7 +13,7 @@ module.exports = class RandomPunCommand extends Command {
|
||||
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm')
|
||||
if (!message.channel.permissionsFor(this.client.user).permissions.has('ATTACH_FILES'))
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES'))
|
||||
return message.say('This Command requires the `Attach Files` Permission.');
|
||||
const pun = puns[Math.floor(Math.random() * puns.length)];
|
||||
return message.channel.send({files: [`./images/Pun${pun}`]});
|
||||
|
||||
Reference in New Issue
Block a user