-
Notifications
You must be signed in to change notification settings - Fork 0
Accessing Dynamic Info
Arthur Neuman edited this page Jul 6, 2020
·
3 revisions
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 |