Class ServerHelperFunctions

java.lang.Object
org.prithvidiamond1.ServerHelperFunctions

public class ServerHelperFunctions extends Object
This class holds all the server related bot helper functions
  • 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

      public static DiscordServer resolveServerModelById(org.javacord.api.entity.server.Server server)
      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

      public static void removeGlobalSlashCommand(org.javacord.api.DiscordApi api, String commandName)
      Method to remove a global slash command from the bot
      Parameters:
      api - Discord bot api object
      commandName - String of the command to be deleted