public class MessageDecoratorModule
extends com.jesus_crie.modularbot.core.module.Module
Constructor and Description |
---|
MessageDecoratorModule(com.jesus_crie.modularbot.nightconfig.NightConfigWrapperModule config,
java.io.File cachePath) |
MessageDecoratorModule(com.jesus_crie.modularbot.nightconfig.NightConfigWrapperModule config,
java.lang.String cachePath) |
Modifier and Type | Method and Description |
---|---|
int |
cleanup() |
java.util.Collection<MessageDecorator<?>> |
getDecorators() |
void |
onShardsReady(com.jesus_crie.modularbot.core.ModularBot bot) |
void |
onShutdownShards() |
void |
registerDecorator(MessageDecorator<?> decorator)
Register a decorator in this module.
|
void |
unregisterBoundDecorator(long bindingId)
Destroy and unregister a bound decorator by its binding's id.
|
getBot, getInfo, getState, toString
public MessageDecoratorModule(@Nonnull com.jesus_crie.modularbot.nightconfig.NightConfigWrapperModule config, @Nonnull java.lang.String cachePath)
public MessageDecoratorModule(@Nonnull com.jesus_crie.modularbot.nightconfig.NightConfigWrapperModule config, @Nonnull java.io.File cachePath)
public void onShardsReady(@Nonnull com.jesus_crie.modularbot.core.ModularBot bot)
onShardsReady
in interface com.jesus_crie.modularbot.core.module.Lifecycle
onShardsReady
in class com.jesus_crie.modularbot.core.module.Module
public void onShutdownShards()
public void registerDecorator(@Nonnull MessageDecorator<?> decorator)
Can also be performed by MessageDecorator.register(MessageDecoratorModule)
.
decorator
- The decorator to register.MessageDecorator.register(MessageDecoratorModule)
,
MessageDecorator.register(ModularBot)
public void unregisterBoundDecorator(long bindingId)
bindingId
- The id of the decorator's binding.public java.util.Collection<MessageDecorator<?>> getDecorators()
public int cleanup()