Raw trigger JSON

It would be possible to add an output for the Discord triggered events that provides the raw JSON for the event. For example, when a slash command is used there is a lot of information (some more useful in certain cases than others) relating to the Eve citing user that would prevent the need for sending a Get Server Member request or with the message sent trigger, we can parse out the user/role mentions without sending a request to /channels/{channel_id}/messages/{message_id} and parsing it that way. It would also help with sending modals for ephemeral messages as we would t need to get the message through the webhook endpoint which needs a defer and is counted as a response making it so we can’t reply with a modal to those cases (useful in field counting and message editing)

Also on this topic, different user modes which adds certain variables such as Returned JSON and a few others for more advanced users, while not letting it mess with newer or less advanced users

This is planned but needs to be added to every block and trigger manually, which is why it hasn’t happened yet.

Also, it would be a re-serialization (for a number of reasons) and therefore wouldn’t exactly match Discord’s schema, so documenting that is also a potential concern.

How close do you think you can get to the Discord schema for reproducing the JSON trigger?

This would be insanely useful for really anything more advanced with messages and make logging soooo much easier and more efficent

It’ll be extremely close. The only differences will be missing fields for newer features that aren’t currently replicated in our internal data model.

Would message type, attachments, and components be available as printed in the Discord dev portal?
Same with the sender data?

Not sure, you can check the discordgo struct definitions yourself here:

Inventor makes some minor modifications but for the most part event data would be provided from those structs as written.