mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
fix
This commit is contained in:
parent
2d59d187a7
commit
86ff8547bd
@ -62,8 +62,21 @@ def bot_command_damnlazy_b(bot, trigger):
|
||||
@sopel.module.nickname_commands('(.*)')
|
||||
def bot_command_nick(bot, trigger):
|
||||
|
||||
triggerargs, triggercommand, fulltrigger, canrun = bot_command_nick_setup(bot, trigger)
|
||||
if not canrun:
|
||||
while not bot_events_check(bot, ['1004', '2002']):
|
||||
pass
|
||||
|
||||
triggerargs, triggercommand = sopel_triggerargs(bot, trigger, 'nickname_command')
|
||||
|
||||
if not triggercommand:
|
||||
return
|
||||
|
||||
if triggercommand in bot.memory['SpiceBot_CommandsQuery']['commands']["nickname"].keys():
|
||||
return
|
||||
triggerargs.insert(0, triggercommand)
|
||||
|
||||
fulltrigger = spicemanip.main(triggerargs, 0).lower()
|
||||
|
||||
if fulltrigger in bot.memory['SpiceBot_CommandsQuery']['nickrules']:
|
||||
return
|
||||
|
||||
if fulltrigger.lower().startswith("what is"):
|
||||
@ -198,27 +211,3 @@ def bot_command_nick(bot, trigger):
|
||||
else:
|
||||
bot.osd("I don't know what you are asking me to do!")
|
||||
return
|
||||
|
||||
|
||||
def bot_command_nick_setup(bot, trigger):
|
||||
|
||||
while not bot_events_check(bot, ['1004', '2002']):
|
||||
pass
|
||||
|
||||
canrun = True
|
||||
|
||||
triggerargs, triggercommand = sopel_triggerargs(bot, trigger, 'nickname_command')
|
||||
|
||||
if not triggercommand:
|
||||
return '', '', '', False
|
||||
|
||||
if triggercommand in bot.memory['SpiceBot_CommandsQuery']['commands']["nickname"].keys():
|
||||
return
|
||||
triggerargs.insert(0, triggercommand)
|
||||
|
||||
fulltrigger = spicemanip.main(triggerargs, 0).lower()
|
||||
|
||||
if fulltrigger in bot.memory['SpiceBot_CommandsQuery']['nickrules']:
|
||||
return '', '', '', False
|
||||
|
||||
return triggerargs, triggercommand, fulltrigger, canrun
|
||||
|
||||
Loading…
Reference in New Issue
Block a user