Skip to content

Commit

Permalink
discord: Wait for notification message to be sent before proceeding
Browse files Browse the repository at this point in the history
This might be a bit hacky.
  • Loading branch information
OatmealDome committed Dec 24, 2024
1 parent 2fc696c commit ff1ab65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion central/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def send_notification(self, message):

for channel_id in self.cfg.channels:
channel = self.get_channel(channel_id)
asyncio.run_coroutine_threadsafe(channel.send(stripped_msg), self.loop)
f = asyncio.run_coroutine_threadsafe(channel.send(stripped_msg), self.loop)
f.result()

async def on_message(self, message):
if message.author == self.user or not self.user.mentioned_in(message):
Expand Down

0 comments on commit ff1ab65

Please sign in to comment.