extendContext
Extends the context of a command interaction.
Signature
export declare function extendContext<T extends {}>(cb: (interaction: Parameters<NonNullable<BaseClientOptions['context']>>[0]) => T): (interaction: Parameters<NonNullable<BaseClientOptions["context"]>>[0]) => T;JSDoc
Parameters
cb- The callback function to extend the context.
Returns
The extended context.
Examples
const customContext = extendContext((interaction) => {
return {
owner: '123456789012345678',
// Add your custom properties here
};
});Members
This export does not declare public properties or methods in the generated declaration file.