Some music bot functionality added

This commit is contained in:
2020-07-22 02:40:56 -05:00
parent 4838eee050
commit 82a25dbe09
55 changed files with 1391 additions and 197 deletions

View File

@@ -5,6 +5,10 @@ import java.util.List;
import com.fpghoti.biscuit.Main;
import com.fpghoti.biscuit.biscuit.Biscuit;
import com.fpghoti.biscuit.commands.base.ClientCommand;
import com.fpghoti.biscuit.commands.base.ConsoleCommand;
import com.fpghoti.biscuit.commands.base.CustomCommand;
import com.fpghoti.biscuit.commands.base.MusicClientCommand;
import com.fpghoti.biscuit.util.PermUtil;
import com.fpghoti.biscuit.util.Util;
@@ -69,6 +73,11 @@ public class CommandManager {
}
if(match != null) {
if(match instanceof MusicClientCommand && !b.getProperties().allowMusicBot()) {
return false;
}
if (trimmedArgs == null || (trimmedArgs.length > 0 && trimmedArgs[0].equals("?"))) {
commandReply(e, "``Command:" + " " + match.getName() + "``");
commandReply(e, "``Description:" + " " + match.getDescription() + "``");
@@ -118,6 +127,9 @@ public class CommandManager {
}
public static void addCommand(BaseCommand command) {
if(command instanceof MusicClientCommand && !Main.getMainBiscuit().getProperties().musicBotEnabled()) {
return;
}
commands.add(command);
}