Skip to content

Commit

Permalink
Let discord use its display file feature
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Apr 20, 2024
1 parent 6a265d9 commit 6890230
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/geysermc/discordbot/listeners/FileHandler.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022 GeyserMC. http://geysermc.org
* Copyright (c) 2020-2024 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -77,10 +77,10 @@ public void onMessageReceived(@NotNull MessageReceivedEvent event) {
if (extensions.contains(attachment.getFileExtension())) {
EmbedBuilder embed = new EmbedBuilder();

// // Handled by Discord's new display feature
// if (attachment.getSize() < 50000) {
// continue;
// }
// Handled by Discord's new display feature
if (attachment.getSize() < 50000) {
continue;
}

try {
File attachmentFile = attachment.getProxy().downloadToFile(File.createTempFile("GeyserBotTempFile", ".temp")).get();
Expand Down

0 comments on commit 6890230

Please sign in to comment.