mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
add lower
This commit is contained in:
parent
a3b2d4250e
commit
23404108f6
@ -44,9 +44,10 @@ def query_detection(bot, trigger):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if triggercommand not in commands_list.keys():
|
if triggercommand not in commands_list.keys():
|
||||||
|
dispmsg = ["Cannot find any alias commands: No valid commands match " + str(triggercommand) + "."]
|
||||||
closestmatches = similar_list(bot, triggercommand, commands_list.keys(), 10, 'reverse')
|
closestmatches = similar_list(bot, triggercommand, commands_list.keys(), 10, 'reverse')
|
||||||
dispmsg = ["Cannot find any alias commands: No valid commands match " + str(triggercommand) + ".",
|
if len(closestmatches):
|
||||||
"The following commands match " + str(triggercommand) + ": " + spicemanip.main(closestmatches, 'andlist') + "."]
|
dispmsg.append("The following commands match " + str(triggercommand) + ": " + spicemanip.main(closestmatches, 'andlist') + ".")
|
||||||
bot.notice(dispmsg, trigger.nick)
|
bot.notice(dispmsg, trigger.nick)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ def query_detection(bot, trigger):
|
|||||||
|
|
||||||
commandlist = []
|
commandlist = []
|
||||||
for command in commands_list.keys():
|
for command in commands_list.keys():
|
||||||
if command.lower().startswith(triggercommand):
|
if command.lower().startswith(str(triggercommand).lower()):
|
||||||
commandlist.append(command)
|
commandlist.append(command)
|
||||||
|
|
||||||
if not len(commandlist):
|
if not len(commandlist):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user