Skip to content

Commit

Permalink
Potentially fixed asyncio error about unhandled SystemExit exception …
Browse files Browse the repository at this point in the history
…in an async task
  • Loading branch information
tayler6000 committed Jul 2, 2023
1 parent 2bcbfdc commit baf034f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/notify-discord-stampy-offline.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import discord
from git import Repo, cmd
from structlog import get_logger
from config import bot_private_channel_id
from config import discord_token
from git import cmd, Repo
from structlog import get_logger
import discord

intents = discord.Intents.default()
client = discord.Client(intents=intents)
Expand All @@ -29,7 +29,7 @@ async def on_ready():
if bot_private_channel_id:
await client.get_channel(int(bot_private_channel_id)).send(message)
log.info("notify_discord_script", status="COMPLETE")
exit()
await client.close()


client.run(discord_token)

0 comments on commit baf034f

Please sign in to comment.