mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
better than endswith for a single char
This commit is contained in:
parent
6772fbc53b
commit
b6f095b8b2
@ -34,7 +34,7 @@ def query_detection(bot, trigger):
|
||||
if com not in commands_list.keys():
|
||||
commands_list[com] = bot.memory['SpiceBot_CommandsQuery']['commands'][commandstype][com]
|
||||
|
||||
if triggercommand.endswith("+"):
|
||||
if triggercommand[:-1] == "+":
|
||||
|
||||
triggercommand = triggercommand[:-1]
|
||||
if not triggercommand or not len(triggercommand):
|
||||
@ -55,7 +55,7 @@ def query_detection(bot, trigger):
|
||||
bot.notice("The following commands match " + str(triggercommand) + ": " + spicemanip.main(validcomlist, 'andlist') + ".", trigger.nick)
|
||||
return
|
||||
|
||||
if triggercommand.endswith("?"):
|
||||
if triggercommand[:-1] == "?":
|
||||
|
||||
triggercommand = triggercommand[:-1]
|
||||
if not triggercommand or not len(triggercommand):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user