Fix deleteMessageById webhookMessage check being inverse

This commit is contained in:
Vankka 2023-07-10 17:37:10 +03:00
parent c1fbeb8d8f
commit 7cd796ab2b
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

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