(client, guildId, commandName, category = null)
| 142 | } |
| 143 | |
| 144 | export async function isCommandEnabled(client, guildId, commandName, category = null) { |
| 145 | const config = await getGuildConfig(client, guildId); |
| 146 | let resolvedCategory = category; |
| 147 | |
| 148 | if (!resolvedCategory) { |
| 149 | const command = client.commands.get(commandName); |
| 150 | resolvedCategory = command?.category || 'Core'; |
| 151 | } |
| 152 | |
| 153 | return isCommandEnabledInConfig(config, commandName, resolvedCategory); |
| 154 | } |
| 155 | |
| 156 | export function getCommandAccessSnapshot(client, config) { |
| 157 | const registry = buildCommandRegistry(client); |
no test coverage detected