T
- The specific type of the settings object.public interface GuildSettingsManager<T>
Standard implementations should be able to simply provide a
type of Object
provided a non-null
Guild
. Further
customization of the implementation is allowed on the developer
end.
Modifier and Type | Method and Description |
---|---|
T |
getSettings(net.dv8tion.jda.core.entities.Guild guild)
Gets settings for a specified
Guild
as an object of the specified type T , or null if the guild has no
settings. |
default void |
init()
Called when JDA has fired a
ReadyEvent . |
default void |
shutdown()
Called when JDA has fired a
ShutdownEvent . |
@Nullable T getSettings(net.dv8tion.jda.core.entities.Guild guild)
Guild
as an object of the specified type T
, or null
if the guild has no
settings.guild
- The guild to get settings for.null
if the guild has no settings.default void init()
ReadyEvent
.
Developers should implement this method to create or initialize resources when starting their bot.
default void shutdown()
ShutdownEvent
.
Developers should implement this method to free up or close resources when shutting their bot.