use of fredboat.audio.queue.IdentifierContext in project FredBoat by Frederikam.
the class PlaySplitCommand method onInvoke.
@Override
public void onInvoke(@Nonnull CommandContext context) {
if (!context.hasArguments()) {
HelpCommand.sendFormattedCommandHelp(context);
return;
}
PlayerRegistry playerRegistry = Launcher.getBotController().getPlayerRegistry();
if (!playerLimiter.checkLimitResponsive(context, playerRegistry))
return;
IdentifierContext ic = new IdentifierContext(Launcher.getBotController().getJdaEntityProvider(), context.args[0], context.channel, context.invoker);
ic.setSplit(true);
GuildPlayer player = playerRegistry.getOrCreate(context.guild);
player.queue(ic);
player.setPause(false);
context.deleteMessage();
}
Aggregations