Java-Discord / JavaBot

General utility bot for the Discord Java Community
https://discordjug.net/
GNU General Public License v3.0
48 stars 22 forks source link

restrict closing of posts by non-original posters #474

Closed danthe1st closed 9 months ago

danthe1st commented 10 months ago

This PR adds the following restrictions when users other than the original poster close help posts:

This does not affect users closing their own posts.

Log message: grafik Closing without specifying a reason: grafik Closing using buttons (same message if user has permissions to mod-close the post or doesn't have these permissions): grafik

danthe1st commented 10 months ago

This looks good in general, however, I think that displaying a modal when somebody tries to close a help post from another user which is non staff is better because since the field isn't required by discord, they probably won't supply a reason at the first time. That means the command would always has to be run twice. Another reason is that the reason field may get confused because it "technically" has different use cases between certified helpers, mods, and OPs.

I'm aware these are just accessibility improvements, but I think this is worth a discussion.

To be honest, the original poster supplying a reason is fairly pointless.

While a modal would be possible, I don't see much of a difference since people can just type the command again.

liquiddevelopmentnet commented 10 months ago

This looks good in general, however, I think that displaying a modal when somebody tries to close a help post from another user which is non staff is better because since the field isn't required by discord, they probably won't supply a reason at the first time. That means the command would always has to be run twice. Another reason is that the reason field may get confused because it "technically" has different use cases between certified helpers, mods, and OPs. I'm aware these are just accessibility improvements, but I think this is worth a discussion.

To be honest, the original poster supplying a reason is fairly pointless.

While a modal would be possible, I don't see much of a difference since people can just type the command again.

As i said, mainly accessibility , your decision in the end

danthe1st commented 10 months ago

This looks good in general, however, I think that displaying a modal when somebody tries to close a help post from another user which is non staff is better because since the field isn't required by discord, they probably won't supply a reason at the first time. That means the command would always has to be run twice. Another reason is that the reason field may get confused because it "technically" has different use cases between certified helpers, mods, and OPs. I'm aware these are just accessibility improvements, but I think this is worth a discussion.

To be honest, the original poster supplying a reason is fairly pointless. While a modal would be possible, I don't see much of a difference since people can just type the command again.

As i said, mainly accessibility , your decision in the end

This is now implemented. Closing (posts of other people) via buttons is still disabled in order to make it "easier" to look whether closing the post would interrupt someone helping.

Also, I have configured the modal to require at least 11 characters in order to prevent overly lazy texts (e.g. JavaScript since that's not really informative to the author). This restriction is also in place for the unreserve command (except for the OP).