@tryforge/forge.minecraft
    Preparing search index...

    Class Context

    Hierarchy

    • Context
      • Context

    Indexable

    • [props: string | number | symbol]: unknown
    Index

    Constructors

    Properties

    automodRule: Partial<IAutomodRuleOptions>
    calendar?: CalendarType
    component: Partial<IComponentOptions>
    container: Container
    executionTimestamp: number
    http: Partial<IHttpOptions>
    localFunctions: Map<string, ILocalFunctionData>
    timezone: string

    Accessors

    • get args(): string[]

      Returns string[]

    • get automod(): AutoModerationActionExecution | null

      Returns AutoModerationActionExecution | null

    • get channel(): | CategoryChannel
      | NewsChannel
      | StageChannel
      | TextChannel
      | PrivateThreadChannel
      | VoiceChannel
      | ForumChannel
      | MediaChannel
      | BaseChannel
      | PublicThreadChannel<boolean>
      | null

      Returns
          | CategoryChannel
          | NewsChannel
          | StageChannel
          | TextChannel
          | PrivateThreadChannel
          | VoiceChannel
          | ForumChannel
          | MediaChannel
          | BaseChannel
          | PublicThreadChannel<boolean>
          | null

    • get client(): ForgeClient

      Returns ForgeClient

    • get cmd(): BaseCommand<unknown> | null

      Returns BaseCommand<unknown> | null

    • get emoji(): Emoji | null

      Returns Emoji | null

    • get entitlement(): Entitlement | null

      Returns Entitlement | null

    • get gameRule(): TypedGameRule<GameRuleType> | null

      Returns TypedGameRule<GameRuleType> | null

    • get getExtension(): {
          <B extends boolean>(
              name: string,
              required?: B,
          ): B extends true ? ForgeExtension : ForgeExtension | null;
          <T extends ClassType, B_1 extends boolean>(
              type: string | T,
              required?: B_1,
          ): B_1 extends true ? ClassInstance<T> : ClassInstance<T> | null;
      }

      Returns {
          <B extends boolean>(
              name: string,
              required?: B,
          ): B extends true ? ForgeExtension : ForgeExtension | null;
          <T extends ClassType, B_1 extends boolean>(
              type: string | T,
              required?: B_1,
          ): B_1 extends true ? ClassInstance<T> : ClassInstance<T> | null;
      }

    • get guild(): Guild | null

      Returns Guild | null

    • get interaction(): Interaction | null

      Returns Interaction | null

    • get member(): GuildMember | null

      Returns GuildMember | null

    • get message(): Message<any> | null

      Returns Message<any> | null

    • get reaction(): MessageReaction | null

      Returns MessageReaction | null

    • get reason(): string | undefined

      Returns string | undefined

    • set reason(str: string | undefined): void

      Parameters

      • str: string | undefined

      Returns void

    • get role(): Role | null

      Returns Role | null

    • get sound(): SoundboardSound | null

      Returns SoundboardSound | null

    • get states(): States | undefined

      Returns States | undefined

    • get sticker(): Sticker | null

      Returns Sticker | null

    • get subscription(): Subscription | null

      Returns Subscription | null

    • get user(): User | null

      Returns User | null

    Methods

    • Parameters

      • content: string

      Returns Promise<unknown>

    • Returns void

    • Returns void

    • Returns void

    • Returns void

    • Clones keywords and environment vars

      Parameters

      • Optionalprops: Partial<IRunnable>
      • OptionalsyncVars: boolean

      Returns Context

    • Returns Context

    • Returns IRunnable

    • Parameters

      • name: string

      Returns boolean

    • Parameters

      • name: string

      Returns boolean

    • Fetches all emojis of the application.

      Parameters

      • Optionalonce: boolean

        Whether to fetch only when the collection is empty.

      Returns Promise<void | Collection<string, ApplicationEmoji>>

    • Type Parameters

      • T

      Parameters

      • key: PropertyKey

      Returns T

    • Type Parameters

      • T extends ClassType

      Parameters

      • type: T
      • ...keys: string[]

      Returns ClassInstance<T> | null

    • Parameters

      • ...args: string[]

      Returns object | undefined

    • Type Parameters

      • K extends string
      • T extends ClassType

      Parameters

      • key: K
      • type: T

      Returns (Context & { [P in "bro" as K]: ClassInstance<T> })[K] | null

    • Parameters

      • name: string

      Returns unknown

    • Type Parameters

      • Args extends IArg<ArgType, boolean, boolean, EnumLike<any>>[]
      • Unwrap extends boolean

      Parameters

      Returns Promise<Return<ReturnType>>

    • Parameters

      • fn: CompiledFunction
      • rt: Return

      Returns boolean

    • Returns boolean | undefined

    • Type Parameters

      • K extends string
      • V extends ClassType

      Parameters

      • key: K
      • type: V

      Returns this is Context & { [P in "bro" as K]: ClassInstance<V> }

    • Parameters

      • name: string

      Returns boolean

    • Returns this is Context & { get interaction(): ChatInputCommandInteraction }

    • Returns this is Context & { get interaction(): ContextMenuCommandInteraction }

    • Returns this is Context & { get interaction(): AnySelectMenuInteraction }

    • Parameters

      • name: string
      • value: unknown

      Returns unknown

    • Parameters

      • name: string
      • value: unknown

      Returns unknown

    • Parameters

      • value: unknown
      • ...keys: string[]

      Returns boolean

    • Parameters

      • ...keys: string[]

      Returns boolean | any[]

    • Parameters

      • previous: object
      • ...args: string[]

      Returns object | undefined