Skip to content

Accessing Dynamic Info

Arthur Neuman edited this page Jul 6, 2020 · 3 revisions

Dynamic agent/handler info

Say you want to access your attachments or commands in your command action. This can be done through the agent class that is passed to command actions.

new Command({
  name: 'command'
  desc: 'The command description',
  action: ({ agent }) => ...
})

List of accessible info through this method

Info Path
Client agent.client
Command Handler agent.commandHandler
Reaction Handler agent.reactionHandler
Attachments agent.attachments
Commands agent.commandHandler.getCommand('name')
Replacers agent.commandHandler.getReplacer('name')
React Commands agent.reactionHandler.getReactCommand('emoji')
Guild Data agent.guildData

Components


tui.jsdoc-template (Fork)

Clone this wiki locally