Package org.prithvidiamond1.AudioPlayer
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
FieldsModifier and TypeFieldDescriptionstatic final org.javacord.api.entity.message.component.ActionRowTheActionRowthat contains the audio player control buttons -
Constructor Summary
ConstructorsConstructorDescriptionPlayerControlsHandler(AudioSourceHandler audioSourceHandler) Simple constructor for initializing the PlayerControlsHandler -
Method Summary
Modifier and TypeMethodDescriptionvoidclearTrackQueue(org.javacord.api.interaction.MessageComponentInteraction componentInteraction) Method that handles the clear track queue button function of the bot's playervoidonComponentCreate(org.javacord.api.event.interaction.MessageComponentCreateEvent event) Method that handles button events (MessageComponentCreateEvent)voidviewFullTrackQueue(org.javacord.api.interaction.MessageComponentInteraction componentInteraction) Method that handles the view full track queue button function of the bot's player
-
Field Details
-
playerActionRow
public static final org.javacord.api.entity.message.component.ActionRow playerActionRowTheActionRowthat contains the audio player control buttons
-
-
Constructor Details
-
PlayerControlsHandler
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:
onComponentCreatein interfaceorg.javacord.api.listener.interaction.MessageComponentCreateListener- Parameters:
event- The message component trigger event
-