Files
xiao/commands/text-edit/say.js
T
Daniel Odendahl Jr 1c9ac56831 Change arg assignment
2017-09-16 01:44:44 +00:00

28 lines
615 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class SayCommand extends Command {
constructor(client) {
super(client, {
name: 'say',
aliases: ['copy', 'echo'],
group: 'text-edit',
memberName: 'say',
description: 'Make XiaoBot say what you wish.',
args: [
{
key: 'text',
prompt: 'What text would you like XiaoBot to say?',
type: 'string'
}
]
});
}
async run(msg, { text }) {
if (msg.channel.type === 'text' && msg.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES')) {
await msg.delete();
}
return msg.say(text);
}
};