Change some strings

This commit is contained in:
Daniel Odendahl Jr
2017-09-13 02:08:06 +00:00
parent e0b823062d
commit caba065235
32 changed files with 51 additions and 50 deletions
+1 -1
View File
@@ -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.';
}
}
]
+1 -1
View File
@@ -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.';
}
}
]
+1 -1
View File
@@ -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.';
}
}
]
+1 -1
View File
@@ -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.';
}
}
]
+1 -1
View File
@@ -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()
}
+1 -1
View File
@@ -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('')
}
+1 -1
View File
@@ -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()
}
+1 -1
View File
@@ -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.';
}
}
]
+1 -1
View File
@@ -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.';
}
}
]
+2 -2
View File
@@ -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()
}
+1 -1
View File
@@ -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.';
}
}
]
+11 -11
View File
@@ -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()
+2 -2
View File
@@ -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.';
}
}
]
+1 -1
View File
@@ -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.';
}
}
]