release notes test

This commit is contained in:
deathbybandaid 2019-09-23 12:17:32 -04:00
parent 8b410b51f7
commit 4cf4f5ceee
2 changed files with 15 additions and 0 deletions

View File

@ -107,6 +107,7 @@ def setup_startupmonologue(bot):
botevents.BOT_STARTUPMONOLOGUE_COMMANDS,
botevents.BOT_STARTUPMONOLOGUE_AI,
botevents.BOT_STARTUPMONOLOGUE_VERSION,
botevents.BOT_STARTUPMONOLOGUE_RNOTES,
])

View File

@ -67,6 +67,20 @@ def bot_startup_monologue_ai(bot, trigger):
SpiceBot.events.trigger(bot, SpiceBot.events.BOT_STARTUPMONOLOGUE_AI, "SpiceBot_StartupMonologue")
@sopel.module.event(SpiceBot.events.BOT_READY)
@sopel.module.rule('.*')
def bot_startup_monologue_releasenotes(bot, trigger):
newnotes = False
for notefile in list(SpiceBot.releasenotes.notes.keys()):
if len(SpiceBot.releasenotes.notes[notefile]["new"]):
newnotes = True
if newnotes:
displayval = "Check Release Notes for News"
SpiceBot.startupmonologue.dict["releasenotes"] = displayval
SpiceBot.logs.log('SpiceBot_StartupMonologue', displayval)
SpiceBot.events.trigger(bot, SpiceBot.events.BOT_STARTUPMONOLOGUE_RNOTES, "SpiceBot_StartupMonologue")
@sopel.module.event(SpiceBot.events.BOT_LOADED)
@sopel.module.rule('.*')
def bot_startup_monologue_display(bot, trigger):