discord-csharp / MODiX

Discord Bot handling basic moderation needs, soon implements statistics.
MIT License
114 stars 63 forks source link

Migrate promotions to slash commands/components #991

Closed Scott-Caldwell closed 1 year ago

Scott-Caldwell commented 1 year ago

Additionally:

/promotions

image

Approve and Oppose both open a modal window allowing you to write a comment to include with your vote, but the comment is optional and users can just click the Submit button if they want to leave a blank comment.

image

Change comment opens the same modal (populated with the user's existing comment text, if there is any). Users are required to either Approve or Oppose before they can use Change comment.

The Approve, Oppose, Change comment, and Refresh buttons all cause the embed to refresh with the latest vote data and, if the campaign is closed, whether the campaign was accepted or rejected. When an embed for a closed campaign is refreshed, the buttons will be removed from the embed.

/promotions-nominate <user>

image

Clicking Confirm opens a comment modal window that functions similarly to the comment modal used while voting. Completing the modal will finalize the nomination. Once the nomination is finalized, Modix's response to the command is edited to display an embed and buttons identical to the embed and buttons displayed for the /promotions command.

After 30 seconds, or if the command user clicks the Cancel button, the confirmation dialog is updated to "❌ Canceled." and the buttons are removed.

/promotions-accept <campaign-id>

No longer has a "force" parameter. If 48 hours have passed since the campaign was created, the campaign will be accepted right away. If 48 hours have not passed since the campaign was created, a confirmation dialog will be displayed.

image

If Confirm is selected, the promotion will be accepted. If 30 seconds elapse, or if the command user clicks the Cancel button, the confirmation dialog is updated to "❌ Canceled." and the buttons are removed.

/promotions-reject <campaign-id>

Similar to the existing !promotions reject <campaign-id> command, immediately rejects the campaign, regardless of when the campaign was created.