chore: add missing audit log keys (#81)

ref: https://github.com/discord/discord-api-docs/pull/2570
This commit is contained in:
Vlad Frangu
2021-02-05 22:29:00 +02:00
committed by GitHub
parent 855f36d930
commit 63096d807d

View File

@@ -233,12 +233,18 @@ export const enum AuditLogOptionsType {
*/
export type APIAuditLogChange =
| APIAuditLogChangeKeyName
| APIAuditLogChangeKeyDescription
| APIAuditLogChangeKeyIconHash
| APIAuditLogChangeKeySplashHash
| APIAuditLogChangeKeyDiscoverySplashHash
| APIAuditLogChangeKeyBannerHash
| APIAuditLogChangeKeyOwnerID
| APIAuditLogChangeKeyRegion
| APIAuditLogChangeKeyPreferredLocale
| APIAuditLogChangeKeyAFKChannelID
| APIAuditLogChangeKeyAFKTimeout
| APIAuditLogChangeKeyRulesChannelID
| APIAuditLogChangeKeyPublicUpdatesChannelID
| APIAuditLogChangeKeyMFALevel
| APIAuditLogChangeKeyVerificationLevel
| APIAuditLogChangeKeyExplicitContentFilter
@@ -278,13 +284,19 @@ export type APIAuditLogChange =
| APIAuditLogChangeKeyType
| APIAuditLogChangeKeyEnableEmoticons
| APIAuditLogChangeKeyExpireBehavior
| APIAuditLogChangeKeyExpireGracePeriod;
| APIAuditLogChangeKeyExpireGracePeriod
| APIAuditLogChangeKeyUserLimit;
/**
* Returned when a guild's name is changed
*/
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
/**
* Returned when a guild's description is changed
*/
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
/**
* Returned when a guild's icon is changed
*/
@@ -296,7 +308,17 @@ export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', strin
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
/**
* Returned when a guild's owner ID is changed
* Returned when a guild's discovery splash is changed
*/
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
/**
* Returned when a guild's banner hash is changed
*/
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
/**
* Returned when a guild's owner_id is changed
*/
export type APIAuditLogChangeKeyOwnerID = AuditLogChangeData<'owner_id', Snowflake>;
@@ -305,6 +327,11 @@ export type APIAuditLogChangeKeyOwnerID = AuditLogChangeData<'owner_id', Snowfla
*/
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
/**
* Returned when a guild's preferred_locale is changed
*/
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
/**
* Returned when a guild's afk_channel_id is changed
*/
@@ -315,6 +342,16 @@ export type APIAuditLogChangeKeyAFKChannelID = AuditLogChangeData<'afk_channel_i
*/
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
/**
* Returned when a guild's rules_channel_id is changed
*/
export type APIAuditLogChangeKeyRulesChannelID = AuditLogChangeData<'rules_channel_id', string>;
/**
* Returned when a guild's public_updates_channel_id is changed
*/
export type APIAuditLogChangeKeyPublicUpdatesChannelID = AuditLogChangeData<'public_updates_channel_id', string>;
/**
* Returned when a guild's mfa_level is changed
*/
@@ -523,10 +560,17 @@ export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_beha
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
/**
* @internal
* Returned when a voice channel's user_limit is changed
*/
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
interface AuditLogChangeData<K extends string, D extends unknown> {
key: K;
/**
* The new value
*
* If not present, it can mean the value the key denotes has been set to `null`
*/
new_value?: D;
old_value?: D;
}