monologue

This commit is contained in:
deathbybandaid 2019-07-16 14:30:30 -04:00
parent ef13e7b605
commit 9a82cdef88
3 changed files with 5 additions and 6 deletions

View File

@ -103,7 +103,7 @@ def setup_startupmonologue(bot):
botevents.BOT_STARTUPMONOLOGUE_CHANNELS,
botevents.BOT_STARTUPMONOLOGUE_COMMANDS,
botevents.BOT_STARTUPMONOLOGUE_AI,
botevents.BOT_STARTUPMONOLOGUE_SOPEL_VERSION,
botevents.BOT_STARTUPMONOLOGUE_VERSION,
])

View File

@ -20,5 +20,6 @@ def nickname_comand_version(bot, trigger, botcom):
fulldisp.append(displayval)
# SpiceBot
fulldisp.append("I am running Sopel " + str(SpiceBot.version.spicebot["version_local_num"]))
bot.osd(fulldisp)

View File

@ -22,11 +22,9 @@ def bot_startup_monologue_start(bot, trigger):
@sopel.module.event(SpiceBot.events.BOT_CONNECTED)
@sopel.module.rule('.*')
def bot_startup_monologue_sopel_version(bot, trigger):
SpiceBot.events.trigger(bot, SpiceBot.events.BOT_STARTUPMONOLOGUE_SOPEL_VERSION, "SpiceBot_StartupMonologue")
displayval = "I am running Sopel " + str(SpiceBot.version.sopel["version_local_num"])
if SpiceBot.version.sopel["version_local"] < SpiceBot.version.sopel["version_online"]:
displayval += " Update Available to " + SpiceBot.version.sopel["version_online_num"]
SpiceBot.startupmonologue.dict["sopel_version"] = displayval
SpiceBot.events.trigger(bot, SpiceBot.events.BOT_STARTUPMONOLOGUE_VERSION, "SpiceBot_StartupMonologue")
SpiceBot.startupmonologue.dict["sopel_version"] = "Sopel " + str(SpiceBot.version.sopel["version_local_num"])
SpiceBot.startupmonologue.dict["sopel_version"] = "SpiceBot " + str(SpiceBot.version.spicebot["version_local_num"])
@sopel.module.event(SpiceBot.events.BOT_CHANNELS)