diff --git a/.env.example b/.env.example index 06c36e66..2e10f027 100644 --- a/.env.example +++ b/.env.example @@ -47,6 +47,7 @@ SOUNDCLOUD_KEY= STACKOVERFLOW_KEY= TENOR_KEY= TMDB_KEY= +TOP_GG_TOKEN= TUMBLR_KEY= TWITTER_KEY= TWITTER_SECRET= diff --git a/package.json b/package.json index 9fd9700a..5fb80835 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/structures/Client.js b/structures/Client.js index ca4d634a..562de675 100644 --- a/structures/Client.js +++ b/structures/Client.js @@ -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(); }