mirror of
https://github.com/GaMeNu/HFCNotificator.git
synced 2024-11-16 15:24:51 +02:00
v2.2.3
Create new async task for sending out messages to not block API updates in the meantime
This commit is contained in:
parent
1d34f156c1
commit
7615b9b8ce
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user