Merge pull request #1097 from discordeno/fix-interaction-resovled-data-channel-permission-prop

fix(types): interaction resovled data channel permission prop
This commit is contained in:
Skillz4Killz
2021-08-15 13:29:50 -04:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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<string, Role>;
/** The Ids and partial Channel objects */
channels?: Record<string, Pick<Channel, "id" | "name" | "type" | "permissionOverwrites">>;
channels?: Record<string, Pick<InteractionChannel, "id" | "name" | "type" | "permissions">>;
}