MCPcopy Create free account
hub / github.com/RTByte/rtbyte / _fetchCommands

Method _fetchCommands

src/commands/User/help.js:132–146  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

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};

Callers 2

buildHelpMethod · 0.80
buildDisplayMethod · 0.80

Calls 1

setMethod · 0.45

Tested by

no test coverage detected