CommandoClient, Change Filenames, etc.

This commit is contained in:
Daniel Odendahl Jr
2017-05-23 16:14:48 +00:00
parent 38674485d1
commit 67f888e7b0
44 changed files with 77 additions and 54 deletions
+25
View File
@@ -0,0 +1,25 @@
const { Client } = require('discord.js-commando');
const Database = require('./PostgreSQL');
const Cleverbot = require('cleverio');
const { CLEVS_KEY, CLEVS_USER, CLEVS_NICK } = process.env;
class CommandoClient extends Client {
constructor(options) {
super(options);
this.database = Database.db;
this.cleverbot = new Cleverbot({
key: CLEVS_KEY,
user: CLEVS_USER,
nick: CLEVS_NICK
});
Database.start();
this.cleverbot.create();
}
get mentionRegex() {
return new RegExp(`<!?@${this.user.id}>`, 'g');
}
}
module.exports = CommandoClient;