Compare commits

...

2 Commits

Author SHA1 Message Date
ayn2op 356589df17 discord: add missing fields in AuditEntryInfo 2023-09-01 03:52:18 -07:00
ayn2op c276b445ca discord: add ReactionCountDetails struct 2023-09-01 02:41:24 -07:00
2 changed files with 26 additions and 0 deletions

View File

@ -92,6 +92,18 @@ const (
// https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
type AuditEntryInfo struct {
// ApplicationID is the ID of the application whose permissions were targeted.
//
// Events: APPLICATION_COMMAND_PERMISSION_UPDATE
ApplicationID AppID `json:"application_id"`
// AutoModerationRuleName is the name of the Auto Moderation rule that was triggered.
//
// Events: AUTO_MODERATION_BLOCK_MESSAGE, AUTO_MODERATION_FLAG_TO_CHANNEL, AUTO_MODERATION_USER_COMMUNICATION_DISABLED
AutoModerationRuleName string `json:"auto_moderation_rule_name"`
// AutoModerationRuleTriggerType is the trigger type of the Auto Moderation rule that was triggered.
//
// Events: AUTO_MODERATION_BLOCK_MESSAGE, AUTO_MODERATION_FLAG_TO_CHANNEL, AUTO_MODERATION_USER_COMMUNICATION_DISABLED
AutoModerationRuleTriggerType string `json:"auto_moderation_rule_trigger_type"`
// DeleteMemberDays is the number of days after which inactive members were
// kicked.
//
@ -129,6 +141,10 @@ type AuditEntryInfo struct {
// Events: CHANNEL_OVERWRITE_CREATE, CHANNEL_OVERWRITE_UPDATE,
// CHANNEL_OVERWRITE_DELETE
RoleName string `json:"role_name,omitempty"`
// IntegrationType is the type of the integration which performed the action.
//
// Events: MEMBER_KICK, MEMBER_ROLE_UPDATE
IntegrationType string `json:"integration_type"`
}
// AuditLogChange is a single key type to changed value audit log entry. The

View File

@ -460,8 +460,18 @@ type Attachment struct {
type Reaction struct {
// Count is the amount of times the emoji has been used to react.
Count int `json:"count"`
// CountDetails contains burst (super) and normal reactions count.
CountDetails ReactionCountDetails `json:"count_details"`
// Me specifies whether the current user reacted using this emoji.
Me bool `json:"me"`
// Emoji contains emoji information.
Emoji Emoji `json:"emoji"`
}
// https://discord.com/developers/docs/resources/channel#reaction-count-details-object
type ReactionCountDetails struct {
// Burst is the count of super reactions.
Burst int `json:"burst"`
// Normal is the count of normal reactions.
Normal int `json:"normal"`
}