1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Use get in case a notification channel is not set

This commit is contained in:
Phxntxm 2017-03-11 21:35:48 -06:00
parent e3e1474d38
commit 9311ac78a6

View file

@ -59,7 +59,7 @@ class StatsUpdate:
try:
join_leave_on = server_settings['join_leave']
if join_leave_on:
channel_id = server_settings['notification_channel'] or member.guild.id
channel_id = server_settings.get('notification_channel') or member.guild.id
else:
return
except (IndexError, TypeError, KeyError):
@ -75,7 +75,7 @@ class StatsUpdate:
try:
join_leave_on = server_settings['join_leave']
if join_leave_on:
channel_id = server_settings['notification_channel'] or member.guild.id
channel_id = server_settings.get('notification_channel') or member.guild.id
else:
return
except (IndexError, TypeError, KeyError):