From 76d1d7b39f9ceb968e6d8d8141c9d87eaf45e92c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:39:27 +0000 Subject: Use discord.Forbidden instead of importing Forbidden Co-authored-by: jb3 <20439493+jb3@users.noreply.github.com> --- bot/exts/utils/attachment_pastebin_uploader.py | 3 +-- 1 file changed, 1 insertion(+), 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. -- cgit v1.2.3