Class SimpleBot
java.lang.Object
com.github.alex1304.ultimategdbot.api.SimpleBot
- All Implemented Interfaces:
Bot
public class SimpleBot extends Object implements Bot
Basic implementation of a Discord bot, configured with default Discord4J
settings.
-
Method Summary
Modifier and Type Method Description CommandKernel
commandKernel()
Gets the command kernel of this bot.BotConfig
config()
Gets the config of the bot.static SimpleBot
create(BotConfig config)
Creates a newSimpleBot
using the given config.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 Details
-
config
Description copied from interface:Bot
Gets the config of the bot. -
database
Description copied from interface:Bot
Gets the database of the bot. -
commandKernel
Description copied from interface:Bot
Gets the command kernel of this bot.- Specified by:
commandKernel
in interfaceBot
- Returns:
- the command kernel
-
rest
public discord4j.core.DiscordClient rest()Description copied from interface:Bot
Gets the REST client of the bot. -
gateway
public discord4j.core.GatewayDiscordClient gateway()Description copied from interface:Bot
Gets the gateway client of the bot. -
plugins
Description copied from interface:Bot
Gets a Set containing all successfully loaded plugins. -
owner
public reactor.core.publisher.Mono<discord4j.core.object.entity.User> owner()Description copied from interface:Bot
Gets the bot owner. -
log
Description copied from interface:Bot
Sends a message into the debug log channel. -
emoji
Description copied from interface:Bot
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. -
start
public void start()Description copied from interface:Bot
Starts the bot. This method blocks until the bot disconnects. -
create
Creates a newSimpleBot
using the given config.- Parameters:
config
- the bot config- Returns:
- a new
SimpleBot
-