print a different message if already subscribed

This commit is contained in:
Ben Harris 2020-07-13 12:04:37 -04:00
parent 369ccd3c53
commit 0614163017
1 changed files with 9 additions and 6 deletions

View File

@ -216,8 +216,9 @@ class Module(ModuleManager.BaseModule):
if not nick in subs:
subs.append(nick)
self.bot.set_setting("tilderadio-subscriptions", subs)
event["stdout"].write("i'll send you a message when a dj goes online")
event["stdout"].write("i'll send you a message when a dj goes online")
else:
event["stdout"].write("you're already subscribed!")
@utils.hook("received.command.unsubscribe")
@utils.kwarg("help", "unsubscribe from dj announcements")
@ -226,8 +227,9 @@ class Module(ModuleManager.BaseModule):
if nick in subs:
subs.remove(nick)
self.bot.set_setting("tilderadio-subscriptions", subs)
event["stdout"].write("ok, i'll no longer send you dj announcements")
event["stdout"].write("ok, i'll no longer send you dj announcements")
else:
event["stdout"].write("you weren't subscribed. unable to remove")
@utils.hook("received.command.emailsubscribe")
@utils.kwarg("help", "sign up to get an email when a dj goes online")
@ -262,8 +264,9 @@ class Module(ModuleManager.BaseModule):
if nick in subs:
subs.pop(nick)
self.bot.set_setting("tilderadio-email-subscriptions", subs)
event["stdout"].write("ok i'll stop sending you emails")
event["stdout"].write("ok i'll stop sending you emails")
else:
event["stdout"].write("you weren't subscribed. unable to remove")
@utils.hook("received.command.dj")
@utils.kwarg("help", "check if someone is currently streaming")