From 0614163017acbd793a3f54a0d463d6502e9ba5b4 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 13 Jul 2020 12:04:37 -0400 Subject: [PATCH] print a different message if already subscribed --- tilderadio.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tilderadio.py b/tilderadio.py index ec8b5af..9a40c1f 100644 --- a/tilderadio.py +++ b/tilderadio.py @@ -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")