Package org.prithvidiamond1
Class Main
java.lang.Object
org.prithvidiamond1.Main
The main class of the Discord bot
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumerations for the different voice channel connection states -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String[]Supported Audio Sources for voice channel audio playbackstatic ColorThe bot's accent color (currently a shade of cyan)static StringString containing a URL to the bot's icon imagestatic StringThe default guild prefix for bot guild commandsstatic DiscordServerRepositoryThe backend repository object for storing server preferencesstatic org.slf4j.LoggerThe main logger objectstatic StringThe YouTube API key -
Constructor Summary
ConstructorsConstructorDescriptionMain(DiscordServerRepository discordServerRepo) Constructor for the Main class -
Method Summary
Modifier and TypeMethodDescriptionorg.javacord.api.DiscordApiMethod that runs the Discord bot instancestatic voidThe start point for the Discord bot application
-
Field Details
-
botAccentColor
The bot's accent color (currently a shade of cyan) -
defaultGuildPrefix
The default guild prefix for bot guild commands -
botIconURL
String containing a URL to the bot's icon image -
audioSources
Supported Audio Sources for voice channel audio playback -
youtubeApiKey
The YouTube API key -
logger
public static org.slf4j.Logger loggerThe main logger object -
discordServerRepository
The backend repository object for storing server preferences
-
-
Constructor Details
-
Main
Constructor for the Main class- Parameters:
discordServerRepo- the backend MongoDB repository used for storing Discord server preferences
-
-
Method Details
-
discordApi
@Bean @ConfigurationProperties("discord-api") public org.javacord.api.DiscordApi discordApi()Method that runs the Discord bot instance- Returns:
- the Discord API instance used by the bot which is then dependency injected using SpringBoot
-
main
The start point for the Discord bot application- Parameters:
args- command line arguments
-