From 412ec34569e5ce4c126385d8da911650791f2371 Mon Sep 17 00:00:00 2001 From: ITOH Date: Sun, 15 Aug 2021 11:54:00 +0200 Subject: [PATCH 1/2] add(types): InteractionChannel type --- src/types/channels/channel.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/types/channels/channel.ts b/src/types/channels/channel.ts index e672ac298..bffde25a2 100644 --- a/src/types/channels/channel.ts +++ b/src/types/channels/channel.ts @@ -59,3 +59,8 @@ export interface Channel { /** Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */ defaultAutoArchiveDuration?: number; } + +export interface InteractionChannel extends Channel { + /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a slash command interaction */ + permissions: string; +} From 638dbed5517f5e16aa1e71868300ed74e517dc96 Mon Sep 17 00:00:00 2001 From: ITOH Date: Sun, 15 Aug 2021 11:54:21 +0200 Subject: [PATCH 2/2] fix(types): ApplicationCommandInteractionDataResolved#permissionOverwrites is permissions --- .../commands/application_command_interaction_data_resolved.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/interactions/commands/application_command_interaction_data_resolved.ts b/src/types/interactions/commands/application_command_interaction_data_resolved.ts index 60fce6131..07fb1e8a4 100644 --- a/src/types/interactions/commands/application_command_interaction_data_resolved.ts +++ b/src/types/interactions/commands/application_command_interaction_data_resolved.ts @@ -1,4 +1,4 @@ -import { Channel } from "../../channels/channel.ts"; +import { InteractionChannel } from "../../channels/channel.ts"; import { Message } from "../../messages/message.ts"; import { Role } from "../../permissions/role.ts"; import { User } from "../../users/user.ts"; @@ -14,5 +14,5 @@ export interface ApplicationCommandInteractionDataResolved { /** The Ids and Role objects */ roles?: Record; /** The Ids and partial Channel objects */ - channels?: Record>; + channels?: Record>; }