Prefix Resolver
Esta página aún no está disponible en tu idioma.
This guide will help you to understand the prefix resolver.
The PrefixResolver Service
Section titled “The PrefixResolver Service”The PrefixResolver service is used to manage the bot’s prefixes. You can use it to add, remove, and get prefixes for a guild.
Accessing the PrefixResolver Service
Section titled “Accessing the PrefixResolver Service”To access the PrefixResolver service, you need to get it from the ServiceContainer.
import { ServiceContainer } from 'zumito-framework';import { PrefixResolver } from 'zumito-framework';
const prefixResolver = ServiceContainer.get(PrefixResolver);Once you have the PrefixResolver service, you can use it to manage the bot’s prefixes.
Get a prefix
Section titled “Get a prefix”To get a prefix for a guild, you can use the getPrefix method.
const prefix = await prefixResolver.getPrefix(guildId);