Create new async task for sending out messages to not block API updates in the meantime
This commit is contained in:
GaMeNu 2023-10-25 21:49:17 +03:00
parent 1d34f156c1
commit 7615b9b8ce

View File

@ -320,6 +320,9 @@ class Notificator(commands.Cog):
else:
embed_ls.append(AlertEmbed.auto_alert(alert_data, district))
asyncio.create_task(self.send_alerts_to_channels(embed_ls))
async def send_alerts_to_channels(self, embed_ls):
for channel_tup in self.db.get_all_channels():
channel = Channel.from_tuple(channel_tup)
if channel.server_id is not None: