Bump JDA & close Inpustream #431
@ -97,7 +97,7 @@ dependencies {
|
||||
|
||||
compileOnly 'de.steamwar:waterfall:RELEASE'
|
||||
compileOnly 'de.steamwar:persistentbungeecore:RELEASE'
|
||||
implementation("net.dv8tion:JDA:4.3.0_299") {
|
||||
implementation("net.dv8tion:JDA:4.4.0_352") {
|
||||
exclude module: 'opus-java'
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,9 @@ import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
import net.dv8tion.jda.api.events.message.priv.PrivateMessageReceivedEvent;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class PrivateMessageListener extends BasicDiscordListener {
|
||||
|
||||
@Override
|
||||
@ -63,7 +66,9 @@ public class PrivateMessageListener extends BasicDiscordListener {
|
||||
}
|
||||
|
||||
try {
|
||||
node.saveFromStream(attachment.retrieveInputStream().get(), newFormat);
|
||||
InputStream in = attachment.retrieveInputStream().get();
|
||||
node.saveFromStream(in, newFormat);
|
||||
in.close();
|
||||
event.getMessage().reply("`" + name + "` wurde erfolgreich hochgeladen").queue();
|
||||
} catch (Exception e) {
|
||||
event.getMessage().reply("`" + name + "` konnte nicht hochgeladen werden, bitte versuche es später nochmal oder wende dich an einen Developer").queue();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren