class Context
implements ContextFunctions
import { Context } from "https://deno.land/x/oasis@2.1.0/packages/framework/classes/Context.ts";
The Oasis Context class
Constructors
Properties
readonly
bot: TThe bot can be modified with a middleware before passing it to the Context class So Context.bot is generic but readonly
readonly
optional
interactionContext: InteractionContextreadonly
optional
messageContext: MessageContextreadonly
options: CommandInteractionOptionResolverThe options handler with utility methods
readonly
rawOptions: OasisCommandInteractionOption[]The raw options from the interaction
Methods
defer()
Defer the reply, returns nothing
getCommandName(force: true): string
get the name of the command that has been triggered
getCommandName(force?: boolean): string | undefined
respond(data: CreateCommand)
Responds to the user
respondPrivately(data: CreateCommand & { time?: number; })
Responds privately to the user