mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
shutdown method breaks
This commit is contained in:
parent
f65212c2c3
commit
e54e3666dd
@ -50,7 +50,8 @@ def bot_events_connected(bot, trigger):
|
|||||||
|
|
||||||
bot_events_setup_check(bot)
|
bot_events_setup_check(bot)
|
||||||
|
|
||||||
while 'SpiceBot_Events' in bot.memory:
|
while True:
|
||||||
|
try:
|
||||||
if len(bot.memory['SpiceBot_Events']["queue"]):
|
if len(bot.memory['SpiceBot_Events']["queue"]):
|
||||||
number = bot.memory['SpiceBot_Events']["queue"][0]["number"]
|
number = bot.memory['SpiceBot_Events']["queue"][0]["number"]
|
||||||
message = bot.memory['SpiceBot_Events']["queue"][0]["message"]
|
message = bot.memory['SpiceBot_Events']["queue"][0]["message"]
|
||||||
@ -60,6 +61,8 @@ def bot_events_connected(bot, trigger):
|
|||||||
)
|
)
|
||||||
bot.dispatch(pretrigger)
|
bot.dispatch(pretrigger)
|
||||||
del bot.memory['SpiceBot_Events']["queue"][0]
|
del bot.memory['SpiceBot_Events']["queue"][0]
|
||||||
|
except KeyError:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.event('1004')
|
@sopel.module.event('1004')
|
||||||
|
|||||||
@ -53,10 +53,13 @@ def join_log_channel(bot, trigger):
|
|||||||
|
|
||||||
bot_logs_setup_check(bot)
|
bot_logs_setup_check(bot)
|
||||||
|
|
||||||
while 'SpiceBot_Logs' in bot.memory:
|
while True:
|
||||||
|
try:
|
||||||
if len(bot.memory['SpiceBot_Logs']["queue"]):
|
if len(bot.memory['SpiceBot_Logs']["queue"]):
|
||||||
bot.say(str(bot.memory['SpiceBot_Logs']["queue"][0]), channel)
|
bot.say(str(bot.memory['SpiceBot_Logs']["queue"][0]), channel)
|
||||||
del bot.memory['SpiceBot_Logs']["queue"][0]
|
del bot.memory['SpiceBot_Logs']["queue"][0]
|
||||||
|
except KeyError:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
@sopel.module.event('2004')
|
@sopel.module.event('2004')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user