Skip to content

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!");
});


🛈 Client

🛈 AddonService

🛈 AttachmentService

🛈 ChannelService

🛈 CommandService

🛈 ComponentService

🛈 ErrorService

🛈 EventService

🛈 ExpressionService

🛈 GuildService

🛈 LogService

🛈 MessageService

🛈 PermissionService

🛈 RoleService

🛈 StorageService

🛈 TypeService

🛈 UserService

🛈 UtilService

🛈 VoiceService


Clone this wiki locally