edit: doc strings for new types

This commit is contained in:
Peter-MJ-Parker
2024-07-20 21:18:30 -05:00
committed by GitHub
parent 259211457d
commit af496c4efe

View File

@@ -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<typeof PermissionFlagsBits>
| `${number}` //must be a stringified number
| bigint
export interface PublishConfig {
guildIds?: string[];
guildIds?: Array<`${number}`>;
defaultMemberPermissions?: ValidMemberPermissions;
integrationTypes?: Array<'Guild'|'User'>;
contexts?: Array<Contexts>;