AiContext
AiContext
Represents the context in which an AI command is executed. This includes the parameters passed to the command, the message that triggered it, and the CommandKit instance associated with the command.
Signature
class AiContext<T extends Record<string, unknown> = Record<string, unknown>> {
public params!: T;
public message!: Message;
public client!: Client;
public commandkit!: CommandKit;
public store = new Collection<any, any>();
constructor(options: AiContextOptions<T>)
setParams(params: T) => void;
}
params
property
TThe parameters passed to the AI command.
message
property
MessageThe message that triggered the AI command.
client
property
ClientThe client instance associated with the AI command.
commandkit
property
The CommandKit instance associated with the AI command.
store
property
A key-value store to hold additional data.
constructor
method
(options: AiContextOptions<T>) => AiContextCreates a new instance of AiContext.
setParams
method
(params: T) => voidSets the parameters for the AI context.