aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-11-27 00:20:54 +0000
committerGravatar Chris Lovering <[email protected]>2023-11-27 00:20:54 +0000
commitb724013adcc807c8f154cc5816c221dcdc852e78 (patch)
tree12b1f9d9610b68c284c30256ebde6ed056e3732b
parentDon't shadow user object with dict when searching for infractions (diff)
Use async context manager for asyncio timeout
Solves BOT-3P1
-rw-r--r--bot/exts/backend/branding/_cog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/backend/branding/_cog.py b/bot/exts/backend/branding/_cog.py
index b1d11157c..6472a477c 100644
--- a/bot/exts/backend/branding/_cog.py
+++ b/bot/exts/backend/branding/_cog.py
@@ -157,7 +157,7 @@ class Branding(commands.Cog):
timeout = 10 # Seconds.
try:
- with asyncio.timeout(timeout): # Raise after `timeout` seconds.
+ async with asyncio.timeout(timeout): # Raise after `timeout` seconds.
await pydis.edit(**{asset_type.value: file})
except discord.HTTPException:
log.exception("Asset upload to Discord failed.")