Files
xiao/commands/text-edit/say.js
T
Daniel Odendahl Jr 7560246f26 Update to latest
2017-11-02 22:42:12 +00:00

29 lines
660 B
JavaScript

const { Command } = require('discord.js-commando');
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',
validate: text => {
if (!text.includes('@everyone') && !text.includes('@here')) return true;
return 'Invalid text, please do not say everyone or here mentions.';
}
}
]
});
}
run(msg, { text }) {
return msg.say(text);
}
};