From 5afeb2f3f67296dedb16ca2045a5ebfbcdf006df Mon Sep 17 00:00:00 2001 From: khuxkm fbexl Date: Mon, 18 Nov 2019 19:09:18 -0500 Subject: [PATCH] Don't request a generator if you know it won't exist --- commands/generate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/generate.py b/commands/generate.py index cacfdbb..efc03fc 100644 --- a/commands/generate.py +++ b/commands/generate.py @@ -33,6 +33,7 @@ GENERATORS = utils.LazyLoadedDict(get_generator) def generate(bot,channel,nick,generator,count="1"): if generator not in GENERATORS_LIST: bot.say(channel,"{}: Invalid generator!".format(nick)) + return count = int(count) res = [GENERATORS[generator]() for x in range(count)] if generator!="idea":