From caba065235e4a554dd1d56e21e80333d470f4662 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 13 Sep 2017 02:08:06 +0000 Subject: [PATCH] Change some strings --- commands/avatar-edit/card.js | 2 +- commands/avatar-edit/steam-card.js | 2 +- commands/avatar-edit/yu-gi-oh-token.js | 2 +- commands/games/emoji-emoji-revolution.js | 2 +- commands/games/fishy.js | 7 ++++--- commands/games/gunfight.js | 2 +- commands/games/lottery.js | 4 ++-- commands/image-edit/achievement.js | 2 +- commands/image-edit/meme.js | 4 ++-- commands/moderation/ban.js | 2 +- commands/moderation/hackban.js | 2 +- commands/moderation/kick.js | 2 +- commands/moderation/prune.js | 2 +- commands/moderation/softban.js | 2 +- commands/moderation/unban.js | 2 +- commands/random/strawpoll.js | 6 +++--- commands/search/map.js | 2 +- commands/text-edit/b.js | 2 +- commands/text-edit/binary.js | 2 +- commands/text-edit/clap.js | 2 +- commands/text-edit/cow-say.js | 2 +- commands/text-edit/emojify.js | 2 +- commands/text-edit/mocking.js | 2 +- commands/text-edit/morse.js | 2 +- commands/text-edit/pirate.js | 2 +- commands/text-edit/repeat.js | 2 +- commands/text-edit/ship-name.js | 4 ++-- commands/text-edit/temmie.js | 2 +- commands/text-edit/translate.js | 22 +++++++++++----------- commands/text-edit/yoda.js | 4 ++-- commands/text-edit/zalgo.js | 2 +- package.json | 2 +- 32 files changed, 51 insertions(+), 50 deletions(-) diff --git a/commands/avatar-edit/card.js b/commands/avatar-edit/card.js index 44180d18..22da5231 100644 --- a/commands/avatar-edit/card.js +++ b/commands/avatar-edit/card.js @@ -14,7 +14,7 @@ module.exports = class CardCommand extends Command { aliases: ['discord-card'], group: 'avatar-edit', memberName: 'card', - description: 'Creates a trading card of random rarity based on a user\'s profile.', + description: 'Draws a trading card of random rarity based on a user\'s profile.', guildOnly: true, throttling: { usages: 1, diff --git a/commands/avatar-edit/steam-card.js b/commands/avatar-edit/steam-card.js index 2ed9e261..548d8ac4 100644 --- a/commands/avatar-edit/steam-card.js +++ b/commands/avatar-edit/steam-card.js @@ -12,7 +12,7 @@ module.exports = class SteamCardCommand extends Command { name: 'steam-card', group: 'avatar-edit', memberName: 'steam-card', - description: 'Draws a user\'s avatar over a Steam card.', + description: 'Draws a user\'s avatar over a Steam Trading Card.', guildOnly: true, throttling: { usages: 1, diff --git a/commands/avatar-edit/yu-gi-oh-token.js b/commands/avatar-edit/yu-gi-oh-token.js index 7e515d56..9e340441 100644 --- a/commands/avatar-edit/yu-gi-oh-token.js +++ b/commands/avatar-edit/yu-gi-oh-token.js @@ -9,7 +9,7 @@ module.exports = class YuGiOhTokenCommand extends Command { name: 'yu-gi-oh-token', group: 'avatar-edit', memberName: 'yu-gi-oh-token', - description: 'Draws a user\'s avatar over a blank Yu-Gi-Oh! token.', + description: 'Draws a user\'s avatar over a blank Yu-Gi-Oh! Token card.', throttling: { usages: 1, duration: 30 diff --git a/commands/games/emoji-emoji-revolution.js b/commands/games/emoji-emoji-revolution.js index ef126221..281409b3 100644 --- a/commands/games/emoji-emoji-revolution.js +++ b/commands/games/emoji-emoji-revolution.js @@ -14,7 +14,7 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command { args: [ { key: 'opponent', - prompt: 'Who would you like to play against?', + prompt: 'What user would you like to play against?', type: 'user' } ] diff --git a/commands/games/fishy.js b/commands/games/fishy.js index 7c7fbe63..5c9ce1b5 100644 --- a/commands/games/fishy.js +++ b/commands/games/fishy.js @@ -5,15 +5,16 @@ module.exports = class FishyCommand extends Command { constructor(client) { super(client, { name: 'fishy', - aliases: ['fish'], + aliases: ['fish', 'fishing'], group: 'games', memberName: 'fishy', - description: 'Catches a fish.' + description: 'Go fishing.' }); } run(msg) { const fish = fishes[Math.floor(Math.random() * fishes.length)]; - return msg.say(`You caught a: ${fish}`); + if (fish === '🔧') return msg.say(`You caught a ${fish}... Too bad...`); + return msg.say(`You caught a ${fish}!`); } }; diff --git a/commands/games/gunfight.js b/commands/games/gunfight.js index 1d607b4d..7d7f4d76 100644 --- a/commands/games/gunfight.js +++ b/commands/games/gunfight.js @@ -14,7 +14,7 @@ module.exports = class GunfightCommand extends Command { args: [ { key: 'opponent', - prompt: 'Who would you like to gunfight?', + prompt: 'What user would you like to gunfight?', type: 'user' } ] diff --git a/commands/games/lottery.js b/commands/games/lottery.js index 39ebf761..eefd4fc4 100644 --- a/commands/games/lottery.js +++ b/commands/games/lottery.js @@ -12,7 +12,7 @@ module.exports = class LotteryCommand extends Command { run(msg) { const lottery = Math.floor(Math.random() * 100) + 1; - if (lottery === 1) return msg.reply('Nice job! 10/10! You deserve some cake!'); - return msg.reply('Nope, sorry, you lost.'); + if (lottery === 1) return msg.say('Nice job! 10/10! You deserve some cake!'); + return msg.say('Nope, sorry, you lost.'); } }; diff --git a/commands/image-edit/achievement.js b/commands/image-edit/achievement.js index 4b4b92a9..802368ab 100644 --- a/commands/image-edit/achievement.js +++ b/commands/image-edit/achievement.js @@ -16,7 +16,7 @@ module.exports = class AchievementCommand extends Command { type: 'string', validate: text => { if (text.length < 25) return true; - return 'Please keep the text under 25 characters.'; + return 'Invalid text, please keep the text under 25 characters.'; } } ] diff --git a/commands/image-edit/meme.js b/commands/image-edit/meme.js index 55ec84ea..8e21ce8e 100644 --- a/commands/image-edit/meme.js +++ b/commands/image-edit/meme.js @@ -29,7 +29,7 @@ module.exports = class MemeCommand extends Command { type: 'string', validate: top => { if (top.length < 200) return true; - return 'Please keep the top text under 200 characters.'; + return 'Invalid top text, please keep the top text under 200 characters.'; }, parse: top => encodeURIComponent(top) }, @@ -39,7 +39,7 @@ module.exports = class MemeCommand extends Command { type: 'string', validate: bottom => { if (bottom.length < 200) return true; - return 'Please keep the bottom text under 200 characters.'; + return 'Invalid bottom text, please keep the bottom text under 200 characters.'; }, parse: bottom => encodeURIComponent(bottom) } diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 6766feb3..cb415c55 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -24,7 +24,7 @@ module.exports = class BanCommand extends Command { type: 'string', validate: reason => { if (reason.length < 140) return true; - return 'Please keep the reason under 140 characters.'; + return 'Invalid reason, please keep the reason under 140 characters.'; } } ] diff --git a/commands/moderation/hackban.js b/commands/moderation/hackban.js index ef0f95fa..9c406849 100644 --- a/commands/moderation/hackban.js +++ b/commands/moderation/hackban.js @@ -23,7 +23,7 @@ module.exports = class HackbanCommand extends Command { type: 'string', validate: reason => { if (reason.length < 140) return true; - return 'Please keep the reason under 140 characters.'; + return 'Invalid reason, please keep the reason under 140 characters.'; } } ] diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index 928fbac3..c5b9ee23 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -24,7 +24,7 @@ module.exports = class KickCommand extends Command { type: 'string', validate: reason => { if (reason.length < 140) return true; - return 'Please keep the reason under 140 characters.'; + return 'Invalid reason, please keep the reason under 140 characters.'; } } ] diff --git a/commands/moderation/prune.js b/commands/moderation/prune.js index 87957c06..17cdd5f5 100644 --- a/commands/moderation/prune.js +++ b/commands/moderation/prune.js @@ -22,7 +22,7 @@ module.exports = class PruneCommand extends Command { type: 'integer', validate: count => { if (count < 100 && count > 0) return true; - return 'Count must be from 1-99.'; + return 'Invalid count, please enter a number from 1-99.'; } } ] diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index 10e0a419..6ede742e 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -24,7 +24,7 @@ module.exports = class SoftbanCommand extends Command { type: 'string', validate: reason => { if (reason.length < 140) return true; - return 'Please keep the reason under 140 characters.'; + return 'Invalid reason, please keep the reason under 140 characters.'; } } ] diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index a5196753..8a5db0d2 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -23,7 +23,7 @@ module.exports = class UnbanCommand extends Command { type: 'string', validate: reason => { if (reason.length < 140) return true; - return 'Please keep the reason under 140 characters.'; + return 'Invalid reason, please keep the reason under 140 characters.'; } } ] diff --git a/commands/random/strawpoll.js b/commands/random/strawpoll.js index 1ebf9663..479a54cc 100644 --- a/commands/random/strawpoll.js +++ b/commands/random/strawpoll.js @@ -17,17 +17,17 @@ module.exports = class StrawpollCommand extends Command { type: 'string', validate: title => { if (title.length < 200) return true; - return 'Please keep the title under 200 characters.'; + return 'Invalid title, please keep the title under 200 characters.'; } }, { key: 'options', - prompt: 'What options do you want to be able to pick from? Maximum of 30.', + prompt: 'What options do you want to be able to pick from? You may have a maximum of 30.', type: 'string', infinite: true, validate: choice => { if (choice.length < 140) return true; - return 'Please keep choices under 140 characters each.'; + return 'Invalid option, please keep options under 140 characters each.'; } } ] diff --git a/commands/search/map.js b/commands/search/map.js index a5755962..be8e45e6 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -18,7 +18,7 @@ module.exports = class MapCommand extends Command { type: 'integer', validate: zoom => { if (zoom < 21 && zoom > 0) return true; - return 'Please enter a zoom value from 1-20.'; + return 'Invalid zoom level, please enter a zoom level from 1-20.'; } }, { diff --git a/commands/text-edit/b.js b/commands/text-edit/b.js index 2d81582b..8c65fbe1 100644 --- a/commands/text-edit/b.js +++ b/commands/text-edit/b.js @@ -15,7 +15,7 @@ module.exports = class BCommand extends Command { type: 'string', validate: text => { if (text.replace(/(b|d|g|p|q)/gi, '🅱').length < 2000) return true; - return 'Your text is too long.'; + return 'Invalid text, your text is too long.'; } } ] diff --git a/commands/text-edit/binary.js b/commands/text-edit/binary.js index 0a8e7aa1..e4c09136 100644 --- a/commands/text-edit/binary.js +++ b/commands/text-edit/binary.js @@ -14,7 +14,7 @@ module.exports = class BinaryCommand extends Command { type: 'string', validate: text => { if (this.binary(text).length < 2000) return true; - return 'Your text is too long.'; + return 'Invalid text, your text is too long.'; } } ] diff --git a/commands/text-edit/clap.js b/commands/text-edit/clap.js index d5cdb1c6..43dec637 100644 --- a/commands/text-edit/clap.js +++ b/commands/text-edit/clap.js @@ -15,7 +15,7 @@ module.exports = class ClapCommand extends Command { type: 'string', validate: text => { if (text.split(' ').join(' 👏 ').length < 2000) return true; - return 'Your text is too long.'; + return 'Invalid text, your text is too long.'; } } ] diff --git a/commands/text-edit/cow-say.js b/commands/text-edit/cow-say.js index 3e0aac8c..17c801f8 100644 --- a/commands/text-edit/cow-say.js +++ b/commands/text-edit/cow-say.js @@ -15,7 +15,7 @@ module.exports = class CowsayCommand extends Command { type: 'string', validate: text => { if (text.length < 1500) return true; - return 'Text must be under 1500 characters.'; + return 'Invalid text, please keep the text under 1500 characters.'; } } ] diff --git a/commands/text-edit/emojify.js b/commands/text-edit/emojify.js index 1fd13a24..572fa8fe 100644 --- a/commands/text-edit/emojify.js +++ b/commands/text-edit/emojify.js @@ -17,7 +17,7 @@ module.exports = class EmojifyCommand extends Command { type: 'string', validate: text => { if (letterTrans(text.toLowerCase(), dictionary, ' ').length < 2000) return true; - return 'Your text is too long.'; + return 'Invalid text, your text is too long.'; }, parse: text => text.toLowerCase() } diff --git a/commands/text-edit/mocking.js b/commands/text-edit/mocking.js index 65ae1ce3..8c176ed7 100644 --- a/commands/text-edit/mocking.js +++ b/commands/text-edit/mocking.js @@ -16,7 +16,7 @@ module.exports = class MockingCommand extends Command { type: 'string', validate: text => { if (text.length < 1950) return true; - return 'Text must be under 1950 characters.'; + return 'Invalid text, please keep the text under 1950 characters.'; }, parse: text => text.toLowerCase().split('') } diff --git a/commands/text-edit/morse.js b/commands/text-edit/morse.js index 5e9437fb..41fd3c78 100644 --- a/commands/text-edit/morse.js +++ b/commands/text-edit/morse.js @@ -16,7 +16,7 @@ module.exports = class MorseCommand extends Command { type: 'string', validate: text => { if (letterTrans(text.toLowerCase(), dictionary, ' ').length < 2000) return true; - return 'Your text is too long.'; + return 'Invalid text, your text is too long.'; }, parse: text => text.toLowerCase() } diff --git a/commands/text-edit/pirate.js b/commands/text-edit/pirate.js index 15af26cb..d0faf3a8 100644 --- a/commands/text-edit/pirate.js +++ b/commands/text-edit/pirate.js @@ -16,7 +16,7 @@ module.exports = class PirateCommand extends Command { type: 'string', validate: text => { if (wordTrans(text, dictionary).length < 2000) return true; - return 'Your text is too long.'; + return 'Invalid text, your text is too long.'; } } ] diff --git a/commands/text-edit/repeat.js b/commands/text-edit/repeat.js index 91ca3ef8..af8a8d72 100644 --- a/commands/text-edit/repeat.js +++ b/commands/text-edit/repeat.js @@ -14,7 +14,7 @@ module.exports = class RepeatCommand extends Command { type: 'string', validate: text => { if (!text.includes('@everyone') && !text.includes('@here')) return true; - return 'Please do not repeat everyone or here mentions.'; + return 'Invalid text, please do not repeat everyone or here mentions.'; } } ] diff --git a/commands/text-edit/ship-name.js b/commands/text-edit/ship-name.js index df647809..ff824bbf 100644 --- a/commands/text-edit/ship-name.js +++ b/commands/text-edit/ship-name.js @@ -14,7 +14,7 @@ module.exports = class ShipNameCommand extends Command { type: 'string', validate: start => { if (start.length < 50) return true; - return 'The start name must be under 50 characters.'; + return 'Invalid start name, the start name must be under 50 characters.'; }, parse: start => start.toLowerCase() }, @@ -24,7 +24,7 @@ module.exports = class ShipNameCommand extends Command { type: 'string', validate: end => { if (end.length < 50) return true; - return 'The end name must be under 50 characters.'; + return 'Invalid end name, the end name must be under 50 characters.'; }, parse: end => end.toLowerCase() } diff --git a/commands/text-edit/temmie.js b/commands/text-edit/temmie.js index 73b8d1f1..e4890522 100644 --- a/commands/text-edit/temmie.js +++ b/commands/text-edit/temmie.js @@ -16,7 +16,7 @@ module.exports = class TemmieCommand extends Command { type: 'string', validate: text => { if (wordTrans(text, dictionary).length < 2000) return true; - return 'Your text is too long.'; + return 'Invalid text, your text is too long.'; } } ] diff --git a/commands/text-edit/translate.js b/commands/text-edit/translate.js index 05657615..a8dc50b9 100644 --- a/commands/text-edit/translate.js +++ b/commands/text-edit/translate.js @@ -21,7 +21,7 @@ module.exports = class TranslateCommand extends Command { type: 'string', validate: text => { if (text.length < 500) return true; - return 'Please keep text under 500 characters.'; + return 'Invalid text, please keep the text under 500 characters.'; } }, { @@ -38,17 +38,17 @@ module.exports = class TranslateCommand extends Command { } }, { - key: 'original', - prompt: `Which language is your text in? Either ${list(Object.keys(codes), 'or')}.`, + key: 'base', + prompt: `Which language would you like to use as the base? Either ${list(Object.keys(codes), 'or')}.`, type: 'string', default: '', - validate: original => { - if (codes[original.toLowerCase()] || Object.values(codes).includes(original)) return true; - return `Invalid original, please enter either ${list(Object.keys(codes), 'or')}.`; + validate: base => { + if (codes[base.toLowerCase()] || Object.values(codes).includes(base)) return true; + return `Invalid base, please enter either ${list(Object.keys(codes), 'or')}.`; }, - parse: original => { - if (codes[original.toLowerCase()]) return original.toLowerCase(); - return Object.keys(codes).find(key => codes[key] === original); + parse: base => { + if (codes[base.toLowerCase()]) return base.toLowerCase(); + return Object.keys(codes).find(key => codes[key] === base); } } ] @@ -56,14 +56,14 @@ module.exports = class TranslateCommand extends Command { } async run(msg, args) { - const { text, target, original } = args; + const { text, target, base } = args; try { const { body } = await snekfetch .get('https://translate.yandex.net/api/v1.5/tr.json/translate') .query({ key: YANDEX_KEY, text, - lang: original ? `${original}-${target}` : target + lang: base ? `${base}-${target}` : target }); const lang = body.lang.split('-'); const embed = new MessageEmbed() diff --git a/commands/text-edit/yoda.js b/commands/text-edit/yoda.js index 32353ac1..367f3dce 100644 --- a/commands/text-edit/yoda.js +++ b/commands/text-edit/yoda.js @@ -13,11 +13,11 @@ module.exports = class YodaCommand extends Command { args: [ { key: 'sentence', - prompt: 'What text would you like to convert to Yoda speak?', + prompt: 'What sentence would you like to convert to Yoda speak?', type: 'string', validate: sentence => { if (sentence.length < 500) return true; - return 'Please keep text under 500 characters.'; + return 'Invalid sentence, please keep the sentence under 500 characters.'; } } ] diff --git a/commands/text-edit/zalgo.js b/commands/text-edit/zalgo.js index feb3779b..2f80099c 100644 --- a/commands/text-edit/zalgo.js +++ b/commands/text-edit/zalgo.js @@ -15,7 +15,7 @@ module.exports = class ZalgoCommand extends Command { type: 'string', validate: text => { if (text.length < 500) return true; - return 'Please keep text under 500 characters.'; + return 'Invalid text, please keep the text under 500 characters.'; } } ] diff --git a/package.json b/package.json index 6ecf432b..d7b81a67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "38.5.1", + "version": "38.5.2", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {