sebm253 / BotListHandler

a library which handles discord bot lists stats updating for you
1 stars 0 forks source link

Top.gg error 403: Denied #7

Closed RealMarvn closed 3 years ago

RealMarvn commented 3 years ago

Hey uhm I got this problem right here: Top.gg is spraying a 403. The token is correct and my top.gg api is posting everything fine so its rn this handler: 2021-04-15 10:32:33,427 <ERROR> <OkHttp https://top.gg/... > <[]> <{}> < dev.mlnr.blh.core.api.BotListHandler> Failed to update the stats for bot list TOP_GG with code 403

sebm253 commented 3 years ago

are you by any chance testing the handler locally, where the bot id is different than the one of the production bot? if not, then i'm sorry that you're experiencing this in production - though i don't have really much info to work with to try to figure out what's wrong

RealMarvn commented 3 years ago

I already tested it locally...I`ll test that on my server...1s

RealMarvn commented 3 years ago

Nope 403 is also on my server.

RealMarvn commented 3 years ago

May this error is also with the same problem...Top GG sends a 403 and discord boats sent this.... Maby they belong together? 2021-04-15 10:42:21,365 <ERROR> <OkHttp https://discord.boats/... > <[]> <{}> < dev.mlnr.blh.core.api.BotListHandler> There was an error while updating the stats for bot list DBOATS java.net.SocketTimeoutException: timeout at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:677) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:686) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:143) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:96) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ~[okhttp-4.9.1.jar:?] at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517) [okhttp-4.9.1.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?] at java.lang.Thread.run(Thread.java:832) [?:?]

RealMarvn commented 3 years ago

Also BOTS_FOR_DISCORD with code 404

sebm253 commented 3 years ago

did you even add your bot to the bot lists and were they approved? because those errors would explain that - if you did, then it's using a different bot id

RealMarvn commented 3 years ago

Nope. It is added on topGG and BotsForDiscord ... I accidently switched the DiscordBoats and BotsForDiscord Token. But after that TopGG threw an 403 and BotsForDiscord threw and 404: "Failed to update the stats for bot list BOTS_FOR_DISCORD with code 404" My DiscordBoats is not approved and the token was from BotsForDiscord so pls forget the error above with DiscordBoats.

RealMarvn commented 3 years ago

What do you mean with using a different bot id?

sebm253 commented 3 years ago

i meant that maybe you were testing it locally, which would use the test bot's id which obviously isn't on the bot lists - however you said you also tested this on your server with the production bot, so that's probably not the issue. can you recheck all tokens? i don't see an issue on the handler's side

RealMarvn commented 3 years ago

Oh shit. I had a wrong DiscordBot Token!. One Sec

RealMarvn commented 3 years ago

One question while my Bot is loading all servers...What is posting event based? Everytime a new Guild comes in it updates or what`?

sebm253 commented 3 years ago

it means that each time your bot gets added or removed from a server, the server count will be updated on all bot lists. if you want to use that instead, check the readme. i don't know how big your bot is but keep in mind that large bots with fast guild flow are more likely to hit the ratelimit of at least one of the bot lists with event based updating, where the automatic stats posting comes in more effective

RealMarvn commented 3 years ago

Its working. Sry it was a problem on my side

RealMarvn commented 3 years ago

ok thx for your fast help