Haha-Yes/commands/general/say.js

36 lines
667 B
JavaScript
Raw Normal View History

2018-12-30 01:20:24 +01:00
const { Command } = require('discord-akairo');
2019-02-08 18:59:02 +01:00
const rand = require('../../rand.js');
2018-12-05 00:52:21 +01:00
2018-12-30 01:20:24 +01:00
class SayCommand extends Command {
2019-01-02 08:09:45 +01:00
constructor() {
super('say', {
aliases: ['say'],
category: 'general',
args: [
{
id: 'text',
type: 'string',
2019-01-10 20:45:29 +01:00
match: 'rest'
2019-01-02 08:09:45 +01:00
}
],
description: {
content: 'Repeat what you say but can also replace ',
usage: '[text]',
2019-01-02 18:45:53 +01:00
examples: ['[member] is a big [adverb] [verb]']
2019-01-02 08:09:45 +01:00
}
});
}
2018-09-18 15:35:06 +02:00
2019-01-02 08:09:45 +01:00
async exec(message, args) {
let text = args.text;
2019-01-02 18:45:53 +01:00
if (!text)
return;
2018-11-28 20:27:29 +01:00
2019-02-08 18:59:02 +01:00
text = rand.random(text, message);
2018-11-28 20:27:29 +01:00
2019-01-02 08:09:45 +01:00
// Send the final text
return message.channel.send(text);
}
2018-12-30 01:20:24 +01:00
}
module.exports = SayCommand;