Class SlashMusicCommands
java.lang.Object
net.dv8tion.jda.api.hooks.ListenerAdapter
dev.jacrispys.JavaBot.commands.audio.SlashMusicCommands
- All Implemented Interfaces:
- net.dv8tion.jda.api.hooks.EventListener
public class SlashMusicCommands
extends net.dv8tion.jda.api.hooks.ListenerAdapter
New solution to commands, registers slash commands for audio and handles their implementations
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidinitCommands(List<net.dv8tion.jda.api.entities.Guild> guilds) Registers guild specific commands (unused)voidonReady(@NotNull net.dv8tion.jda.api.events.session.ReadyEvent event) Accounts for stages running after rebootvoidonSlashCommandInteraction(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event) Handles implementation for all registered audio slash commandsvoidonStageInstanceCreate(@NotNull net.dv8tion.jda.api.events.stage.StageInstanceCreateEvent event) Checks for stage instances being created, to allow bot to join stages and play musicvoidonStageInstanceDelete(@NotNull net.dv8tion.jda.api.events.stage.StageInstanceDeleteEvent event) Removes compatibility for stage channels once the instance is deletedprotected voidupdateGuildCommands(net.dv8tion.jda.api.entities.Guild guild) List<net.dv8tion.jda.api.interactions.commands.build.CommandData>Generates a list of commands to be updatedListenerAdapter.onReady(ReadyEvent)protected voidupdateMusicChannel(net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel channel) Internal updates to DatabaseMethods inherited from class net.dv8tion.jda.api.hooks.ListenerAdapteronApplicationCommandUpdatePrivileges, onApplicationUpdatePrivileges, onAutoModExecution, onAutoModRuleCreate, onAutoModRuleDelete, onAutoModRuleUpdate, onButtonInteraction, onChannelCreate, onChannelDelete, onChannelUpdateAppliedTags, onChannelUpdateArchived, onChannelUpdateArchiveTimestamp, onChannelUpdateAutoArchiveDuration, onChannelUpdateBitrate, onChannelUpdateDefaultLayout, onChannelUpdateDefaultReaction, onChannelUpdateDefaultSortOrder, onChannelUpdateDefaultThreadSlowmode, onChannelUpdateFlags, onChannelUpdateInvitable, onChannelUpdateLocked, onChannelUpdateName, onChannelUpdateNSFW, onChannelUpdateParent, onChannelUpdatePosition, onChannelUpdateRegion, onChannelUpdateSlowmode, onChannelUpdateTopic, onChannelUpdateType, onChannelUpdateUserLimit, onChannelUpdateVoiceStatus, onCommandAutoCompleteInteraction, onEmojiAdded, onEmojiRemoved, onEmojiUpdateName, onEmojiUpdateRoles, onEntitySelectInteraction, onEvent, onException, onForumTagAdd, onForumTagRemove, onForumTagUpdateEmoji, onForumTagUpdateModerated, onForumTagUpdateName, onGatewayPing, onGenericAutoCompleteInteraction, onGenericAutoModRule, onGenericChannel, onGenericChannelUpdate, onGenericCommandInteraction, onGenericComponentInteractionCreate, onGenericContextInteraction, onGenericEmoji, onGenericEmojiUpdate, onGenericEvent, onGenericForumTag, onGenericForumTagUpdate, onGenericGuild, onGenericGuildInvite, onGenericGuildMember, onGenericGuildMemberUpdate, onGenericGuildSticker, onGenericGuildStickerUpdate, onGenericGuildUpdate, onGenericGuildVoice, onGenericInteractionCreate, onGenericMessage, onGenericMessageReaction, onGenericPermissionOverride, onGenericPrivilegeUpdate, onGenericRole, onGenericRoleUpdate, onGenericScheduledEventGateway, onGenericScheduledEventUpdate, onGenericScheduledEventUser, onGenericSelectMenuInteraction, onGenericSelfUpdate, onGenericSession, onGenericSessionEvent, onGenericStageInstance, onGenericStageInstanceUpdate, onGenericThread, onGenericThreadMember, onGenericUpdate, onGenericUser, onGenericUserPresence, onGenericUserUpdate, onGuildAuditLogEntryCreate, onGuildAvailable, onGuildBan, onGuildInviteCreate, onGuildInviteDelete, onGuildJoin, onGuildLeave, onGuildMemberJoin, onGuildMemberRemove, onGuildMemberRoleAdd, onGuildMemberRoleRemove, onGuildMemberUpdate, onGuildMemberUpdateAvatar, onGuildMemberUpdateBoostTime, onGuildMemberUpdateFlags, onGuildMemberUpdateNickname, onGuildMemberUpdatePending, onGuildMemberUpdateTimeOut, onGuildReady, onGuildStickerAdded, onGuildStickerRemoved, onGuildStickerUpdateAvailable, onGuildStickerUpdateDescription, onGuildStickerUpdateName, onGuildStickerUpdateTags, onGuildTimeout, onGuildUnavailable, onGuildUnban, onGuildUpdateAfkChannel, onGuildUpdateAfkTimeout, onGuildUpdateBanner, onGuildUpdateBoostCount, onGuildUpdateBoostTier, onGuildUpdateCommunityUpdatesChannel, onGuildUpdateDescription, onGuildUpdateExplicitContentLevel, onGuildUpdateFeatures, onGuildUpdateIcon, onGuildUpdateLocale, onGuildUpdateMaxMembers, onGuildUpdateMaxPresences, onGuildUpdateMFALevel, onGuildUpdateName, onGuildUpdateNotificationLevel, onGuildUpdateNSFWLevel, onGuildUpdateOwner, onGuildUpdateRulesChannel, onGuildUpdateSplash, onGuildUpdateSystemChannel, onGuildUpdateVanityCode, onGuildUpdateVerificationLevel, onGuildVoiceDeafen, onGuildVoiceGuildDeafen, onGuildVoiceGuildMute, onGuildVoiceMute, onGuildVoiceRequestToSpeak, onGuildVoiceSelfDeafen, onGuildVoiceSelfMute, onGuildVoiceStream, onGuildVoiceSuppress, onGuildVoiceUpdate, onGuildVoiceVideo, onHttpRequest, onMessageBulkDelete, onMessageContextInteraction, onMessageDelete, onMessageEmbed, onMessageReactionAdd, onMessageReactionRemove, onMessageReactionRemoveAll, onMessageReactionRemoveEmoji, onMessageReceived, onMessageUpdate, onModalInteraction, onPermissionOverrideCreate, onPermissionOverrideDelete, onPermissionOverrideUpdate, onRawGateway, onRoleCreate, onRoleDelete, onRoleUpdateColor, onRoleUpdateHoisted, onRoleUpdateIcon, onRoleUpdateMentionable, onRoleUpdateName, onRoleUpdatePermissions, onRoleUpdatePosition, onScheduledEventCreate, onScheduledEventDelete, onScheduledEventUpdateDescription, onScheduledEventUpdateEndTime, onScheduledEventUpdateImage, onScheduledEventUpdateLocation, onScheduledEventUpdateName, onScheduledEventUpdateStartTime, onScheduledEventUpdateStatus, onScheduledEventUserAdd, onScheduledEventUserRemove, onSelfUpdateAvatar, onSelfUpdateGlobalName, onSelfUpdateMFA, onSelfUpdateName, onSelfUpdateVerified, onSessionDisconnect, onSessionInvalidate, onSessionRecreate, onSessionResume, onShutdown, onStageInstanceUpdatePrivacyLevel, onStageInstanceUpdateTopic, onStatusChange, onStringSelectInteraction, onThreadHidden, onThreadMemberJoin, onThreadMemberLeave, onThreadRevealed, onUnavailableGuildJoined, onUnavailableGuildLeave, onUserActivityEnd, onUserActivityStart, onUserContextInteraction, onUserTyping, onUserUpdateActivities, onUserUpdateActivityOrder, onUserUpdateAvatar, onUserUpdateDiscriminator, onUserUpdateFlags, onUserUpdateGlobalName, onUserUpdateName, onUserUpdateOnlineStatus
- 
Field Details- 
stageInstancepublic static net.dv8tion.jda.api.entities.StageInstance stageInstance
 
