Add top.gg support

This commit is contained in:
Dragon Fire
2020-04-11 11:55:26 -04:00
parent 82a7f23436
commit 97e38a57e3
3 changed files with 6 additions and 2 deletions
+1
View File
@@ -47,6 +47,7 @@ SOUNDCLOUD_KEY=
STACKOVERFLOW_KEY=
TENOR_KEY=
TMDB_KEY=
TOP_GG_TOKEN=
TUMBLR_KEY=
TWITTER_KEY=
TWITTER_SECRET=
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "112.20.2",
"version": "112.20.3",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {
@@ -38,6 +38,7 @@
"cloc": "^2.5.1",
"common-tags": "^1.8.0",
"custom-translate": "^2.2.8",
"dblapi.js": "^2.4.0",
"didyoumean2": "^4.0.0",
"discord.js": "^12.1.1",
"discord.js-commando": "github:discordjs/Commando",
+3 -1
View File
@@ -1,10 +1,11 @@
const { CommandoClient } = require('discord.js-commando');
const { WebhookClient } = require('discord.js');
const DBL = require('dblapi.js');
const Collection = require('@discordjs/collection');
const winston = require('winston');
const PokemonStore = require('./pokemon/PokemonStore');
const MemePoster = require('./MemePoster');
const { XIAO_WEBHOOK_ID, XIAO_WEBHOOK_TOKEN, BOT_LIST_GUILDS } = process.env;
const { XIAO_WEBHOOK_ID, XIAO_WEBHOOK_TOKEN, BOT_LIST_GUILDS, TOP_GG_TOKEN } = process.env;
module.exports = class XiaoClient extends CommandoClient {
constructor(options) {
@@ -21,6 +22,7 @@ module.exports = class XiaoClient extends CommandoClient {
this.webhook = new WebhookClient(XIAO_WEBHOOK_ID, XIAO_WEBHOOK_TOKEN, { disableEveryone: true });
this.pokemon = new PokemonStore();
this.memePoster = new MemePoster(this);
this.dbl = TOP_GG_TOKEN ? new DBL(TOP_GG_TOKEN, this) : null;
this.games = new Collection();
this.phone = new Collection();
}