use of net.robinfriedli.aiode.command.widget.widgets.QueueWidget in project aiode by robinfriedli.
the class QueueCommand method listQueue.
private void listQueue() {
Guild guild = getContext().getGuild();
AudioManager audioManager = Aiode.get().getAudioManager();
AudioPlayback playback = audioManager.getPlaybackForGuild(guild);
AudioQueue audioQueue = playback.getAudioQueue();
CompletableFuture<Message> futureMessage = sendMessage(audioQueue.buildMessageEmbed(playback, guild));
WidgetRegistry widgetRegistry = getContext().getGuildContext().getWidgetRegistry();
CompletableFutures.thenAccept(futureMessage, message -> new QueueWidget(widgetRegistry, guild, message, playback).initialise());
}
Aggregations