Class PlayerControlsHandler

java.lang.Object
org.prithvidiamond1.AudioPlayer.PlayerControlsHandler
All Implemented Interfaces:
org.javacord.api.listener.channel.group.GroupChannelAttachableListener, org.javacord.api.listener.channel.server.text.ServerTextChannelAttachableListener, org.javacord.api.listener.channel.TextChannelAttachableListener, org.javacord.api.listener.channel.user.PrivateChannelAttachableListener, org.javacord.api.listener.GloballyAttachableListener, org.javacord.api.listener.interaction.MessageComponentCreateListener, org.javacord.api.listener.message.MessageAttachableListener, org.javacord.api.listener.ObjectAttachableListener, org.javacord.api.listener.server.ServerAttachableListener, org.javacord.api.listener.user.UserAttachableListener

public class PlayerControlsHandler extends Object implements org.javacord.api.listener.interaction.MessageComponentCreateListener
This class contains methods and fields for handling the audio player controls from the user's end
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.javacord.api.entity.message.component.ActionRow
    The ActionRow that contains the audio player control buttons
  • Constructor Summary

    Constructors
    Constructor
    Description
    Simple constructor for initializing the PlayerControlsHandler
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clearTrackQueue(org.javacord.api.interaction.MessageComponentInteraction componentInteraction)
    Method that handles the clear track queue button function of the bot's player
    void
    onComponentCreate(org.javacord.api.event.interaction.MessageComponentCreateEvent event)
    Method that handles button events (MessageComponentCreateEvent)
    void
    viewFullTrackQueue(org.javacord.api.interaction.MessageComponentInteraction componentInteraction)
    Method that handles the view full track queue button function of the bot's player

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • playerActionRow

      public static final org.javacord.api.entity.message.component.ActionRow playerActionRow
      The ActionRow that contains the audio player control buttons
  • Constructor Details

    • PlayerControlsHandler

      public PlayerControlsHandler(AudioSourceHandler audioSourceHandler)
      Simple constructor for initializing the PlayerControlsHandler
      Parameters:
      audioSourceHandler - the AudioSourceHandler of the active bot's AudioPlayer instance
  • Method Details

    • viewFullTrackQueue

      public void viewFullTrackQueue(org.javacord.api.interaction.MessageComponentInteraction componentInteraction)
      Method that handles the view full track queue button function of the bot's player
      Parameters:
      componentInteraction - the interaction from the button (MessageComponentInteraction)
    • clearTrackQueue

      public void clearTrackQueue(org.javacord.api.interaction.MessageComponentInteraction componentInteraction)
      Method that handles the clear track queue button function of the bot's player
      Parameters:
      componentInteraction - the interaction from the button (MessageComponentInteraction)
    • onComponentCreate

      public void onComponentCreate(org.javacord.api.event.interaction.MessageComponentCreateEvent event)
      Method that handles button events (MessageComponentCreateEvent)
      Specified by:
      onComponentCreate in interface org.javacord.api.listener.interaction.MessageComponentCreateListener
      Parameters:
      event - The message component trigger event