mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
sleep remove
This commit is contained in:
parent
ec82e60d2c
commit
fcd34ff4f5
@ -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")
|
||||
|
||||
@ -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')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user