zaanposni / discord-masz

MASZ is a selfhostable highly sophisticated moderation bot for Discord. Includes a web dashboard and a discord bot.
https://discord.gg/5zjpzw6h3S
Other
71 stars 18 forks source link

Creating cases through Discords Application Commands feature (also using Modals too) #555

Closed UponAnonymous closed 9 months ago

UponAnonymous commented 1 year ago

Using the Discord Application Commands to create cases would be a good addition to MASZ to help get things done quicker, so just the same as when someone reports a user through the message's context menu, there should be moderation commands that can be used in the same context. For example, a moderator can right click a message and click something like "Create Mute Case" where it opens a modal that allows you to type in your reason title and description, the bot would then also use the message you made the case on to be used in the description as evidence.

This could be the same as using the user's context menu (right-clicking on a user), but there won't be any message used for evidence.

A option to add a duration could also be implemented as well.

FlixProd commented 1 year ago

I really like the idea of attaching a message as evidence to a case! And the context menu I think would be really helpful, because you don't have to type the name out in the Slash command (difficult especially when there are multiple users with the same name or when it's hard to spell because of zalgo text).

zaanposni commented 1 year ago

Currently discord modals do not support checkboxes so the information MASZ needs can not be submitted correctly:

To ensure completeness of MASZ' case creation I would like to delay this feature until there are more options available.

when it's hard to spell because of zalgo text @FlixProd you can use IDs as well for now :)

For the message evidence part:

This could be done similar to the linked case stuff. MASZ could display it as "verified message report" or something like that to confirm authenticity. However, this is a seperate issue, I will create a new one for it... ->#562

Simply-Cods commented 1 year ago

Could work on this if it's not claimed already, but I have a couple of questions/clarifications first.

  1. I'm guessing there would be no case template functionality. Unless Discord allows bots to edit modals they sent. In a world full of insane people I can see a solution to this though. On interaction the bot could send a string select containing the available templates. Once the user picks their desired template the bot would send a 2nd modal for the actual case creations filled in with the default values defined by the chosen template. Hypothetically it is possible, but also if someone wants to use templates they can just use the dashboard.
  2. My solution for checkbox support would be to have a string select field with the notification options listed there instead.
  3. Labels are an interesting challenge, because they are both a select field and a text field. I'm unsure what the best solution would be because Discord definitely doesn't support something so complex.
  4. File upload is obviously out of the question.
  5. I would probably make the context menu for the user and the slash command, because message reports are a separate issue as stated previously here.
zaanposni commented 1 year ago

As discussed in Discord we are currently limited by Discord here, so this issue is blocked until there are more options available in modals.

zaanposni commented 9 months ago

implemented in 3.6.0 although fairly limited

grafik