diff --git a/commands/games/math-game.js b/commands/games/math-game.js index 0c99593b..a4dc89d4 100644 --- a/commands/games/math-game.js +++ b/commands/games/math-game.js @@ -35,6 +35,7 @@ module.exports = class MathGameCommand extends Command { const answer = math.eval(expression).toString(); const embed = new MessageEmbed() .setTitle('You have 10 seconds to answer:') + .setColor(0x9797FF) .setDescription(expression); await msg.embed(embed); const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { diff --git a/commands/games/quiz.js b/commands/games/quiz.js index 8604d488..1085e736 100644 --- a/commands/games/quiz.js +++ b/commands/games/quiz.js @@ -44,6 +44,7 @@ module.exports = class QuizCommand extends Command { answers.push(correct); const embed = new MessageEmbed() .setTitle('You have 15 seconds to answer this question:') + .setColor(0x9797FF) .setDescription(stripIndents` **${decodeURIComponent(body.results[0].category)}** ${type === 'boolean' ? '**True or False:** ' : ''}${decodeURIComponent(body.results[0].question)} diff --git a/commands/games/typing-game.js b/commands/games/typing-game.js index 857ad883..2f1f14cb 100644 --- a/commands/games/typing-game.js +++ b/commands/games/typing-game.js @@ -31,6 +31,7 @@ module.exports = class TypingGameCommand extends Command { const time = times[difficulty]; const embed = new MessageEmbed() .setTitle(`You have ${time / 1000} seconds to type:`) + .setColor(0x9797FF) .setDescription(sentence); await msg.embed(embed); const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { diff --git a/commands/image-edit/meme.js b/commands/image-edit/meme.js index 558d22ea..daa9355e 100644 --- a/commands/image-edit/meme.js +++ b/commands/image-edit/meme.js @@ -25,12 +25,20 @@ module.exports = class MemeCommand extends Command { key: 'top', prompt: 'What should the top row of the meme to be?', type: 'string', + validate: top => { + if (top.length < 200) return true; + return 'Please keep the top text under 200 characters.'; + }, parse: top => encodeURIComponent(top.replace(/[ ]/g, '-')) }, { key: 'bottom', prompt: 'What should the bottom row of the meme to be?', type: 'string', + validate: bottom => { + if (bottom.length < 200) return true; + return 'Please keep the bottom text under 200 characters.'; + }, parse: bottom => encodeURIComponent(bottom.replace(/[ ]/g, '-')) } ] diff --git a/commands/random-res/fortune.js b/commands/random-res/fortune.js index 75079034..b060a1d8 100644 --- a/commands/random-res/fortune.js +++ b/commands/random-res/fortune.js @@ -19,8 +19,8 @@ module.exports = class FortuneCommand extends Command { .query({ limit: 1 }); return msg.say(stripIndents` ${body[0].fortune.message} - Lotto: ${body[0].lotto.numbers.join(', ')} - Lesson: ${body[0].lesson.chinese} (${body[0].lesson.pronunciation}): ${body[0].lesson.english} + ${body[0].lotto.numbers.join(', ')} + ${body[0].lesson.chinese} (${body[0].lesson.pronunciation}): ${body[0].lesson.english} `); } }; diff --git a/commands/random-res/quote.js b/commands/random-res/quote.js index 75e90552..ae4484cb 100644 --- a/commands/random-res/quote.js +++ b/commands/random-res/quote.js @@ -1,5 +1,4 @@ const Command = require('../../structures/Command'); -const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); module.exports = class QuoteCommand extends Command { @@ -8,18 +7,13 @@ module.exports = class QuoteCommand extends Command { name: 'quote', group: 'random-res', memberName: 'quote', - description: 'Responds with a random quote.', - clientPermissions: ['EMBED_LINKS'] + description: 'Responds with a random quote.' }); } async run(msg) { const { body } = await snekfetch .get('https://talaikis.com/api/quotes/random/'); - const embed = new MessageEmbed() - .setColor(0x9797FF) - .setAuthor(body.author) - .setDescription(body.quote); - return msg.embed(embed); + return msg.say(`${body.quote} - _${body.author}_`); } }; diff --git a/commands/random/xkcd.js b/commands/random/xkcd.js index 6e062119..0d2b8f7e 100644 --- a/commands/random/xkcd.js +++ b/commands/random/xkcd.js @@ -30,6 +30,7 @@ module.exports = class XKCDCommand extends Command { if (type === 'today') { const embed = new MessageEmbed() .setTitle(`${current.body.num} - ${current.body.title}`) + .setColor(0x9797FF) .setURL(`https://xkcd.com/${current.body.num}`) .setImage(current.body.img) .setFooter(current.body.alt); @@ -40,6 +41,7 @@ module.exports = class XKCDCommand extends Command { .get(`https://xkcd.com/${random}/info.0.json`); const embed = new MessageEmbed() .setTitle(`${body.num} - ${body.title}`) + .setColor(0x9797FF) .setURL(`https://xkcd.com/${body.num}`) .setImage(body.img) .setFooter(body.alt); @@ -51,6 +53,7 @@ module.exports = class XKCDCommand extends Command { .get(`https://xkcd.com/${choice}/info.0.json`); const embed = new MessageEmbed() .setTitle(`${body.num} - ${body.title}`) + .setColor(0x9797FF) .setURL(`https://xkcd.com/${body.num}`) .setImage(body.img) .setFooter(body.alt); diff --git a/commands/search/discrim.js b/commands/search/discrim.js index f82aaa53..274616c7 100644 --- a/commands/search/discrim.js +++ b/commands/search/discrim.js @@ -30,6 +30,7 @@ module.exports = class DiscrimCommand extends Command { const users = this.client.users.filter(user => user.discriminator === discrim).map(user => user.username); const embed = new MessageEmbed() .setTitle(`${users.length} Users with the discriminator: ${discrim}`) + .setColor(0x9797FF) .setDescription(users.join(', ')); return msg.embed(embed); } diff --git a/package.json b/package.json index bd9b5bf5..b6023d6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "30.6.0", + "version": "30.6.1", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {