Interface Bot
-
- All Known Implementing Classes:
SimpleBot
public interface Bot
Represents the bot itself.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandKernel
commandKernel()
Gets the command kernel of this bot.BotConfig
config()
Gets the config of the bot.Database
database()
Gets the database of the bot.reactor.core.publisher.Mono<String>
emoji(String emojiName)
Gets the String representation of an emoji installed on one of the emoji servers.discord4j.core.GatewayDiscordClient
gateway()
Gets the gateway client of the bot.reactor.core.publisher.Mono<Void>
log(String message)
Sends a message into the debug log channel.reactor.core.publisher.Mono<discord4j.core.object.entity.User>
owner()
Gets the bot owner.Set<Plugin>
plugins()
Gets a Set containing all successfully loaded plugins.discord4j.core.DiscordClient
rest()
Gets the REST client of the bot.void
start()
Starts the bot.
-
-
-
Method Detail
-
config
BotConfig config()
Gets the config of the bot.- Returns:
- the config
-
database
Database database()
Gets the database of the bot.- Returns:
- the database
-
commandKernel
CommandKernel commandKernel()
Gets the command kernel of this bot.- Returns:
- the command kernel
-
rest
discord4j.core.DiscordClient rest()
Gets the REST client of the bot.- Returns:
- the Discord client
-
gateway
discord4j.core.GatewayDiscordClient gateway()
Gets the gateway client of the bot.- Returns:
- the gateway client
-
plugins
Set<Plugin> plugins()
Gets a Set containing all successfully loaded plugins.- Returns:
- a Set of Plugin
-
owner
reactor.core.publisher.Mono<discord4j.core.object.entity.User> owner()
Gets the bot owner.- Returns:
- a Mono emitting the bot owner
-
log
reactor.core.publisher.Mono<Void> log(String message)
Sends a message into the debug log channel.- Parameters:
message
- the message to send- Returns:
- a Mono completing when the log message is sent
-
emoji
reactor.core.publisher.Mono<String> emoji(String emojiName)
Gets the String representation of an emoji installed on one of the emoji servers. If the emoji is not found, the returned value is the given name wrapped in colons.- Parameters:
emojiName
- the name of the emoji to look for- Returns:
- a Mono emitting the emoji code corresponding to the given name
-
start
void start()
Starts the bot. This method blocks until the bot disconnects.
-
-