Fix another derp in deleteMessageById

This commit is contained in:
Vankka 2023-07-10 18:26:48 +03:00
parent 7cd796ab2b
commit 014a022fbd
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

@ -128,9 +128,7 @@ public abstract class AbstractDiscordGuildMessageChannel<T extends GuildMessageC
public CompletableFuture<Void> deleteMessageById(long id, boolean webhookMessage) { public CompletableFuture<Void> deleteMessageById(long id, boolean webhookMessage) {
CompletableFuture<Void> future; CompletableFuture<Void> future;
if (webhookMessage) { if (webhookMessage) {
future = discordSRV.discordAPI() future = queryWebhookClient().thenCompose(client -> client.deleteMessageById(id).submit());
.queryWebhookClient(channel.getIdLong())
.thenCompose(client -> client.deleteMessageById(id).submit());
} else { } else {
future = channel.deleteMessageById(id).submit(); future = channel.deleteMessageById(id).submit();
} }