Skip to content

Commit

Permalink
feat: soundboard audit log events (#1122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yareaj authored Oct 21, 2024
1 parent 0fe6059 commit 76fc8f0
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 0 deletions.
34 changes: 34 additions & 0 deletions deno/payloads/v10/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ export enum AuditLogEvent {

ApplicationCommandPermissionUpdate = 121,

SoundboardSoundCreate = 130,
SoundboardSoundUpdate,
SoundboardSoundDelete,

AutoModerationRuleCreate = 140,
AutoModerationRuleUpdate,
AutoModerationRuleDelete,
Expand Down Expand Up @@ -373,6 +377,8 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyEmojiId
| APIAuditLogChangeKeyEmojiName
| APIAuditLogChangeKeyEnabled
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyEntityType
Expand Down Expand Up @@ -413,6 +419,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
| APIAuditLogChangeKeySystemChannelFlags
Expand All @@ -423,10 +430,12 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyTriggerMetadata
| APIAuditLogChangeKeyTriggerType
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyUserId
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;

Expand Down Expand Up @@ -882,6 +891,31 @@ export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeDa
number
>;

/**
* Returned when a soundboard is create or deleted
*/
export type APIAuditLogChangeKeySoundId = AuditLogChangeData<'sound_id', Snowflake>;

/**
* Returned when a soundboard's volume is changed
*/
export type APIAuditLogChangeKeyVolume = AuditLogChangeData<'volume', number>;

/**
* Returned when a soundboard's custom emoji is changed
*/
export type APIAuditLogChangeKeyEmojiId = AuditLogChangeData<'emoji_id', Snowflake>;

/**
* Returned when a soundboard's unicode emoji is changed
*/
export type APIAuditLogChangeKeyEmojiName = AuditLogChangeData<'emoji_name', string>;

/**
* Returned when a sounboard is created
*/
export type APIAuditLogChangeKeyUserId = AuditLogChangeData<'user_id', Snowflake>;

interface AuditLogChangeData<K extends string, D> {
key: K;
/**
Expand Down
34 changes: 34 additions & 0 deletions deno/payloads/v9/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ export enum AuditLogEvent {

ApplicationCommandPermissionUpdate = 121,

SoundboardSoundCreate = 130,
SoundboardSoundUpdate,
SoundboardSoundDelete,

AutoModerationRuleCreate = 140,
AutoModerationRuleUpdate,
AutoModerationRuleDelete,
Expand Down Expand Up @@ -373,6 +377,8 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyEmojiId
| APIAuditLogChangeKeyEmojiName
| APIAuditLogChangeKeyEnabled
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyEntityType
Expand Down Expand Up @@ -413,6 +419,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
| APIAuditLogChangeKeySystemChannelFlags
Expand All @@ -423,10 +430,12 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyTriggerMetadata
| APIAuditLogChangeKeyTriggerType
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyUserId
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;

Expand Down Expand Up @@ -882,6 +891,31 @@ export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeDa
number
>;

/**
* Returned when a soundboard is create or deleted
*/
export type APIAuditLogChangeKeySoundId = AuditLogChangeData<'sound_id', Snowflake>;

/**
* Returned when a soundboard's volume is changed
*/
export type APIAuditLogChangeKeyVolume = AuditLogChangeData<'volume', number>;

/**
* Returned when a soundboard's custom emoji is changed
*/
export type APIAuditLogChangeKeyEmojiId = AuditLogChangeData<'emoji_id', Snowflake>;

/**
* Returned when a soundboard's unicode emoji is changed
*/
export type APIAuditLogChangeKeyEmojiName = AuditLogChangeData<'emoji_name', string>;

/**
* Returned when a sounboard is created
*/
export type APIAuditLogChangeKeyUserId = AuditLogChangeData<'user_id', Snowflake>;

interface AuditLogChangeData<K extends string, D> {
key: K;
/**
Expand Down
34 changes: 34 additions & 0 deletions payloads/v10/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ export enum AuditLogEvent {

ApplicationCommandPermissionUpdate = 121,

SoundboardSoundCreate = 130,
SoundboardSoundUpdate,
SoundboardSoundDelete,

AutoModerationRuleCreate = 140,
AutoModerationRuleUpdate,
AutoModerationRuleDelete,
Expand Down Expand Up @@ -373,6 +377,8 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyEmojiId
| APIAuditLogChangeKeyEmojiName
| APIAuditLogChangeKeyEnabled
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyEntityType
Expand Down Expand Up @@ -413,6 +419,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
| APIAuditLogChangeKeySystemChannelFlags
Expand All @@ -423,10 +430,12 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyTriggerMetadata
| APIAuditLogChangeKeyTriggerType
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyUserId
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;

Expand Down Expand Up @@ -882,6 +891,31 @@ export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeDa
number
>;

/**
* Returned when a soundboard is create or deleted
*/
export type APIAuditLogChangeKeySoundId = AuditLogChangeData<'sound_id', Snowflake>;

/**
* Returned when a soundboard's volume is changed
*/
export type APIAuditLogChangeKeyVolume = AuditLogChangeData<'volume', number>;

/**
* Returned when a soundboard's custom emoji is changed
*/
export type APIAuditLogChangeKeyEmojiId = AuditLogChangeData<'emoji_id', Snowflake>;

/**
* Returned when a soundboard's unicode emoji is changed
*/
export type APIAuditLogChangeKeyEmojiName = AuditLogChangeData<'emoji_name', string>;

/**
* Returned when a sounboard is created
*/
export type APIAuditLogChangeKeyUserId = AuditLogChangeData<'user_id', Snowflake>;

interface AuditLogChangeData<K extends string, D> {
key: K;
/**
Expand Down
34 changes: 34 additions & 0 deletions payloads/v9/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ export enum AuditLogEvent {

ApplicationCommandPermissionUpdate = 121,

SoundboardSoundCreate = 130,
SoundboardSoundUpdate,
SoundboardSoundDelete,

AutoModerationRuleCreate = 140,
AutoModerationRuleUpdate,
AutoModerationRuleDelete,
Expand Down Expand Up @@ -373,6 +377,8 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyDeny
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyEmojiId
| APIAuditLogChangeKeyEmojiName
| APIAuditLogChangeKeyEnabled
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyEntityType
Expand Down Expand Up @@ -413,6 +419,7 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyRecurrenceRule
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyRulesChannelId
| APIAuditLogChangeKeySoundId
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyStatus
| APIAuditLogChangeKeySystemChannelFlags
Expand All @@ -423,10 +430,12 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyTriggerMetadata
| APIAuditLogChangeKeyTriggerType
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyUserId
| APIAuditLogChangeKeyUserLimit
| APIAuditLogChangeKeyUses
| APIAuditLogChangeKeyVanityURLCode
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyVolume
| APIAuditLogChangeKeyWidgetChannelId
| APIAuditLogChangeKeyWidgetEnabled;

Expand Down Expand Up @@ -882,6 +891,31 @@ export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeDa
number
>;

/**
* Returned when a soundboard is create or deleted
*/
export type APIAuditLogChangeKeySoundId = AuditLogChangeData<'sound_id', Snowflake>;

/**
* Returned when a soundboard's volume is changed
*/
export type APIAuditLogChangeKeyVolume = AuditLogChangeData<'volume', number>;

/**
* Returned when a soundboard's custom emoji is changed
*/
export type APIAuditLogChangeKeyEmojiId = AuditLogChangeData<'emoji_id', Snowflake>;

/**
* Returned when a soundboard's unicode emoji is changed
*/
export type APIAuditLogChangeKeyEmojiName = AuditLogChangeData<'emoji_name', string>;

/**
* Returned when a sounboard is created
*/
export type APIAuditLogChangeKeyUserId = AuditLogChangeData<'user_id', Snowflake>;

interface AuditLogChangeData<K extends string, D> {
key: K;
/**
Expand Down

0 comments on commit 76fc8f0

Please sign in to comment.