getDefaultMessages

Deprecated

Get from DefaultMessagesFactory

Replace with

import io.github.freya022.botcommands.api.localization.DefaultMessagesFactory
import io.github.freya022.botcommands.api.core.service.getService
this.getService<DefaultMessagesFactory>().get(locale.toLocale())

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
this.getService<DefaultMessagesFactory>().get(event)

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
this.getService<DefaultMessagesFactory>().get(interaction)

Returns the DefaultMessages instance for this user's locale

Parameters

interaction

The Interaction to take the user's locale from