Remove fact command

This commit is contained in:
dragonfire535
2017-03-09 00:12:56 -05:00
parent 5f2f35d261
commit b47ab3b79c
3 changed files with 1 additions and 30 deletions
-28
View File
@@ -1,28 +0,0 @@
const commando = require('discord.js-commando');
const WikiFakt = require('wikifakt');
class FactCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'fact',
group: 'response',
memberName: 'fact',
description: 'Gets a random fact. (;fact)',
examples: [';fact']
});
}
async run(message, args) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
}
console.log("[Command] " + message.content);
WikiFakt.preload = false;
WikiFakt.getRandomFact().then(function(fact) {
message.channel.sendMessage(fact);
});
}
}
module.exports = FactCommand;