-
-
Notifications
You must be signed in to change notification settings - Fork 731
Handle closed DMs in paste uploader #3434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jb3 <20439493+jb3@users.noreply.github.com>
| import re | ||
|
|
||
| import discord | ||
| from discord import Forbidden |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of specifically importing Forbidden, use discord.Forbidden here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use discord.Forbidden in commit 76d1d7b.
|
@copilot Please address review feedback. |
Co-authored-by: jb3 <20439493+jb3@users.noreply.github.com>
Fix paste uploader to handle when DMs are closed
The fix catches the
discord.Forbiddenexception when a user has DMs disabled and logs the event at debug level, then continues with the paste upload flow by posting the link in the original channel.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.