aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar copilot-swe-agent[bot] <[email protected]>2025-11-02 00:39:27 +0000
committerGravatar copilot-swe-agent[bot] <[email protected]>2025-11-02 00:39:27 +0000
commit76d1d7b39f9ceb968e6d8d8141c9d87eaf45e92c (patch)
tree22b69927dc0cfc97bfbc300d9825c2ccd0bedce5
parentFix paste uploader to handle closed DMs (diff)
Use discord.Forbidden instead of importing Forbiddencopilot/fix-dm-closed-error-handling
Co-authored-by: jb3 <[email protected]>
-rw-r--r--bot/exts/utils/attachment_pastebin_uploader.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/utils/attachment_pastebin_uploader.py b/bot/exts/utils/attachment_pastebin_uploader.py
index 916d60096..eb114faa0 100644
--- a/bot/exts/utils/attachment_pastebin_uploader.py
+++ b/bot/exts/utils/attachment_pastebin_uploader.py
@@ -3,7 +3,6 @@ from __future__ import annotations
import re
import discord
-from discord import Forbidden
from discord.ext import commands
from pydis_core.utils import paste_service
@@ -131,7 +130,7 @@ class AutoTextAttachmentUploader(commands.Cog):
# preview, thereby deleting the paste
try:
await message.author.send(content=f"[Click here](<{paste_response.removal}>) to delete your recent paste.")
- except Forbidden:
+ except discord.Forbidden:
log.debug(f"User {message.author} has DMs disabled, skipping delete link DM.")
# Edit the bot message to contain the link to the paste.