JohnnyJayJay / instant-poll

A Discord bot that lets you create polls in your server
MIT License
42 stars 9 forks source link

Make closing polls only available to admins #13

Open slendyduck opened 2 years ago

slendyduck commented 2 years ago

I think that polls should have an option to be only closed by administrators. I think leaving the default option is no problem, but I think that adding admin perms as an optional toggle would be nice.

JohnnyJayJay commented 2 years ago

Do you mean only admins, not even the poll creator? Or including the poll creator?

I can see this being an option with a set of choices for minimum required privileges needed to close a poll, but I don't really see what it would be useful for. Could you give me a use case/why someone might need to set it to admin-only?

slendyduck commented 2 years ago

Sorry for the late response, been meaning to reply to this.

With my server, everyone has base moderator permissions. I don't expect you to make an exception just for me, however; I think that sometimes, having a mode where only the admin can delete the poll could be useful. If perhaps an admin is posting an important poll, a moderator could close it on accident or on purpose without permission.

Having Admin-only permissions would allow polls only to be closed in a worst-case scenario, and since Admins are expected to be only given to people in the community that are trusted, they wouldn't abuse this power.

Just a thought. Up to you, but I would find it useful for myself at least since my friends who have base moderator perms often closed my own polls!

JohnnyJayJay commented 2 years ago

I could add an option close-role where you can enter a role that is required to close a poll (overriding the default "can delete messages" check). That wouldn't be much additional effort. Would that work for you?