mirror of
https://github.com/sern-handler/tools
synced 2026-06-06 01:16:59 +00:00
feat: more readable types
Added Context Types for end-users who don't know where each number points to in the array.
This commit is contained in:
@@ -176,6 +176,14 @@ export class Publisher implements Init {
|
||||
}
|
||||
}
|
||||
|
||||
export enum IntegrationContextType {
|
||||
GUILD = 0,
|
||||
BOT_DM = 1,
|
||||
PRIVATE_CHANNEL = 2
|
||||
}
|
||||
|
||||
type Contexts = IntegrationContextType | 0 | 1 | 2;
|
||||
|
||||
export type ValidMemberPermissions =
|
||||
| typeof PermissionFlagsBits //discord.js enum
|
||||
| Array<typeof PermissionFlagsBits>
|
||||
@@ -185,8 +193,8 @@ export type ValidMemberPermissions =
|
||||
export interface PublishConfig {
|
||||
guildIds?: string[];
|
||||
defaultMemberPermissions?: ValidMemberPermissions;
|
||||
integrationTypes?: Array<'Guild'|'User'>
|
||||
contexts?: number[]
|
||||
integrationTypes?: Array<'Guild'|'User'>;
|
||||
contexts?: Array<Contexts>;
|
||||
}
|
||||
|
||||
export type ValidPublishOptions =
|
||||
|
||||
Reference in New Issue
Block a user