sleep remove

This commit is contained in:
deathbybandaid 2019-05-18 20:37:46 -04:00
parent ec82e60d2c
commit fcd34ff4f5
2 changed files with 2 additions and 9 deletions

View File

@ -6,14 +6,11 @@ import sopel.module
from sopel_modules.SpiceBot.Events import botevents
import time
@sopel.module.event(botevents.BOT_WELCOME)
@sopel.module.rule('.*')
def bot_events_Connected(bot, trigger):
"""Here, we wait until we are in at least one channel"""
while not len(bot.channels.keys()):
while not len(bot.channels.keys()) > 0:
pass
time.sleep(1)
botevents.trigger(bot, botevents.BOT_CONNECTED, "Bot Connected to IRC")

View File

@ -12,14 +12,10 @@ from sopel_modules.SpiceBot_SBTools import humanized_time
import time
@sopel.module.event(botevents.BOT_WELCOME)
@sopel.module.event(botevents.BOT_CONNECTED)
@sopel.module.rule('.*')
def bot_startup_monologue_start(bot, trigger):
while not len(bot.channels.keys()):
pass
time.sleep(1)
# Startup
botlogs.log('SpiceBot_StartupMonologue', bot.nick + " is now starting. Please wait while I load my configuration")
bot.osd(" is now starting. Please wait while I load my configuration.", bot.channels.keys(), 'ACTION')