Skip to content

Commit

Permalink
Dirty fix for Plugin Lab
Browse files Browse the repository at this point in the history
  • Loading branch information
TechsCode committed Aug 17, 2020
1 parent 398cde6 commit 73cfa1e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ public void detectRelease() {
}

public void uploadFile(TextChannel channel, GithubRelease release, String pluginName) {
List<Message> 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<Message> 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", "")))
Expand Down

0 comments on commit 73cfa1e

Please sign in to comment.