mirror of
				https://gitlab.com/ceda_ei/Quadnite-Bot
				synced 2025-10-31 17:20:05 +01:00 
			
		
		
		
	Don't reply if no question exists
This commit is contained in:
		| @@ -12,16 +12,16 @@ module.exports = (bot, [ questions, kys, insults, commands_list ]) => { | ||||
| 	bot.command("kys", (ctx) => ctx.reply(insults_fun(random, kys, default_text("kys", "kill"))(ctx))); | ||||
|  | ||||
| 	bot.command("commands", (ctx) => ctx.reply(commands_list.join("\n"))); | ||||
| 	bot.command("is", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("are", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("can", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("will", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("shall", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("was", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("do", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("does", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("did", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("should", (ctx) => ctx.reply(is(random))); | ||||
| 	bot.command("is", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("are", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("can", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("will", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("shall", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("was", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("do", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("does", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("did", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("should", (ctx) => ctx.reply(is(random)(ctx))); | ||||
| 	bot.command("coin", (ctx) => ctx.reply(random(["Heads", "Tails"])())); | ||||
|  | ||||
| }; | ||||
|   | ||||
| @@ -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())])(); | ||||
|  | ||||
|  | ||||
|  | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user