Options
All
  • Public
  • Public/Protected
  • All
Menu

JADL

Index

Type aliases

CachedGuild

CachedGuild: Pick<DiscordEventMap["GUILD_CREATE"], Exclude<keyof DiscordEventMap["GUILD_CREATE"], "channels" | "roles" | "members" | "presences">>

Represents a guild cached in Worker#guilds. Does not contain channels, roles, members, or presences.

Variables

PermissionUtils

PermissionUtils: { bits: { addReactions: bigint; administrator: bigint; auditLog: bigint; ban: bigint; connect: bigint; createInvites: bigint; createPrivateThreads: bigint; createPublicThreads: bigint; deafen: bigint; embed: bigint; emojis: bigint; externalEmojis: bigint; files: bigint; kick: bigint; manageChannels: bigint; manageGuild: bigint; manageMessages: bigint; manageNicknames: bigint; manageRoles: bigint; manageThreads: bigint; mentionEveryone: bigint; move: bigint; mute: bigint; nickname: bigint; prioritySpeaker: bigint; readHistory: bigint; requestToSpeak: bigint; sendMessages: bigint; sendMessagesInThreads: bigint; speak: bigint; stream: bigint; tts: bigint; useApplicationCommands: bigint; useExternalStickers: bigint; useVoiceActivity: bigint; viewChannel: bigint; viewInsights: bigint; webhooks: bigint }; combine: any; has: any; hasPerms: any } = ...

Type declaration

  • bits: { addReactions: bigint; administrator: bigint; auditLog: bigint; ban: bigint; connect: bigint; createInvites: bigint; createPrivateThreads: bigint; createPublicThreads: bigint; deafen: bigint; embed: bigint; emojis: bigint; externalEmojis: bigint; files: bigint; kick: bigint; manageChannels: bigint; manageGuild: bigint; manageMessages: bigint; manageNicknames: bigint; manageRoles: bigint; manageThreads: bigint; mentionEveryone: bigint; move: bigint; mute: bigint; nickname: bigint; prioritySpeaker: bigint; readHistory: bigint; requestToSpeak: bigint; sendMessages: bigint; sendMessagesInThreads: bigint; speak: bigint; stream: bigint; tts: bigint; useApplicationCommands: bigint; useExternalStickers: bigint; useVoiceActivity: bigint; viewChannel: bigint; viewInsights: bigint; webhooks: bigint }
    • addReactions: bigint
    • administrator: bigint
    • auditLog: bigint
    • ban: bigint
    • connect: bigint
    • createInvites: bigint
    • createPrivateThreads: bigint
    • createPublicThreads: bigint
    • deafen: bigint
    • embed: bigint
    • emojis: bigint
    • externalEmojis: bigint
    • files: bigint
    • kick: bigint
    • manageChannels: bigint
    • manageGuild: bigint
    • manageMessages: bigint
    • manageNicknames: bigint
    • manageRoles: bigint
    • manageThreads: bigint
    • mentionEveryone: bigint
    • move: bigint
    • mute: bigint
    • nickname: bigint
    • prioritySpeaker: bigint
    • readHistory: bigint
    • requestToSpeak: bigint
    • sendMessages: bigint
    • sendMessagesInThreads: bigint
    • speak: bigint
    • stream: bigint
    • tts: bigint
    • useApplicationCommands: bigint
    • useExternalStickers: bigint
    • useVoiceActivity: bigint
    • viewChannel: bigint
    • viewInsights: bigint
    • webhooks: bigint
  • combine:function
    • combine(data: { guild: CachedGuild; member: APIGuildMember; overwrites?: APIOverwrite[]; roleList?: Collection<string, APIRole> }): bigint
    • Adds multiple permission sources together

      Parameters

      • data: { guild: CachedGuild; member: APIGuildMember; overwrites?: APIOverwrite[]; roleList?: Collection<string, APIRole> }

        Data filled with possible permission data

        • guild: CachedGuild
        • member: APIGuildMember
        • Optional overwrites?: APIOverwrite[]
        • Optional roleList?: Collection<string, APIRole>

      Returns bigint

      Full permission bit

  • has:function
    • has(bit: number | bigint, perm: "createInvites" | "kick" | "ban" | "administrator" | "manageChannels" | "manageGuild" | "addReactions" | "auditLog" | "prioritySpeaker" | "stream" | "viewChannel" | "sendMessages" | "tts" | "manageMessages" | "embed" | "files" | "readHistory" | "mentionEveryone" | "externalEmojis" | "viewInsights" | "connect" | "speak" | "mute" | "deafen" | "move" | "useVoiceActivity" | "nickname" | "manageNicknames" | "manageRoles" | "webhooks" | "emojis" | "useApplicationCommands" | "requestToSpeak" | "manageThreads" | "createPublicThreads" | "createPrivateThreads" | "useExternalStickers" | "sendMessagesInThreads"): boolean
    • Test a permission on a user

      Parameters

      • bit: number | bigint

        Combined permission

      • perm: "createInvites" | "kick" | "ban" | "administrator" | "manageChannels" | "manageGuild" | "addReactions" | "auditLog" | "prioritySpeaker" | "stream" | "viewChannel" | "sendMessages" | "tts" | "manageMessages" | "embed" | "files" | "readHistory" | "mentionEveryone" | "externalEmojis" | "viewInsights" | "connect" | "speak" | "mute" | "deafen" | "move" | "useVoiceActivity" | "nickname" | "manageNicknames" | "manageRoles" | "webhooks" | "emojis" | "useApplicationCommands" | "requestToSpeak" | "manageThreads" | "createPublicThreads" | "createPrivateThreads" | "useExternalStickers" | "sendMessagesInThreads"

        Permission name to test

      Returns boolean

      Whether or not the user has permissions

  • hasPerms:function
    • hasPerms(perms: number | bigint, bit: number | bigint): boolean
    • Test two bits together

      Parameters

      • perms: number | bigint

        Combined permissions

      • bit: number | bigint

        Number bit ermission to test

      Returns boolean

      Whether or not the user has permissions

humanReadablePermissions

humanReadablePermissions: { [ key in keyof typeof bits]: string } = ...

Generated using TypeDoc