Bot will seach for another video if the selected video cannot be played

This commit is contained in:
2020-07-22 23:13:27 -05:00
parent 82a25dbe09
commit eb3a5d2990
40 changed files with 293 additions and 255 deletions

View File

@@ -4,6 +4,7 @@ import com.fpghoti.biscuit.commands.BaseCommand;
import com.fpghoti.biscuit.commands.CommandType;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
public abstract class ClientCommand extends BaseCommand{
@@ -11,7 +12,7 @@ public abstract class ClientCommand extends BaseCommand{
return true;
}
public abstract void execute(String[] args, MessageReceivedEvent event);
public abstract void execute(String[] args, GuildMessageReceivedEvent event);
public CommandType getType() {
return CommandType.CLIENT;

View File

@@ -4,11 +4,11 @@ import com.fpghoti.biscuit.biscuit.Biscuit;
import com.fpghoti.biscuit.commands.BaseCommand;
import com.fpghoti.biscuit.commands.CommandType;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
public class CustomCommand extends BaseCommand {
public static String fixPlaceholders(MessageReceivedEvent event, String msg) {
public static String fixPlaceholders(GuildMessageReceivedEvent event, String msg) {
msg = msg.replace("<user>", event.getAuthor().getAsMention());
return msg;
}

View File

@@ -1,9 +1,9 @@
package com.fpghoti.biscuit.commands.base;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
public abstract class MusicClientCommand extends ClientCommand{
public abstract void execute(String[] args, MessageReceivedEvent event);
public abstract void execute(String[] args, GuildMessageReceivedEvent event);
}