diff options
author | 2023-11-27 00:20:54 +0000 | |
---|---|---|
committer | 2023-11-27 00:20:54 +0000 | |
commit | b724013adcc807c8f154cc5816c221dcdc852e78 (patch) | |
tree | 12b1f9d9610b68c284c30256ebde6ed056e3732b | |
parent | Don'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.py | 2 |
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.") |