use of net.kodehawa.mantarobot.commands.music.requester.AudioLoader in project MantaroBot by Mantaro.
the class MantaroAudioManager method loadAndPlay.
public void loadAndPlay(GuildMessageReceivedEvent event, String trackUrl, boolean skipSelection, boolean addFirst) {
if (!AudioCmdUtils.connectToVoiceChannel(event))
return;
GuildMusicManager musicManager = getMusicManager(event.getGuild());
TrackScheduler scheduler = musicManager.getTrackScheduler();
scheduler.getAudioPlayer().setPaused(false);
if (scheduler.getQueue().isEmpty())
scheduler.setRepeatMode(null);
playerManager.loadItemOrdered(musicManager, trackUrl, new AudioLoader(musicManager, event, skipSelection, addFirst));
}
Aggregations