Skip to content

Commit

Permalink
feat(GatewayDispatchEvents): add AuditLogEntryCreate
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Jan 12, 2023
1 parent 14a5499 commit 9d459fb
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
15 changes: 15 additions & 0 deletions deno/gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
} from '../payloads/v10/mod.ts';
import type { Nullable } from '../utils/internals.ts';

Expand Down Expand Up @@ -262,6 +263,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
AuditLogEntryCreate = 'AUDIT_LOG_ENTRY_CREATE',
}

export type GatewaySendPayload =
Expand Down Expand Up @@ -1691,6 +1693,19 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.StageInstanceUpdate,
GatewayStageInstanceUpdateDispatchData
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayAuditLogEntryCreateDispatchData = APIAuditLogEntry;

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
15 changes: 15 additions & 0 deletions deno/gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
} from '../payloads/v9/mod.ts';
import type { Nullable } from '../utils/internals.ts';

Expand Down Expand Up @@ -261,6 +262,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
AuditLogEntryCreate = 'AUDIT_LOG_ENTRY_CREATE',
}

export type GatewaySendPayload =
Expand Down Expand Up @@ -1690,6 +1692,19 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.StageInstanceUpdate,
GatewayStageInstanceUpdateDispatchData
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayAuditLogEntryCreateDispatchData = APIAuditLogEntry;

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
15 changes: 15 additions & 0 deletions gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
} from '../payloads/v10/index';
import type { Nullable } from '../utils/internals';

Expand Down Expand Up @@ -262,6 +263,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
AuditLogEntryCreate = 'AUDIT_LOG_ENTRY_CREATE',
}

export type GatewaySendPayload =
Expand Down Expand Up @@ -1691,6 +1693,19 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.StageInstanceUpdate,
GatewayStageInstanceUpdateDispatchData
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayAuditLogEntryCreateDispatchData = APIAuditLogEntry;

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
15 changes: 15 additions & 0 deletions gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
} from '../payloads/v9/index';
import type { Nullable } from '../utils/internals';

Expand Down Expand Up @@ -261,6 +262,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
AuditLogEntryCreate = 'AUDIT_LOG_ENTRY_CREATE',
}

export type GatewaySendPayload =
Expand Down Expand Up @@ -1690,6 +1692,19 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.StageInstanceUpdate,
GatewayStageInstanceUpdateDispatchData
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayAuditLogEntryCreateDispatchData = APIAuditLogEntry;

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down

0 comments on commit 9d459fb

Please sign in to comment.