dependency updates

more emojis
This commit is contained in:
John Grosh 2018-02-07 11:07:37 -05:00
parent e478fa43c8
commit 2eeffb374f
32 changed files with 128 additions and 119 deletions

View file

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.jagrosh</groupId>
<artifactId>JMusicBot</artifactId>
<version>0.1.1</version>
<version>0.1.2</version>
<packaging>jar</packaging>
<repositories>
@ -23,17 +23,17 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.3.1_316</version>
<version>3.5.0_335</version>
</dependency>
<dependency>
<groupId>com.sedmelluq</groupId>
<artifactId>lavaplayer</artifactId>
<version>1.2.45</version>
<version>1.2.47</version>
</dependency>
<dependency>
<groupId>com.jagrosh</groupId>
<artifactId>JDA-Utilities</artifactId>
<version>1.9</version>
<version>2.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>

View file

@ -27,9 +27,9 @@ import java.util.HashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import com.jagrosh.jdautilities.commandclient.Command.Category;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.waiter.EventWaiter;
import com.jagrosh.jdautilities.command.Command.Category;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jdautilities.commons.waiter.EventWaiter;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.gui.GUI;
import com.jagrosh.jmusicbot.utils.FormatUtil;

View file

@ -32,20 +32,9 @@ import net.dv8tion.jda.core.entities.Game;
*/
public class Config {
private boolean nogui;
private String prefix;
private String altprefix;
private String token;
private String owner;
private String success;
private String warning;
private String error;
private String game;
private String help;
private boolean stay;
private boolean dbots;
private boolean songingame;
private boolean useEval;
private boolean npimages;
private String prefix, altprefix, token, owner, success, warning, error, game,
help, loadingEmoji, searchingEmoji;
private boolean stay, dbots, songingame, useEval, npimages;
private long maxSeconds;
private OnlineStatus status = OnlineStatus.UNKNOWN;
@ -84,6 +73,12 @@ public class Config {
case "error":
error = value;
break;
case "loading":
loadingEmoji = value;
break;
case "searching":
searchingEmoji = value;
break;
case "game":
game = value;
break;
@ -203,6 +198,16 @@ public class Config {
return error==null ? "\uD83D\uDEAB" : error;
}
public String getLoading()
{
return loadingEmoji==null ? "\u231A" : loadingEmoji;
}
public String getSearching()
{
return searchingEmoji==null ? "\uD83D\uDD0E" : searchingEmoji;
}
public Game getGame()
{
if(game==null || game.isEmpty())

View file

@ -17,10 +17,10 @@ package com.jagrosh.jmusicbot;
import java.awt.Color;
import javax.security.auth.login.LoginException;
import com.jagrosh.jdautilities.commandclient.CommandClient;
import com.jagrosh.jdautilities.commandclient.CommandClientBuilder;
import com.jagrosh.jdautilities.commandclient.examples.*;
import com.jagrosh.jdautilities.waiter.EventWaiter;
import com.jagrosh.jdautilities.command.CommandClient;
import com.jagrosh.jdautilities.command.CommandClientBuilder;
import com.jagrosh.jdautilities.commons.waiter.EventWaiter;
import com.jagrosh.jdautilities.examples.command.*;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.commands.*;
import com.jagrosh.jmusicbot.gui.GUI;
@ -29,7 +29,6 @@ import net.dv8tion.jda.core.JDABuilder;
import net.dv8tion.jda.core.OnlineStatus;
import net.dv8tion.jda.core.Permission;
import net.dv8tion.jda.core.entities.Game;
import net.dv8tion.jda.core.exceptions.RateLimitedException;
import org.slf4j.LoggerFactory;
/**
@ -59,7 +58,7 @@ public class JMusicBot {
Bot bot = new Bot(waiter, config);
AboutCommand ab = new AboutCommand(Color.BLUE.brighter(),
"a music bot that is [easy to host yourself!](https://github.com/jagrosh/MusicBot) (v0.1.1)",
"a music bot that is [easy to host yourself!](https://github.com/jagrosh/MusicBot) (v0.1.2)",
new String[]{"High-quality music playback", "FairQueue™ Technology", "Easy to host yourself"},
RECOMMENDED_PERMS);
ab.setIsAuthor(false);
@ -82,12 +81,12 @@ public class JMusicBot {
new SettingsCmd(bot),
new NowplayingCmd(bot),
new PlayCmd(bot),
new PlayCmd(bot, config.getLoading()),
new PlaylistsCmd(bot),
new QueueCmd(bot),
new RemoveCmd(bot),
new SearchCmd(bot),
new SCSearchCmd(bot),
new SearchCmd(bot, config.getSearching()),
new SCSearchCmd(bot, config.getSearching()),
new ShuffleCmd(bot),
new SkipCmd(bot),
@ -145,7 +144,7 @@ public class JMusicBot {
new JDABuilder(AccountType.BOT)
.setToken(config.getToken())
.setAudioEnabled(true)
.setGame(nogame ? null : Game.of("loading..."))
.setGame(nogame ? null : Game.playing("loading..."))
.setStatus(config.getStatus()==OnlineStatus.INVISIBLE||config.getStatus()==OnlineStatus.OFFLINE ? OnlineStatus.INVISIBLE : OnlineStatus.DO_NOT_DISTURB)
.addEventListener(client)
.addEventListener(waiter)
@ -157,7 +156,7 @@ public class JMusicBot {
+ "editing the correct config.txt file, and that you have used the "
+ "correct token (not the 'secret'!)");
}
catch(IllegalArgumentException | RateLimitedException ex)
catch(IllegalArgumentException ex)
{
LoggerFactory.getLogger("Startup").error(""+ex);
}

View file

@ -15,13 +15,8 @@
*/
package com.jagrosh.jmusicbot.commands;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.playlist.Playlist;

View file

@ -17,8 +17,8 @@ package com.jagrosh.jmusicbot.commands;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
/**

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import net.dv8tion.jda.core.entities.User;

View file

@ -15,8 +15,8 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.Settings;
import com.jagrosh.jmusicbot.audio.AudioHandler;
@ -51,7 +51,7 @@ public abstract class MusicCommand extends Command {
try {
event.getMessage().delete().queue();
} catch(PermissionException e){}
event.replyInDM(event.getClient().getError()+" You can only use that command in <#"+settings.getTextId()+">!");
event.replyInDm(event.getClient().getError()+" You can only use that command in <#"+settings.getTextId()+">!");
return;
}
if(bePlaying

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.utils.FormatUtil;
import net.dv8tion.jda.core.Permission;

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import net.dv8tion.jda.core.entities.User;

View file

@ -20,18 +20,16 @@ import com.sedmelluq.discord.lavaplayer.tools.FriendlyException;
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException.Severity;
import com.sedmelluq.discord.lavaplayer.track.AudioPlaylist;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.waiter.EventWaiter;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jdautilities.menu.ButtonMenu;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.playlist.Playlist;
import com.jagrosh.jmusicbot.utils.FormatUtil;
import java.util.concurrent.TimeUnit;
import net.dv8tion.jda.core.Permission;
import net.dv8tion.jda.core.entities.Emote;
import net.dv8tion.jda.core.entities.Message;
import net.dv8tion.jda.core.events.message.react.MessageReactionAddEvent;
import net.dv8tion.jda.core.exceptions.PermissionException;
/**
@ -40,9 +38,14 @@ import net.dv8tion.jda.core.exceptions.PermissionException;
*/
public class PlayCmd extends MusicCommand
{
public PlayCmd(Bot bot)
public final static String LOAD = "\uD83D\uDCE5";
public final static String CANCEL = "\uD83D\uDEAB";
private final String loadingEmoji;
public PlayCmd(Bot bot, String loadingEmoji)
{
super(bot);
this.loadingEmoji = loadingEmoji;
this.name = "play";
this.arguments = "<title|URL|subcommand>";
this.help = "plays the provided song";
@ -60,7 +63,7 @@ public class PlayCmd extends MusicCommand
{
boolean isDJ = event.getMember().hasPermission(Permission.MANAGE_SERVER);
if(!isDJ)
isDJ = event.isOwner() || event.isCoOwner();
isDJ = event.isOwner();
if(!isDJ)
isDJ = event.getMember().getRoles().contains(event.getGuild().getRoleById(bot.getSettings(event.getGuild()).getRoleId()));
if(!isDJ)
@ -83,7 +86,7 @@ public class PlayCmd extends MusicCommand
String args = event.getArgs().startsWith("<") && event.getArgs().endsWith(">")
? event.getArgs().substring(1,event.getArgs().length()-1)
: event.getArgs();
event.reply("\u231A Loading... `["+args+"]`", m -> bot.getAudioManager().loadItemOrdered(event.getGuild(), args, new ResultHandler(m,event,false)));
event.reply(loadingEmoji+" Loading... `["+args+"]`", m -> bot.getAudioManager().loadItemOrdered(event.getGuild(), args, new ResultHandler(m,event,false)));
}
private class ResultHandler implements AudioLoadResultHandler
@ -114,19 +117,21 @@ public class PlayCmd extends MusicCommand
m.editMessage(addMsg).queue();
else
{
m.editMessage(addMsg+"\n"+event.getClient().getWarning()+" This track has a playlist of **"+playlist.getTracks().size()+"** tracks attached. Load playlist?")
.queue(m ->
new ButtonMenu.Builder()
.setText(addMsg+"\n"+event.getClient().getWarning()+" This track has a playlist of **"+playlist.getTracks().size()+"** tracks attached. Select "+LOAD+" to load playlist.")
.setChoices(LOAD, CANCEL)
.setEventWaiter(bot.getWaiter())
.setTimeout(30, TimeUnit.SECONDS)
.setAction(re ->
{
m.addReaction("\u2705").queue();
bot.getWaiter().waitForEvent(MessageReactionAddEvent.class,
e -> e.getMessageIdLong()==m.getIdLong() && e.getUser().getIdLong()==event.getAuthor().getIdLong(),
e ->
{
m.editMessage(addMsg+"\n"+event.getClient().getSuccess()+" Loaded **"+loadPlaylist(playlist, track)+"** additional tracks!").queue();
try{m.clearReactions().queue();}catch(PermissionException ex){}
},
2, TimeUnit.MINUTES, () -> {try{m.clearReactions().queue();}catch(PermissionException e){}});
});
if(re.getName().equals(LOAD))
m.editMessage(addMsg+"\n"+event.getClient().getSuccess()+" Loaded **"+loadPlaylist(playlist, track)+"** additional tracks!").queue();
else
m.editMessage(addMsg).queue();
}).setFinalAction(m ->
{
try{m.clearReactions().queue();}catch(PermissionException ex){}
}).build().display(m);
}
}
@ -226,7 +231,7 @@ public class PlayCmd extends MusicCommand
event.reply(event.getClient().getError()+" I could not find `"+event.getArgs()+".txt` in the Playlists folder.");
return;
}
event.getChannel().sendMessage("\u231A Loading playlist **"+event.getArgs()+"**... ("+playlist.getItems().size()+" items)").queue(m -> {
event.getChannel().sendMessage(loadingEmoji+" Loading playlist **"+event.getArgs()+"**... ("+playlist.getItems().size()+" items)").queue(m -> {
playlist.loadTracks(bot.getAudioManager(), (at)->bot.queueTrack(event, at), () -> {
StringBuilder builder = new StringBuilder(playlist.getTracks().isEmpty()
? event.getClient().getWarning()+" No tracks were loaded!"

View file

@ -20,8 +20,8 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.playlist.Playlist;

View file

@ -16,7 +16,7 @@
package com.jagrosh.jmusicbot.commands;
import java.util.List;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.playlist.Playlist;

View file

@ -17,8 +17,8 @@ package com.jagrosh.jmusicbot.commands;
import java.util.List;
import java.util.concurrent.TimeUnit;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.menu.pagination.PaginatorBuilder;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jdautilities.menu.Paginator;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.audio.QueuedTrack;
@ -32,7 +32,7 @@ import net.dv8tion.jda.core.exceptions.PermissionException;
*/
public class QueueCmd extends MusicCommand {
private final PaginatorBuilder builder;
private final Paginator.Builder builder;
public QueueCmd(Bot bot)
{
super(bot);
@ -42,7 +42,7 @@ public class QueueCmd extends MusicCommand {
this.aliases = new String[]{"list"};
this.bePlaying = true;
this.botPermissions = new Permission[]{Permission.MESSAGE_ADD_REACTION,Permission.MESSAGE_EMBED_LINKS};
builder = new PaginatorBuilder()
builder = new Paginator.Builder()
.setColumns(1)
.setFinalAction(m -> {try{m.clearReactions().queue();}catch(PermissionException e){}})
.setItemsPerPage(10)
@ -76,7 +76,7 @@ public class QueueCmd extends MusicCommand {
songs[i] = list.get(i).toString();
}
long fintotal = total;
builder.setText((i1,i2) -> getQueueTitle(ah, event.getClient().getSuccess(), songs.length, fintotal, bot.getSettings(event.getGuild()).getRepeatMode()))
builder.setText((i1,i2) -> event.getClient().getSuccess()+" "+getQueueTitle(ah, event.getClient().getSuccess(), songs.length, fintotal, bot.getSettings(event.getGuild()).getRepeatMode()))
.setItems(songs)
.setUsers(event.getAuthor())
.setColor(event.getSelfMember().getColor())

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.audio.QueuedTrack;

View file

@ -15,8 +15,8 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
/**

View file

@ -21,8 +21,8 @@ import com.sedmelluq.discord.lavaplayer.tools.FriendlyException.Severity;
import com.sedmelluq.discord.lavaplayer.track.AudioPlaylist;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
import java.util.concurrent.TimeUnit;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.menu.orderedmenu.OrderedMenuBuilder;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jdautilities.menu.OrderedMenu;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.utils.FormatUtil;
@ -35,17 +35,19 @@ import net.dv8tion.jda.core.entities.Message;
*/
public class SCSearchCmd extends MusicCommand {
private final OrderedMenuBuilder builder;
public SCSearchCmd(Bot bot)
private final OrderedMenu.Builder builder;
private final String searchingEmoji;
public SCSearchCmd(Bot bot, String searchingEmoji)
{
super(bot);
this.searchingEmoji = searchingEmoji;
this.name = "scsearch";
this.arguments = "<query>";
this.help = "searches Soundcloud for a provided query";
this.beListening = true;
this.bePlaying = false;
this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS};
builder = new OrderedMenuBuilder()
builder = new OrderedMenu.Builder()
.allowTextInput(true)
.useNumbers()
.useCancelButton(true)
@ -60,7 +62,7 @@ public class SCSearchCmd extends MusicCommand {
event.reply(event.getClient().getError()+" Please include a query.");
return;
}
event.reply("\uD83D\uDD0E Searching... `["+event.getArgs()+"]`",m -> bot.getAudioManager().loadItemOrdered(event.getGuild(), "scsearch:"+event.getArgs(), new ResultHandler(m,event)));
event.reply(searchingEmoji+" Searching... `["+event.getArgs()+"]`",m -> bot.getAudioManager().loadItemOrdered(event.getGuild(), "scsearch:"+event.getArgs(), new ResultHandler(m,event)));
}
private class ResultHandler implements AudioLoadResultHandler {
@ -91,7 +93,7 @@ public class SCSearchCmd extends MusicCommand {
builder.setColor(event.getSelfMember().getColor())
.setText(FormatUtil.filter(event.getClient().getSuccess()+" Search results for `"+event.getArgs()+"`:"))
.setChoices(new String[0])
.setAction(i -> {
.setSelection((msg, i) -> {
AudioTrack track = playlist.getTracks().get(i-1);
if(AudioHandler.isTooLong(track))
{
@ -104,7 +106,7 @@ public class SCSearchCmd extends MusicCommand {
+"** (`"+FormatUtil.formatTime(track.getDuration())+"`) "+(pos==0 ? "to begin playing"
: " to the queue at position "+pos));
})
.setCancel(() -> {})
.setCancel((msg) -> {})
.setUsers(event.getAuthor())
;
for(int i=0; i<4&&i<playlist.getTracks().size(); i++)

View file

@ -21,8 +21,8 @@ import com.sedmelluq.discord.lavaplayer.tools.FriendlyException.Severity;
import com.sedmelluq.discord.lavaplayer.track.AudioPlaylist;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
import java.util.concurrent.TimeUnit;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.menu.orderedmenu.OrderedMenuBuilder;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jdautilities.menu.OrderedMenu;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.utils.FormatUtil;
@ -35,10 +35,12 @@ import net.dv8tion.jda.core.entities.Message;
*/
public class SearchCmd extends MusicCommand {
private final OrderedMenuBuilder builder;
public SearchCmd(Bot bot)
private final OrderedMenu.Builder builder;
private final String searchingEmoji;
public SearchCmd(Bot bot, String searchingEmoji)
{
super(bot);
this.searchingEmoji = searchingEmoji;
this.name = "search";
this.aliases = new String[]{"ytsearch"};
this.arguments = "<query>";
@ -46,7 +48,7 @@ public class SearchCmd extends MusicCommand {
this.beListening = true;
this.bePlaying = false;
this.botPermissions = new Permission[]{Permission.MESSAGE_EMBED_LINKS};
builder = new OrderedMenuBuilder()
builder = new OrderedMenu.Builder()
.allowTextInput(true)
.useNumbers()
.useCancelButton(true)
@ -61,7 +63,7 @@ public class SearchCmd extends MusicCommand {
event.reply(event.getClient().getError()+" Please include a query.");
return;
}
event.reply("\uD83D\uDD0E Searching... `["+event.getArgs()+"]`",m ->bot.getAudioManager().loadItemOrdered(event.getGuild(), "ytsearch:"+event.getArgs(), new ResultHandler(m,event)));
event.reply(searchingEmoji+" Searching... `["+event.getArgs()+"]`",m ->bot.getAudioManager().loadItemOrdered(event.getGuild(), "ytsearch:"+event.getArgs(), new ResultHandler(m,event)));
}
private class ResultHandler implements AudioLoadResultHandler {
@ -88,11 +90,12 @@ public class SearchCmd extends MusicCommand {
}
@Override
public void playlistLoaded(AudioPlaylist playlist) {
public void playlistLoaded(AudioPlaylist playlist)
{
builder.setColor(event.getSelfMember().getColor())
.setText(FormatUtil.filter(event.getClient().getSuccess()+" Search results for `"+event.getArgs()+"`:"))
.setChoices(new String[0])
.setAction(i -> {
.setSelection((msg,i) -> {
AudioTrack track = playlist.getTracks().get(i-1);
if(AudioHandler.isTooLong(track))
{
@ -105,7 +108,7 @@ public class SearchCmd extends MusicCommand {
+"** (`"+FormatUtil.formatTime(track.getDuration())+"`) "+(pos==0 ? "to begin playing"
: " to the queue at position "+pos));
})
.setCancel(() -> {})
.setCancel((msg) -> {})
.setUsers(event.getAuthor())
;
for(int i=0; i<4&&i<playlist.getTracks().size(); i++)

View file

@ -18,8 +18,8 @@ package com.jagrosh.jmusicbot.commands;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.utils.OtherUtil;
import net.dv8tion.jda.core.entities.Icon;

View file

@ -16,8 +16,8 @@
package com.jagrosh.jmusicbot.commands;
import java.util.List;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.utils.FinderUtil;
import com.jagrosh.jmusicbot.utils.FormatUtil;

View file

@ -15,8 +15,8 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import net.dv8tion.jda.core.entities.Game;

View file

@ -15,8 +15,8 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import net.dv8tion.jda.core.exceptions.RateLimitedException;

View file

@ -15,8 +15,8 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import net.dv8tion.jda.core.OnlineStatus;

View file

@ -16,8 +16,8 @@
package com.jagrosh.jmusicbot.commands;
import java.util.List;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.utils.FinderUtil;
import com.jagrosh.jmusicbot.utils.FormatUtil;

View file

@ -15,8 +15,8 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.Settings;
import net.dv8tion.jda.core.EmbedBuilder;

View file

@ -16,8 +16,8 @@
package com.jagrosh.jmusicbot.commands;
import java.util.List;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.utils.FinderUtil;
import com.jagrosh.jmusicbot.utils.FormatUtil;

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;

View file

@ -15,8 +15,8 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.Command;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
/**

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import net.dv8tion.jda.core.entities.User;

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import net.dv8tion.jda.core.entities.User;

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;

View file

@ -15,7 +15,7 @@
*/
package com.jagrosh.jmusicbot.commands;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.command.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.utils.FormatUtil;