(name: string)
| 78 | }) |
| 79 | |
| 80 | export async function get(name: string) { |
| 81 | const commands = await state() |
| 82 | if (commands[name]) return commands[name] |
| 83 | for (const command of Object.values(commands)) { |
| 84 | if (command.aliases?.includes(name)) return command |
| 85 | } |
| 86 | return undefined |
| 87 | } |
| 88 | |
| 89 | export async function list() { |
| 90 | return state().then((x) => Object.values(x)) |