1
0
Fork 0
mirror of synced 2024-05-19 20:12:30 +12:00

Ensure the channel given exists

This commit is contained in:
Phxntxm 2017-06-15 21:30:12 -05:00
parent d5a5820983
commit df37b78718

View file

@ -60,6 +60,8 @@ class Picarto:
channel_id = self.bot.db.load('server_settings', key=s_id,
pluck='notifications_channel') or int(s_id)
channel = server.get_channel(channel_id)
if channel is None:
channel = server.default_channel
try:
await channel.send(
"{} has just gone live! View their stream at <{}>".format(member.display_name,