mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
Make temmie better
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = class TemmieCommand extends Command {
|
|||||||
prompt: 'What text would you like to convert to Temmie speak?',
|
prompt: 'What text would you like to convert to Temmie speak?',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
validate: text => {
|
validate: text => {
|
||||||
if (wordTrans(text, dictionary).length < 2000) return true;
|
if (this.temmize(text).length < 2000) return true;
|
||||||
return 'Invalid text, your text is too long.';
|
return 'Invalid text, your text is too long.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,13 @@ module.exports = class TemmieCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run(msg, { text }) {
|
run(msg, { text }) {
|
||||||
return msg.say(wordTrans(text, dictionary));
|
return msg.say(this.temmize(text));
|
||||||
|
}
|
||||||
|
|
||||||
|
temmize(text) {
|
||||||
|
return wordTrans(text, dictionary)
|
||||||
|
.replace(/ing/gi, 'in')
|
||||||
|
.replace(/!/g, '!!!!111!1!')
|
||||||
|
.replace(/'/g, '');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "65.1.0",
|
"version": "65.1.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user