Added a check to make sure the server is found, as now that the bot is sharded we may not detect the correct server
This commit is contained in:
parent
6de4800e54
commit
8bd014a345
|
@ -63,6 +63,8 @@ class Picarto:
|
|||
for server_id in r['servers']:
|
||||
# Get the channel to send the message to, based on the saved alert's channel
|
||||
server = self.bot.get_server(server_id)
|
||||
if server is None:
|
||||
continue
|
||||
server_alerts = await config.get_content('server_alerts')
|
||||
channel_id = server_alerts.get(server_id) or server_id
|
||||
channel = self.bot.get_channel(channel_id)
|
||||
|
@ -82,6 +84,8 @@ class Picarto:
|
|||
for server_id in r['servers']:
|
||||
# Get the channel to send the message to, based on the saved alert's channel
|
||||
server = self.bot.get_server(server_id)
|
||||
if server is None:
|
||||
continue
|
||||
server_alerts = await config.get_content('server_alerts')
|
||||
channel_id = server_alerts.get(server_id) or server_id
|
||||
channel = self.bot.get_channel(channel_id)
|
||||
|
|
|
@ -53,6 +53,8 @@ class Twitch:
|
|||
for server_id in r['servers']:
|
||||
# Get the channel to send the message to, based on the saved alert's channel
|
||||
server = self.bot.get_server(server_id)
|
||||
if server is None:
|
||||
continue
|
||||
server_alerts = await config.get_content('server_alerts')
|
||||
channel_id = server_alerts.get(server_id) or server_id
|
||||
channel = self.bot.get_channel(channel_id)
|
||||
|
@ -72,6 +74,8 @@ class Twitch:
|
|||
for server_id in r['servers']:
|
||||
# Get the channel to send the message to, based on the saved alert's channel
|
||||
server = self.bot.get_server(server_id)
|
||||
if server is None:
|
||||
continue
|
||||
server_alerts = await config.get_content('server_alerts')
|
||||
channel_id = server_alerts.get(server_id) or server_id
|
||||
channel = self.bot.get_channel(channel_id)
|
||||
|
|
Loading…
Reference in a new issue