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 : {
2019-04-06 18:53:40 +02:00
content : 'Repeat what you say, [Click here to see the complete list of "tag"](https://cdn.discordapp.com/attachments/502198809355354133/561043193949585418/unknown.png)' ,
2019-01-02 08:09:45 +01:00
usage : '[text]' ,
2019-04-06 18:53:40 +02:00
examples : [ '[member] is a big [adverbs] [verbs]' ]
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 ;