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) {
CompletableFuture<Void> future;
if (webhookMessage) {
future = discordSRV.discordAPI()
.queryWebhookClient(channel.getIdLong())
.thenCompose(client -> client.deleteMessageById(id).submit());
future = queryWebhookClient().thenCompose(client -> client.deleteMessageById(id).submit());
} else {
future = channel.deleteMessageById(id).submit();
}