From af496c4efee28051b206aedaa753009e7cedc3c9 Mon Sep 17 00:00:00 2001 From: Peter-MJ-Parker <34216187+Peter-MJ-Parker@users.noreply.github.com> Date: Sat, 20 Jul 2024 21:18:30 -0500 Subject: [PATCH] edit: doc strings for new types --- packages/publisher/index.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/publisher/index.ts b/packages/publisher/index.ts index 895da26..fb9b3cd 100644 --- a/packages/publisher/index.ts +++ b/packages/publisher/index.ts @@ -182,16 +182,30 @@ export enum IntegrationContextType { PRIVATE_CHANNEL = 2 } +/** +* Valid contexts for posting commands. +* 0 - Guild +* 1 - Bot DM +* 2 - Private Channel +* keyof IntegrationContextType +*/ type Contexts = IntegrationContextType | 0 | 1 | 2; +/** +* Permission Resolvable - Not all permission resolvables that discord supports are supported here +* Valid permission types: +* a single permission from `PermissionFlagsBits` +* array of `PermissionFlagsBits` +* stringified permissions ex.: "Administrator" +* V13 djs permissions will not work! +*/ export type ValidMemberPermissions = | typeof PermissionFlagsBits //discord.js enum | Array - | `${number}` //must be a stringified number | bigint export interface PublishConfig { - guildIds?: string[]; + guildIds?: Array<`${number}`>; defaultMemberPermissions?: ValidMemberPermissions; integrationTypes?: Array<'Guild'|'User'>; contexts?: Array;