(msg)
| 130 | } |
| 131 | |
| 132 | async _fetchCommands(msg) { |
| 133 | const run = this.client.inhibitors.run.bind(this.client.inhibitors, msg); |
| 134 | const commands = new Map(); |
| 135 | await Promise.all(this.client.commands.map((command) => run(command, true) |
| 136 | .then(() => { |
| 137 | const category = commands.get(command.category); |
| 138 | if (category) category.push(command); |
| 139 | else commands.set(command.category, [command]); |
| 140 | }).catch(() => { |
| 141 | // noop |
| 142 | }) |
| 143 | )); |
| 144 | |
| 145 | return commands; |
| 146 | } |
| 147 | |
| 148 | }; |
no test coverage detected