List registered commands and listeners

Hi, i love working with sapphire it's amazing.
I'm just wondering is there a way to obtain some sort of array or map of registered/loaded commands and listeners ?

Appreciate sincerely all the answers
Solution
There are several ways to get the list of all commands, depending on the context of your current code. The following are the different methods:

Inside another command:

this.store // Store<Command> extends Collection<Command> extends Map<Command>

Inside another piece:

this.container.stores.get('commands') // Store<Command> extends Collection<Command> extends Map<Command>

Anywhere else:

import { container } from '@sapphire/framework';

container.stores.get('commands') // Store<Command> extends Collection<Command> extends Map<Command>
Was this page helpful?