mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 14:55:40 +02:00
Destructuring Args
This commit is contained in:
@@ -25,6 +25,9 @@ module.exports = class BinaryCommand extends Command {
|
||||
return 'Your message content is too long.';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
parse: text => {
|
||||
return stringToBinary(text);
|
||||
}
|
||||
}]
|
||||
});
|
||||
@@ -34,8 +37,7 @@ module.exports = class BinaryCommand extends Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
const text = args.text;
|
||||
const binary = stringToBinary(text);
|
||||
return message.say(binary);
|
||||
const { text } = args;
|
||||
return message.say(text);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user