-
-
Notifications
You must be signed in to change notification settings - Fork 247
Make deleting a bookmark a context menu command #1197
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
This might be better served with another application command, similar to how we changed the main bookmark command to one. We can also deprecate the existing text command that way too. If we make this delete command a global command, we can remove perms for people to run it in-server so it will only appear in DMs. |
Humm I see, just like the perms issue that happened for some people with the new bookmark command? That's a good idea. |
That's neat. Alright, sounds pretty good! |
You can set it in-app using this
We'd likely still want a check to make sure a user isn't deleting a message in-guild though, just to be sure. |
bdc0a29
to
d2f9bc4
Compare
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.
Just a singular comment. Besides that, original functionality is in place, very nice.
a6fe30a
to
ff711e5
Compare
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.
yuh
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
bot/exts/utilities/bookmark.py:128
- [nitpick] Consider specifying a guild parameter when adding the delete bookmark context menu command for consistency with the bookmark context menu command, if that is intended.
self.bot.tree.add_command(self.delete_bookmark_context_menu)
bot/exts/utilities/bookmark.py:271
- [nitpick] Consider comparing channels directly (e.g. 'if target_message.channel != channel') to improve readability and clarity.
if target_message.channel.id != channel.id:
if target_message is None: | ||
raise commands.UserInputError("You must reply to the message from Sir-Lancebot you wish to delete.") | ||
|
||
if not isinstance(ctx.channel, discord.DMChannel): | ||
if not isinstance(channel, discord.DMChannel): | ||
raise commands.UserInputError("You can only run this command your own DMs!") |
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.
Update the error message to include 'in' for clarity, e.g., 'You can only run this command in your own DMs!'.
raise commands.UserInputError("You can only run this command your own DMs!") | |
raise commands.UserInputError("You can only run this command in your own DMs!") |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Closes #1196
The change is pretty similar to the bookmark one, and makes it more intuitive to delete a book mark straight from the DMs using a context menu command