diff --git a/src/main/java/me/TechsCode/TechDiscordBot/module/modules/PluginLabModule.java b/src/main/java/me/TechsCode/TechDiscordBot/module/modules/PluginLabModule.java index a8dbcf3f..3a2bb451 100644 --- a/src/main/java/me/TechsCode/TechDiscordBot/module/modules/PluginLabModule.java +++ b/src/main/java/me/TechsCode/TechDiscordBot/module/modules/PluginLabModule.java @@ -118,8 +118,10 @@ public void detectRelease() { } public void uploadFile(TextChannel channel, GithubRelease release, String pluginName) { - List msgs = channel.getHistory().retrieveFuture(100).complete().stream().filter(msg -> msg.getAuthor().isBot() && msg.isPinned()).collect(Collectors.toList()); - msgs.forEach(msg -> msg.unpin().queue()); + try { + List msgs = channel.getHistory().retrieveFuture(100).complete().stream().filter(msg -> msg.getAuthor().isBot() && msg.isPinned()).collect(Collectors.toList()); + msgs.forEach(msg -> msg.unpin().queue()); + } catch (IllegalStateException ignored){} if(release.getAsset() != null && release.getRelease() != null && release.getFile() != null) { new TechEmbedBuilder("Ready to Test: " + WordUtils.capitalize(release.getRelease().getName().replace(".jar", "")))