Handle default channel no longer existing
This commit is contained in:
parent
b8153756d4
commit
8a6ec4e681
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue