1
1
mirror of https://gitlab.com/ceda_ei/Quadnite-Bot synced 2026-05-06 05:40:04 +02:00

Don't reply if no question exists

This commit is contained in:
2019-02-12 02:03:56 +05:30
parent 2b6837adb5
commit 71809ed109
2 changed files with 19 additions and 14 deletions

View File

@@ -1,7 +1,12 @@
module.exports = (random) =>
random([["Yes", "Yep", "Yeah", "Yus", "Ja", "Ya", "Aye", "Ay", "Oui"],
module.exports = (random) => (ctx) =>
{
const text_array = ctx.message.text.split(" ");
if (text_array.length == 1)
return "You know, you also have to ask the question.";
return random([["Yes", "Yep", "Yeah", "Yus", "Ja", "Ya", "Aye", "Ay", "Oui"],
["No", "Nopes", "Nu", "Nah", "Nein", "Naw", "Nay", "Yesn't"]][Math.round(
Math.random())])();
};