1
0
Fork 0
mirror of synced 2024-05-18 19:42:28 +12:00

Handle default channel no longer existing

This commit is contained in:
phxntxm 2017-09-13 03:47:29 -05:00
parent b8153756d4
commit 8a6ec4e681
2 changed files with 8 additions and 2 deletions

View file

@ -111,7 +111,10 @@ class Picarto:
# If it is has been overriden by picarto notifications setting, use this
channel_id = notifications.get('picarto') or default_channel_id
# Now get the channel
channel = server.get_channel(int(channel_id))
if channel_id:
channel = server.get_channel(int(channel_id))
else:
continue
# Then just send our message
try:

View file

@ -123,7 +123,10 @@ class Twitch:
# If it is has been overriden by twitch notifications setting, use this
channel_id = notifications.get('twitch') or default_channel_id
# Now get the channel
channel = server.get_channel(int(channel_id))
if channel_id:
channel = server.get_channel(int(channel_id))
else:
continue
# Then just send our message
try: