Skip to content

Conversation

@semper-lux
Copy link
Contributor

Resolves #86

Creates new acl action manage_reminders. Users with the acl corresponding to this action (likely should be the minimods acl) will be able to remove other user's reminders. Users without that acl will only be able to remove their own, once the reminder remove command is returned to the reminders acl.

"""Delete a reminder."""
async with sessionmaker() as session:
if reminder := await session.get(Reminder, id):
# Checking if reminder creator and author are different users
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is just repeating what the code directly next to it is saying. Comments are for explaining long-distance interactions or large-scale architecture in the code. A better comment would be:

# To remove another user's reminders you need elevated permissions

Copy link
Contributor Author

@semper-lux semper-lux Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure this needed any commenting, to be honest; I will update to your suggestion!
Done: b57f0cf

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say no comment is needed at all, but I'm also famously leaving way too few comments, so...

@semper-lux semper-lux merged commit 44adbc3 into discord-math:main Oct 24, 2025
2 checks passed
semper-lux added a commit to semper-lux/mathcordbot-dani that referenced this pull request Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better ACL scoping for reminder plugin commands

2 participants