public interface IRepository
Implement this interface in order to use your own database to store language and prefix settings.
Then replace the default implementation by using CommandEngine.setRepository(com.ericramirezs.commando4j.data.IRepository)
CommandEngine.setRepository(IRepository)
Modifier and Type | Method and Description |
---|---|
String |
getLanguage(String guildId)
Get the preferred language for the guild
|
String |
getPrefix(String guildId)
Get the preferred prefix for the guild
|
String |
setLanguage(String guildId,
String locale)
Set the preferred language for the guild
|
String |
setPrefix(String guildId,
String prefix)
Set the preferred prefix for the guild
|
String getPrefix(String guildId)
guildId
- Discord server's unique IDString setPrefix(String guildId, String prefix)
guildId
- Unique ID of the discord serverprefix
- new prefix for the guildString getLanguage(String guildId)
guildId
- Unique ID of the discord serverLocale.forLanguageTag(String)
String setLanguage(String guildId, String locale)
guildId
- Unique ID of the discord serverlocale
- new locale tagLocale.forLanguageTag(String)