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 CommandKernelcommandKernel()Gets the command kernel of this bot.BotConfigconfig()Gets the config of the bot.static SimpleBotcreate(BotConfig config)Creates a newSimpleBotusing the given config.Databasedatabase()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.GatewayDiscordClientgateway()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.DiscordClientrest()Gets the REST client of the bot.voidstart()Starts the bot.
-
Method Details
-
config
Description copied from interface:BotGets the config of the bot. -
database
Description copied from interface:BotGets the database of the bot. -
commandKernel
Description copied from interface:BotGets the command kernel of this bot.- Specified by:
commandKernelin interfaceBot- Returns:
- the command kernel
-
rest
public discord4j.core.DiscordClient rest()Description copied from interface:BotGets the REST client of the bot. -
gateway
public discord4j.core.GatewayDiscordClient gateway()Description copied from interface:BotGets the gateway client of the bot. -
plugins
Description copied from interface:BotGets a Set containing all successfully loaded plugins. -
owner
public reactor.core.publisher.Mono<discord4j.core.object.entity.User> owner()Description copied from interface:BotGets the bot owner. -
log
Description copied from interface:BotSends a message into the debug log channel. -
emoji
Description copied from interface:BotGets 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:BotStarts the bot. This method blocks until the bot disconnects. -
create
Creates a newSimpleBotusing the given config.- Parameters:
config- the bot config- Returns:
- a new
SimpleBot
-