mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Cleverbot
This commit is contained in:
@@ -1,24 +1,12 @@
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user