feat: v13 applicationCommandPermissionsUpdate event

This commit is contained in:
Elysia
2023-02-19 12:01:37 +07:00
parent a3a8a6ae67
commit 92f21d9b9c
8 changed files with 92 additions and 3 deletions

16
typings/index.d.ts vendored
View File

@@ -4572,6 +4572,7 @@ export interface ClientEvents extends BaseClientEvents {
applicationCommandDelete: [command: ApplicationCommand];
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
autoModerationRuleCreate: [autoModerationRule: AutoModerationRule];
autoModerationRuleDelete: [autoModerationRule: AutoModerationRule];
@@ -4698,6 +4699,7 @@ export interface ConstantsEvents {
APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
APPLICATION_COMMAND_PERMISSIONS_UPDATE: 'applicationCommandPermissionsUpdate';
CALL_CREATE: 'callCreate';
CALL_DELETE: 'callDelete';
CALL_UPDATE: 'callUpdate';
@@ -5201,6 +5203,13 @@ export interface ApplicationCommandPermissionData {
permission: boolean;
}
export interface ApplicationCommandPermissionsUpdateData {
permissions: ApplicationCommandPermissions;
id: Snowflake;
guildId: Snowflake;
applicationId: Snowflake;
}
export interface ApplicationCommandPermissions extends ApplicationCommandPermissionData {
type: ApplicationCommandPermissionType;
}
@@ -5935,6 +5944,7 @@ interface GuildAuditLogsTypes {
THREAD_CREATE: ['THREAD', 'CREATE'];
THREAD_UPDATE: ['THREAD', 'UPDATE'];
THREAD_DELETE: ['THREAD', 'DELETE'];
APPLICATION_COMMAND_PERMISSION_UPDATE: ['APPLICATION_COMMAND_PERMISSION', 'UPDATE'];
AUTO_MODERATION_RULE_CREATE: ['AUTO_MODERATION', 'CREATE'];
AUTO_MODERATION_RULE_UPDATE: ['AUTO_MODERATION', 'UPDATE'];
AUTO_MODERATION_RULE_DELETE: ['AUTO_MODERATION', 'DELETE'];
@@ -5991,6 +6001,7 @@ export interface GuildAuditLogsIds {
110: 'THREAD_CREATE';
111: 'THREAD_UPDATE';
112: 'THREAD_DELETE';
121: 'APPLICATION_COMMAND_PERMISSION_UPDATE';
140: 'AUTO_MODERATION_RULE_CREATE';
141: 'AUTO_MODERATION_RULE_UPDATE';
142: 'AUTO_MODERATION_RULE_DELETE';
@@ -6031,6 +6042,9 @@ export interface GuildAuditLogsEntryExtraField {
STAGE_INSTANCE_CREATE: StageChannel | { id: Snowflake };
STAGE_INSTANCE_DELETE: StageChannel | { id: Snowflake };
STAGE_INSTANCE_UPDATE: StageChannel | { id: Snowflake };
APPLICATION_COMMAND_PERMISSION_UPDATE: {
applicationId: Snowflake;
};
AUTO_MODERATION_BLOCK_MESSAGE: {
autoModerationRuleName: string;
autoModerationRuleTriggerType: AutoModerationRuleTriggerType;
@@ -6057,6 +6071,7 @@ export interface GuildAuditLogsEntryTargetField<TActionType extends GuildAuditLo
STAGE_INSTANCE: StageInstance;
STICKER: Sticker;
GUILD_SCHEDULED_EVENT: GuildScheduledEvent;
APPLICATION_COMMAND: ApplicationCommand | { id: Snowflake };
AUTO_MODERATION: AutoModerationRule;
}
@@ -7323,6 +7338,7 @@ export type WSEventType =
| 'APPLICATION_COMMAND_CREATE'
| 'APPLICATION_COMMAND_DELETE'
| 'APPLICATION_COMMAND_UPDATE'
| 'APPLICATION_COMMAND_PERMISSIONS_UPDATE'
| 'AUTO_MODERATION_ACTION_EXECUTION'
| 'AUTO_MODERATION_RULE_CREATE'
| 'AUTO_MODERATION_RULE_DELETE'