diff --git a/index.js b/index.js index f89c5cc12..ba2c5cef1 100644 --- a/index.js +++ b/index.js @@ -23,14 +23,10 @@ const CLIENT_OPTIONS = { console.log(readFileSync('bigtitle.txt', 'utf8').toString()) -const debug = process.env.DEBUG === 'true' - const Switchblade = require('./src/Switchblade.js') const client = new Switchblade(CLIENT_OPTIONS) -if (debug) { - client.on('debug', (...args) => console.log('debug', ...args)) - client.on('rateLimit', (...args) => console.log('rateLimit', ...args)) -} +client.on('debug', (...args) => console.log('debug', ...args)) +client.on('rateLimit', (...args) => console.log('rateLimit', ...args)) client.initialize() diff --git a/src/commands/utility/wikipedia.js b/src/commands/utility/wikipedia.js index ecf1e0409..49459e7f9 100644 --- a/src/commands/utility/wikipedia.js +++ b/src/commands/utility/wikipedia.js @@ -31,7 +31,7 @@ module.exports = class Wikipedia extends SearchCommand { channel.send( new SwitchbladeEmbed(author) - .setDescription(description.split('\n').slice(2).toString().substring(0, 2000) + '...') + .setDescription(description.length > 2000 ? description.substring(0, 2000) + '...' : description) .setAuthor('Wikipedia', this.embedLogoURL, `https://${lang}.wikipedia.org`) .setColor(this.embedColor) .setTitle(info.raw.title)