Package org.prithvidiamond1
Class ServerHelperFunctions
java.lang.Object
org.prithvidiamond1.ServerHelperFunctions
This class holds all the server related bot helper functions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
removeAudioPlayerControls
(org.javacord.api.entity.channel.TextChannel textChannel) Method to remove audio player controls from bot messages sent in a server text channelstatic void
removeGlobalSlashCommand
(org.javacord.api.DiscordApi api, String commandName) Method to remove a global slash command from the botstatic DiscordServer
resolveServerModelById
(org.javacord.api.entity.server.Server server) Method that resolves a Javacord Server entity into its corresponding database model
-
Constructor Details
-
ServerHelperFunctions
public ServerHelperFunctions()
-
-
Method Details
-
removeAudioPlayerControls
public static void removeAudioPlayerControls(org.javacord.api.entity.channel.TextChannel textChannel) Method to remove audio player controls from bot messages sent in a server text channel- Parameters:
textChannel
- the server text channel where the audio player controls need to be removed
-
resolveServerModelById
Method that resolves a Javacord Server entity into its corresponding database model- Parameters:
server
- the Javacord Server entity object- Returns:
- returns as DiscordServer database model
-
removeGlobalSlashCommand
Method to remove a global slash command from the bot- Parameters:
api
- Discord bot api objectcommandName
- String of the command to be deleted
-