Package kboyle.oktane.discord4j.module
Class DiscordModuleBase<CONTEXT extends DiscordCommandContext>
java.lang.Object
kboyle.oktane.core.module.ModuleBase<CONTEXT>
kboyle.oktane.discord4j.module.DiscordModuleBase<CONTEXT>
- Type Parameters:
CONTEXT
- The type ofDiscordCommandContext
to use.
public abstract class DiscordModuleBase<CONTEXT extends DiscordCommandContext>
extends ModuleBase<CONTEXT>
Represents a base class to designate a class as a Discord based
CommandModule
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CommandResult
Represents anEmbed
reply to aMessage
.protected CommandResult
Represents a reply to aMessage
.protected CommandResult
Represents a reply to aMessage
.Methods inherited from class kboyle.oktane.core.module.ModuleBase
context, exception, message, nop
-
Constructor Details
-
DiscordModuleBase
public DiscordModuleBase()
-
-
Method Details
-
reply
Represents a reply to aMessage
. Does not mention anyone by default.- Parameters:
content
- The message to send.- Returns:
- A
CommandResult
representing a reply to the user.
-
reply
protected CommandResult reply(Consumer<discord4j.core.spec.MessageCreateSpec> messageCreateSpecConsumer)Represents a reply to aMessage
. Does not mention anyone by default.- Parameters:
messageCreateSpecConsumer
- The spec to use for theMessage
.- Returns:
- A
CommandResult
representing a reply to the user.
-
embed
protected CommandResult embed(Consumer<discord4j.core.spec.EmbedCreateSpec> embedCreateSpecConsumer)Represents anEmbed
reply to aMessage
. Does not mention anyone by default.- Parameters:
embedCreateSpecConsumer
- The spec to use for theEmbed
.- Returns:
- A
CommandResult
representing anEmbed
reply to the user.
-