get Default Messages
Deprecated
Get from DefaultMessagesFactory
Replace with
import io.github.freya022.botcommands.api.localization.DefaultMessagesFactory
import io.github.freya022.botcommands.api.core.service.getService
Content copied to clipboard
this.getService<DefaultMessagesFactory>().get(locale.toLocale())
Content copied to clipboard
Returns the DefaultMessages instance for the provided Discord locale.
Parameters
locale
The locale to get the messages in
Deprecated
Get from DefaultMessagesFactory, using the message event
Replace with
import io.github.freya022.botcommands.api.localization.DefaultMessagesFactory
import io.github.freya022.botcommands.api.core.service.getService
Content copied to clipboard
this.getService<DefaultMessagesFactory>().get(event)
Content copied to clipboard
Returns the DefaultMessages instance for this Guild's locale
Parameters
guild
The Guild to take the locale from
Deprecated
Get from DefaultMessagesFactory
Replace with
import io.github.freya022.botcommands.api.localization.DefaultMessagesFactory
import io.github.freya022.botcommands.api.core.service.getService
Content copied to clipboard
this.getService<DefaultMessagesFactory>().get(interaction)
Content copied to clipboard
Returns the DefaultMessages instance for this user's locale
Parameters
interaction
The Interaction to take the user's locale from