Fix false error message when deleting reminders with duplicate IDs#3500
Open
oliveman-au wants to merge 1 commit intopython-discord:mainfrom
Open
Fix false error message when deleting reminders with duplicate IDs#3500oliveman-au wants to merge 1 commit intopython-discord:mainfrom
oliveman-au wants to merge 1 commit intopython-discord:mainfrom
Conversation
Author
lemonsaurus
approved these changes
Apr 25, 2026
Member
lemonsaurus
left a comment
There was a problem hiding this comment.
one-liner fix, code looks good, you've proven it's a real bug, even added a screenshot of the bug being reproduced - nice! Good PR. Thanks for the contribution! 👍🏼
jb3
requested changes
Apr 25, 2026
Member
jb3
left a comment
There was a problem hiding this comment.
We should reuse the already created set from earlier in the command, that's going to be a cleaner solution here and avoids a set creation twice for the same list (and solves other issues like how passing the same reminder ID in would go above the 5 reminder limit, even if it's the same reminder).
I suggest instead you do the set conversion earlier in the command (pretty much the first thing) and replace subsequent set(ids) invocations with that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When running
!remind deletewith duplicate IDs (e.g.!remind delete 123 123 123), the reminder is deleted successfully but the bot incorrectly shows "The other reminder(s) could not be deleted as they're either locked, belong to someone else, or don't exist."This happens because the check compares
len(deleted_ids)againstlen(ids), but the loop iterates overset(ids)to deduplicate. So passing 3 identical IDs results in 1 deletion butlen(ids)is still 3, making it look like 2 failed.Fixed by comparing against
len(set(ids))instead, which matches what was actually attempted.