-
Notifications
You must be signed in to change notification settings - Fork 0
Client.onCommand()
github-actions[bot] edited this page Sep 30, 2024
·
4 revisions
listens and responds to when a commmand is ran
only responds to the bot's commands unfortunately
type: Function
arguments:
- ?name
String
: optional command name - action
Function
client.onCommand( (ctx) => {
ctx.reply("hi! this responds to all commands!");
});
client.onCommand("ping", (ctx) => {
ctx.reply("pong!");
});