Add User to Interaction

This commit is contained in:
Carson Hoffman 2021-03-12 09:45:35 -05:00
parent 37088aefec
commit ba10a00fbc
No known key found for this signature in database
GPG key ID: 05B660CB452C657F

View file

@ -73,9 +73,20 @@ type Interaction struct {
Data ApplicationCommandInteractionData `json:"data"`
GuildID string `json:"guild_id"`
ChannelID string `json:"channel_id"`
Member *Member `json:"member"`
Token string `json:"token"`
Version int `json:"version"`
// The member who invoked this interaction.
// NOTE: this field is only filled when the slash command was invoked in a guild;
// if it was invoked in a DM, the `User` field will be filled instead.
// Make sure to check for `nil` before using this field.
Member *Member `json:"member"`
// The user who invoked this interaction.
// NOTE: this field is only filled when the slash command was invoked in a DM;
// if it was invoked in a guild, the `Member` field will be filled instead.
// Make sure to check for `nil` before using this field.
User *User `json:"user"`
Token string `json:"token"`
Version int `json:"version"`
}
// ApplicationCommandInteractionData contains data received in an interaction event.