Skip to content

Commit a316419

Browse files
committed
Discord webhook delays were because using the legacy api version as Retry-After header returns ms. Be sure to use the version in the url, like https://discord.com/api/v10/webhooks/xxxx/xxxx
1 parent 65d9c19 commit a316419

2 files changed

Lines changed: 1 addition & 22 deletions

File tree

miner/src/main/java/fr/rakambda/channelpointsminer/miner/factory/ApiFactory.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import fr.rakambda.channelpointsminer.miner.event.manager.IEventManager;
3232
import fr.rakambda.channelpointsminer.miner.log.UnirestLogger;
3333
import fr.rakambda.channelpointsminer.miner.util.CommonUtils;
34-
import fr.rakambda.channelpointsminer.miner.util.DiscordRetryStrategy;
3534
import fr.rakambda.channelpointsminer.miner.util.json.JacksonUtils;
3635
import kong.unirest.core.HeaderNames;
3736
import kong.unirest.core.Unirest;
@@ -108,7 +107,7 @@ public static TwitchApi createTwitchApi(@NotNull TwitchLogin twitchLogin){
108107
@NotNull
109108
public static DiscordApi createDiscordApi(@NotNull URL webhookUrl){
110109
var unirestInstance = createUnirestInstance(null);
111-
unirestInstance.config().retryAfter(new DiscordRetryStrategy(5));
110+
unirestInstance.config().retryAfter(true, 5);
112111

113112
return new DiscordApi(webhookUrl, unirestInstance);
114113
}

miner/src/main/java/fr/rakambda/channelpointsminer/miner/util/DiscordRetryStrategy.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)