Haha-Yes/commands/fun/say.js

29 lines
907 B
JavaScript
Raw Normal View History

2018-09-18 15:35:06 +02:00
const { Command } = require('discord.js-commando');
2018-11-28 01:35:26 +01:00
const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../blacklist');
2018-09-18 15:35:06 +02:00
module.exports = class sayCommand extends Command {
constructor(client) {
super(client, {
name: 'say',
group: 'fun',
memberName: 'say',
2018-09-22 17:14:33 +02:00
description: `Repeat the text you send`,
2018-09-18 15:35:06 +02:00
args: [
{
key: 'text',
prompt: 'What do you want me to say',
type: 'string',
}
]
});
}
async run(message, { text }) {
2018-11-28 01:35:26 +01:00
let blacklistJson = new SelfReloadJSON('json/blacklist.json');
if(blacklistJson[message.author.id])
return blacklist(blacklistJson[message.author.id] , message)
2018-09-18 15:35:06 +02:00
message.delete();
message.say(text);
}
};