After
after
Schedules the given function to run after the current command has finished executing.
Example
import { after } from 'commandkit';
// inside a command
export const chatInput: ChatInputCommand = async (ctx) => {
after(() => {
console.log('This will run after the command has finished executing.');
});
// ... command logic
}
Signature
function after(fn: GenericFunction<[CommandKitEnvironment]>): string
Parameters
fn
parameter