Skip to content

Commit

Permalink
Merge pull request #1262 from SwitchbladeBot/dev
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
Doges authored Nov 23, 2020
2 parents 4ee40b2 + 150e535 commit 21112b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion src/commands/utility/wikipedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 21112b8

Please sign in to comment.