- 
- 
Constructor Details- 
SlashMusicCommandspublic SlashMusicCommands()
 
- 
- 
Method Details- 
initCommandsRegisters guild specific commands (unused)- Parameters:
- guilds- list of guilds to update commands for
 
- 
updateJdaCommandsGenerates a list of commands to be updatedListenerAdapter.onReady(ReadyEvent)- Returns:
- the list of Commands
 
- 
updateGuildCommandsprotected void updateGuildCommands(net.dv8tion.jda.api.entities.Guild guild) 
- 
updateMusicChannelprotected void updateMusicChannel(net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel channel) Internal updates to Database
- 
onStageInstanceCreatepublic void onStageInstanceCreate(@NotNull @NotNull net.dv8tion.jda.api.events.stage.StageInstanceCreateEvent event) Checks for stage instances being created, to allow bot to join stages and play music- Overrides:
- onStageInstanceCreatein class- net.dv8tion.jda.api.hooks.ListenerAdapter
 
- 
onStageInstanceDeletepublic void onStageInstanceDelete(@NotNull @NotNull net.dv8tion.jda.api.events.stage.StageInstanceDeleteEvent event) Removes compatibility for stage channels once the instance is deleted- Overrides:
- onStageInstanceDeletein class- net.dv8tion.jda.api.hooks.ListenerAdapter
 
- 
onReadypublic void onReady(@NotNull @NotNull net.dv8tion.jda.api.events.session.ReadyEvent event) Accounts for stages running after reboot- Overrides:
- onReadyin class- net.dv8tion.jda.api.hooks.ListenerAdapter
 
- 
onSlashCommandInteractionpublic void onSlashCommandInteraction(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event) Handles implementation for all registered audio slash commands- Overrides:
- onSlashCommandInteractionin class- net.dv8tion.jda.api.hooks.ListenerAdapter
 
 
-