mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-01 08:39:31 +01:00
Fix deleteMessageById webhookMessage check being inverse
This commit is contained in:
parent
c1fbeb8d8f
commit
7cd796ab2b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user