Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bot/exts/utils/attachment_pastebin_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ async def on_message(self, message: discord.Message) -> None:
# Send the user a DM with the delete link for the paste.
# The angle brackets around the remove link are required to stop Discord from visiting the URL to produce a
# preview, thereby deleting the paste
await message.author.send(content=f"[Click here](<{paste_response.removal}>) to delete your recent paste.")
try:
await message.author.send(content=f"[Click here](<{paste_response.removal}>) to delete your recent paste.")
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.
await bot_reply.edit(content=f"[Click here]({paste_response.link}) to see this code in our pastebin.")
Expand Down
Loading