Client.onCommand() - shysolocup/noscord.js GitHub Wiki
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!");
});