mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 08:22:22 +02:00
Node 15
This commit is contained in:
@@ -14,7 +14,7 @@ module.exports = class ClapCommand extends Command {
|
||||
prompt: 'What 👏 text 👏 would 👏 you 👏 like 👏 to 👏 convert?',
|
||||
type: 'string',
|
||||
validate: text => {
|
||||
if (text.replace(/ /g, ' 👏 ').length < 2000) return true;
|
||||
if (text.replaceAll(' ', ' 👏 ').length < 2000) return true;
|
||||
return 'Invalid text, your text is too long.';
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,6 @@ module.exports = class ClapCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { text }) {
|
||||
return msg.say(text.replace(/ /g, ' 👏 '));
|
||||
return msg.say(text.replaceAll(' ', ' 👏 '));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,14 +20,14 @@ module.exports = class LatlmesCommand extends Command {
|
||||
prompt: 'What section of the news should the link display?',
|
||||
type: 'string',
|
||||
max: 100,
|
||||
parse: query => encodeURIComponent(query.replace(/ /g, '-').toLowerCase())
|
||||
parse: query => encodeURIComponent(query.replaceAll(' ', '-').toLowerCase())
|
||||
},
|
||||
{
|
||||
key: 'query',
|
||||
prompt: 'What would you like the link to display as?',
|
||||
type: 'string',
|
||||
max: 500,
|
||||
parse: query => encodeURIComponent(query.replace(/ /g, '-').toLowerCase())
|
||||
parse: query => encodeURIComponent(query.replaceAll(' ', '-').toLowerCase())
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -23,6 +23,6 @@ module.exports = class SnakeSpeakCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { text }) {
|
||||
return msg.say(text.replace(/s/gi, 'sssss'));
|
||||
return msg.say(text.replaceAll('s', 'sssss').replaceAll('S', 'SSSSS'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -42,8 +42,9 @@ module.exports = class TemmieCommand extends Command {
|
||||
|
||||
temmize(text) {
|
||||
return wordTrans(text, dictionary)
|
||||
.replace(/ing/gi, 'in')
|
||||
.replace(/!/g, '!!!!111!1!')
|
||||
.replace(/'/g, '');
|
||||
.replaceAll('ing', 'in')
|
||||
.replaceAll('ING', 'IN')
|
||||
.replaceAll('!', '!!!!111!1!')
|
||||
.replaceAll('\'', '');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user