diff --git a/src/main/java/com/jagrosh/jmusicbot/commands/dj/PlaynextCmd.java b/src/main/java/com/jagrosh/jmusicbot/commands/dj/PlaynextCmd.java index 95a8334ad..0d5924edc 100644 --- a/src/main/java/com/jagrosh/jmusicbot/commands/dj/PlaynextCmd.java +++ b/src/main/java/com/jagrosh/jmusicbot/commands/dj/PlaynextCmd.java @@ -60,9 +60,6 @@ public void doCommand(CommandEvent event) String args = event.getArgs().startsWith("<") && event.getArgs().endsWith(">") ? event.getArgs().substring(1,event.getArgs().length()-1) : event.getArgs().isEmpty() ? event.getMessage().getAttachments().get(0).getUrl() : event.getArgs(); - if (args == event.getMessage().getAttachments().get(0).getUrl() && bot.getConfig().getPiped() != null && args.contains(bot.getConfig().getPiped())) { - args.replace(bot.getConfig().getPiped(), "youtube.com"); - } event.reply(loadingEmoji+" Loading... `["+args+"]`", m -> bot.getPlayerManager().loadItemOrdered(event.getGuild(), args, new ResultHandler(m,event,false))); } diff --git a/src/main/java/com/jagrosh/jmusicbot/commands/music/PlayCmd.java b/src/main/java/com/jagrosh/jmusicbot/commands/music/PlayCmd.java index d2d8dca2e..67c8c8a1b 100644 --- a/src/main/java/com/jagrosh/jmusicbot/commands/music/PlayCmd.java +++ b/src/main/java/com/jagrosh/jmusicbot/commands/music/PlayCmd.java @@ -89,9 +89,6 @@ public void doCommand(CommandEvent event) String args = event.getArgs().startsWith("<") && event.getArgs().endsWith(">") ? event.getArgs().substring(1,event.getArgs().length()-1) : event.getArgs().isEmpty() ? event.getMessage().getAttachments().get(0).getUrl() : event.getArgs(); - if (args == event.getMessage().getAttachments().get(0).getUrl() && bot.getConfig().getPiped() != null && args.contains(bot.getConfig().getPiped())) { - args.replace(bot.getConfig().getPiped(), "youtube.com"); - } event.reply(loadingEmoji+" Loading... `["+args+"]`", m -> bot.getPlayerManager().loadItemOrdered(event.getGuild(), args, new ResultHandler(m,event,false))); } diff --git a/src/main/java/com/jagrosh/jmusicbot/commands/owner/DebugCmd.java b/src/main/java/com/jagrosh/jmusicbot/commands/owner/DebugCmd.java index bf31385f8..829955d9f 100644 --- a/src/main/java/com/jagrosh/jmusicbot/commands/owner/DebugCmd.java +++ b/src/main/java/com/jagrosh/jmusicbot/commands/owner/DebugCmd.java @@ -57,7 +57,6 @@ protected void execute(CommandEvent event) .append("\n Owner = ").append(bot.getConfig().getOwnerId()) .append("\n Prefix = ").append(bot.getConfig().getPrefix()) .append("\n AltPrefix = ").append(bot.getConfig().getAltPrefix()) - .append("\n PipedURL = ").append(bot.getConfig().getPiped()) .append("\n MaxSeconds = ").append(bot.getConfig().getMaxSeconds()) .append("\n NPImages = ").append(bot.getConfig().useNPImages()) .append("\n SongInStatus = ").append(bot.getConfig().getSongInStatus()) diff --git a/src/main/java/com/jagrosh/jmusicbot/utils/OtherUtil.java b/src/main/java/com/jagrosh/jmusicbot/utils/OtherUtil.java index 75aecc6e5..90abba841 100644 --- a/src/main/java/com/jagrosh/jmusicbot/utils/OtherUtil.java +++ b/src/main/java/com/jagrosh/jmusicbot/utils/OtherUtil.java @@ -223,41 +223,4 @@ public static String getUnsupportedBotReason(JDA jda) ApplicationInfo info = jda.retrieveApplicationInfo().complete(); return null; } - - public static boolean isPipedInstance(String url) - { - try - { - Response response = new OkHttpClient.Builder().build() - .newCall(new Request.Builder().get().url(url + "/trending").build()) - .execute(); - ResponseBody body = response.body(); - if(body != null) - { - try(Reader reader = body.charStream()) - { - JSONObject obj = new JSONObject(new JSONTokener(reader)); - try { - if (obj.getString("error") == "region is a required parameter") { - return true; - } - return false; - } - catch (Exception e) { - return false; - } - } - finally - { - response.close(); - } - } - else - return false; - } - catch(IOException | JSONException | NullPointerException ex) - { - return false; - } - } } diff --git a/src/main/resources/reference.conf b/src/main/resources/reference.conf index 6c1520fe9..373a5611f 100644 --- a/src/main/resources/reference.conf +++ b/src/main/resources/reference.conf @@ -60,13 +60,6 @@ songinstatus=false altprefix = "NONE" -// If you set this, the bot will play streams from this Piped instance -// Depending on your server location, this may perform better than default youtube. -// For more information on Piped, check out the project page here: https://github.com/TeamPiped/Piped -// For a list of Piped instances and their URLs, check the wiki: https://github.com/TeamPiped/Piped/wiki/Instances - -pipedURL = "NONE" - // If you set these, it will change the various emojis