#topgg-api

1 messages ยท Page 21 of 1

radiant pasture
desert bolt
#

ohh interesting

#

this might work

#

thanks

#

I assume there's no official endpoint to get them on top.gg api?

#

or their wrapper?

radiant pasture
#

no idea sorry

untold sparrow
desert bolt
#

No worries, thanks for the help.

#

How do these even get them tho? Do they scrape the website?

runic creek
#

There was an undocumented endpoint for reviews. I don't know if it still works because I haven't seen anyone mention it in months. Maybe they're using it peepoShrug

violet mountain
#

How do I get the votes? I need the last vote to ping them in a webhook thingy for a thank you ;)

runic creek
#

This endpoint doesn't work afaik

#

From what I remember, it hasn't been working for few months

dense mulch
#

Am I able to pull a users vote status over the api? e.g. whether they are able to vote again, or how many times they've voted in a given month, or etc

dense mulch
#

Do you mind linking the doc page, I think I missed it entirely

#

thanks!

steep vigil
#

wait no

#

@dense mulch ^

dense mulch
runic creek
#

First one works with bots, second one works with bots and servers

dense mulch
#

good to have both references depending what I want to process

#

appreciate it

violet mountain
dense mulch
# violet mountain Any idea how to do it then?

You're gonna want to have a webhook listener setup to receive incoming votes and then cache and process the users accordingly, I implemented a very similar system not long ago which is how I handle vote rewards, reminders, etc

violet mountain
dense mulch
#

I wouldn't be able to help you there then, unfortunately. Never used botghost or anything similar, so I am not at all familiar with how they operate

violet mountain
dense mulch
violet mountain
#

Endpoint sorry

ornate hatch
#

yo

#

can someone tell me how i can make a curl request or the url i need do make a request for get the users who vote for my bot so they can get a reward

mint vault
#

You setup a web server and set the URL on top.gg as they'll send a request to that url with the data when a user voted - see the pinned messages

austere halo
#

@sturdy perch in my bot verification, it was rejected due to some slash command issue, but it use prefix command

#

all commands are working and prefix is mentioned, also I added about that in the develiper review note

sturdy perch
austere halo
#

okie

#

thnks

unkempt kindle
steep vigil
#

its what i use and super easy

#

i think its that

unkempt kindle
unkempt kindle
violet mountain
#

Is it possible to get the review average score of a bot?

dapper copper
violet mountain
dapper copper
#

it's undocumented, but if you fetch your bot via the api from top.gg you'll see avg_review_score

violet mountain
violet mountain
# dapper copper it's undocumented, but if you fetch your bot via the api from top.gg you'll see ...

Itโ€™s giving me

"response":"<!DOCTYPE html><html data-color="red" lang="en"><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width, initial-scale=1.0" data-next-head=""/><script async="" src="https://kumo.network-n.com/dist/app.js" site="topgg"></script><meta name="mobile-web-app-capable" content="no" data-next-head=""/><meta name="theme-color" content="#ff3366" data-next-head=""/><link rel="icon" href="/favicon.png" type="image/png" data-next-head=""/><title data-next-head="">Not found | The #1 Discord Bot and Discord App List</title><meta name="twitter:title" content="Not found | The #1 Discord Bot and Discord App List" data-next-head=""/><meta name="og:title" content="Not found | The #1 Discord Bot and Discord App List" data-next-head=""/><meta name="description" content="Page was not found" data-next-head=""/><meta name="twitter:description" content="Page was not found" data-next-head=""/><meta name="og:description"```
#

And more but canโ€™t send it all here

runic creek
#

It's just a html code for 404 page

#

This endpoint doesn't work

violet mountain
runic creek
violet mountain
# runic creek

What do I use to get the average rating of a bot then?

runic creek
#

Idk if that's even posible without this endpoint

violet mountain
#

Ohh sucks

runic creek
#

Remember that in such cases the developer console in the browser is very useful (especially the "Network" tab) peepoWink

ornate abyss
wispy otter
#

Hi

rustic horizon
#

@void estuary

So I'm not using a traditional language
So I'm no 100% you'll be able to help

But here is my code

.BDscript

$nomention
$onlyForIDs[1235135453179547750;]
$httpAddHeader[Authorization;$getVar[topKey]]

$httpPost[https://top.gg/api/bots/$botID/stats;{
 "server_count": "$numberSeparator[$serverCount]"}]
> **$username**, 

I have successfully posted the server count on Top.gg.
runic creek
#

Try with "Content-Type": "application/json" header

void estuary
#

this is smart ^^

void estuary
rustic horizon
#

@void estuary I get no error

void estuary
#

that might be an issue

#

not familiar with that language but that's what it looks like to me

dapper copper
#

^ you dont need to format it, just send the raw number ๐Ÿ‘

rustic horizon
#

@void estuary
@dapper copper

So the same code I used for this server count
Works perfectly with a different platform

So it has to be something on Top.gg's end....

#

I get no errors, but the website does not update
What am I doing wrong?

[topKey] is my API Token

$nomention
$onlyForIDs[1235135453179547750;]
$httpAddHeader[Authorization;$getVar[topKey]]

$httpPost[https://top.gg/api/bots/$botID/stats;{
 "server_count": "$numberSeparator[$serverCount; ]"}]
> **$username**, 

I have successfully posted the server count on Top.gg.
dapper copper
#

based on "server_count": "$numberSeparator[$serverCount]"
it's the fact you're posting a string

#

post the raw number and it should work

rustic horizon
#

I tried that too

#
$nomention
$onlyForIDs[1235135453179547750;]
$httpAddHeader[Authorization;$getVar[topKey]]

$httpPost[https://top.gg/api/bots/$botID/stats;{
 "server_count": "$serverCount"}]

**$username**, 
I have successfully posted your bot's server count on top.gg. 
dapper copper
#

remove the double quotes

#

"$serverCount" -> $serverCount

rustic horizon
#

Boom

rustic horizon
slender eagle
#

Hello! not sure if this is the right channel or not but I want to figure out how I can setup a voting system to where it gets sent a discord bot and the discord bot sends a message into a channel for whoever voted for a bot just I am unsure how to get that system setup, if someone could be able to help me out that would be great!

mint vault
slender eagle
lethal junco
#

Hi! Waves Does someone by any chance know why my GET req to https://top.gg/api/bots/1020247574571126794 is returning 404 while the same endpoint ending with /stats works? The documentation is quite vague and I'd just like to fetch the total votes my bot has. catsweat (I assumed it would work with api/v0/, but ig not)

lethal junco
#

Never mind, I figured out that I could probably just use topstats.gg catsweat, sorry for the trouble.

tawdry agate
#

If library seems terrible, looks like abandoned, can it be remade (being official)

#

there seems to be 1-3 commits per year on github, and the package on official package repository for .net is abandoned too since 2021

#

@woven coral Are you still maintaining that?

woven coral
tawdry agate
#

this one

#

seems rarely done anything

#

and I see many things to improve, almost remake of the whole thing..

tawdry agate
#

nuget not pypi

#

pypi is for python

tawdry agate
#

Is v1 API done or what? There is some documentation but on the main API documentation it says its not done. Quite confusing

tawdry agate
#

I'm getting weird html pages in response not just json

#

404 to be specific

#

same for users id endpoint

tawdry agate
#

Even with valid bot id

woven coral
#

btw that one is maintained by @scarlet cobalt, not me

woven coral
#

iirc veld has updated the API documentation after he announced the new API a few months ago

thorny otter
#

Example here ^

tawdry agate
#

so bot/stats is just new endpoint?

#

its for v0?

tawdry agate
#

you guys are terribel here to work like that with devs

#

@woven coral i need answer if those changes are final and you can get own bot stats only now. Cause I'm making proper library

tawdry agate
#

but there are many like that for bots

tawdry agate
#

Can somebody from team respond what's up with that or something? @vital anvil

vital anvil
#

it's probably gone

tawdry agate
#

So you don't know what you've done?

#

who is working on that?

vital anvil
#

I haven't touched the v0 api in 6 months

tawdry agate
#

Document actual state of api

vital anvil
#

Use v1

tawdry agate
#

if something is removed it should be removed

tawdry agate
vital anvil
#

Yeah I am working on webhooks v1 now

tawdry agate
#

i see only updating discord commands on v1

vital anvil
#

๐Ÿ˜ญ yeah i know i made it

tawdry agate
#

NOTHING ELSE

vital anvil
#

and vote status

tawdry agate
#

v1 completely replaced v0 or not?

vital anvil
#

no, but v0 is no longer maintained

tawdry agate
#

I don't know what version of api i should use for what

vital anvil
#

have you used bots/:id recently?

tawdry agate
#

its total clusterfuck

vital anvil
#

use v1.

tawdry agate
vital anvil
#

yes

tawdry agate
#

what about stuff from v0

vital anvil
#

we keep v0 around to keep people's apps running

#

but even then only the endpoints that we see traffic on

tawdry agate
#

I don't see documentation abotu getting bot in v1

#

nothing

vital anvil
#

yes it doesn't exist

#

what is your usecase?

tawdry agate
#

I'm making api library cause official is crap

vital anvil
#

we don't really expose random api features anymore since top.gg is prone to heavy scraping

#

causes huge performance and costs increases for us

#

if the docs show bots/:id and the endpoint doesn't exist anymore for V0

#

please send a PR to the docs repo ๐Ÿซถ

tawdry agate
vital anvil
tawdry agate
#

to send PR

#

i can send issue

vital anvil
#

that also works ๐Ÿ™

tawdry agate
#

Oh my lord

#

It's insane you guys make changes that are not documented

#

informed

#

nothing

vital anvil
#

these were the majority of changes

#

but this is in this year Feb

tawdry agate
#

Document it

vital anvil
#

since then I have't touched the API

tawdry agate
vital anvil
#

yea it might've been removed even before that

#

that was even before when i started running the site

#

but I will nuke the docs section for get by id

tawdry agate
vital anvil
#

Yes

tawdry agate
#

oh boy

vital anvil
#

KEK im busy enough as it is with the feature launches

#

so the v0 docs are on the bottom of the priorities

tawdry agate
#

I would suggest fixing up what's there instead of doing new features

#

You have weird priorities

vital anvil
#

You only see the priorities from your point of view

#

fixing up a legacy API is not gonna benefit 99% of top.gg users lol

tawdry agate
#

You only see priorities from pov of money

vital anvil
#

๐Ÿ˜‚ looool top.gg making money good one bro

#

bro i dont even get paid

tawdry agate
vital anvil
#

because people rely on it lol

tawdry agate
#

but v1 documentation is not up to date either

vital anvil
#

no it is?

#

v1 is fully up to date

#

we just dont have other endpoints yet

tawdry agate
#

So it's a regression

#

from v0

#

If i can't get even bot info

#

on it

#

or update bot info

vital anvil
#

there is no v1 update bot info api call?

tawdry agate
vital anvil
#

yes

#

exactly

#

there's bot commands update and get vote status

tawdry agate
#

what about bot info update that v0 had

vital anvil
#

it never had that?

runic creek
#

Unless they mean POST bots/stats

tawdry agate
#

weel bots stats

vital anvil
#

yeah we need to add that

tawdry agate
#

v0 has it, v1 doesn't

vital anvil
#

but im still debating how to handle it in a multi-facet setup with servers

tawdry agate
vital anvil
#

no, i mean discord bots, discord servers

#

maybe one day we will support something else

tawdry agate
#

What do you mean by multi-facet setup with servers exactly

vital anvil
#

top.gg's new architecture (v1) supports an infinite type of lists

#

so we can do discord bots, discord servers, discord emojis, slack bots, fortnite games etc

tidal idol
#

hey veld can we finally use the docs i made years ago

runic creek
#

Even minecraft servers? Thinkeng

tawdry agate
#

oh boy, so its not going to be discord only thing now?

vital anvil
#

@tidal idol link

tidal idol
vital anvil
#

yo wtf kinda clean

tidal idol
tawdry agate
tidal idol
#

its a tailwindplus one i edited to match top.gg styling in 2023 ๐Ÿ˜ญ

tawdry agate
#

looks nice

vital anvil
#

if u want

#

if that's even possible

tawdry agate
#

so v0 should still be used for some stuff or v1 has bot stats update too?

#

cause i'm confused

tidal idol
#

i can try

vital anvil
#

v1 bot stats update will come

#

wtf

tawdry agate
#

What the helll

tidal idol
#

2 secs i can do this

tawdry agate
#

for both v0 and v1

vital anvil
#

v1 is up to date

#

v0 probably not

tawdry agate
#

v0 then

vital anvil
#

yeah ill add it to my todo list

#

but if anyone want brownie points and wanna PR it please do :)

tawdry agate
#

even libraries for various languages still have old methods

#

for bots/id

#

etc

vital anvil
#

yea

tawdry agate
#

making own one for .net, but will make it public

#

๐Ÿค–

vital anvil
#

C# chad

#

i made the original C# one KEK

vital anvil
#

13k

#

omg

tidal idol
#

KEKW it literally replaces the entire existing one with a new site

#

it deploys to vercel / netlify easily though so

vital anvil
#

bro deletes the entire v1 api with his PR

tidal idol
tawdry agate
vital anvil
#

yea its 10 years old lol

tawdry agate
#

i think nuget is outdated for few years now

#

nobody touched that either

#

even though code on github was

vital anvil
#

classic

tawdry agate
#

on release

thick holly
tidal idol
#

Itโ€™s coloured for it lol

#

Iโ€™ll push my changes in a min, it has v1

thick holly
#

u got some rlly good web skills bro

tawdry agate
#

xd

tawdry agate
mint vault
woven coral
#

i'm sorry everyone, i've been on break lately with the top.gg stuff

#

working on so many sdks got a bit repetitive

#

i'll come back to them soon

tawdry agate
woven coral
#

what do you mean

fickle mica
#

I don't understand the API; how can I apply the voting feature? Specifically, how can I automatically post messages to the channel?

tawdry agate
#

It's unrelated

#

Unless I don't know about something

fickle mica
tawdry agate
#

It's gonna clear a lot of things in your head

fickle mica
#

._. For 1 Thing? It feels like I have to learn the entire book ๐Ÿ™

tawdry agate
#

Just how to make API client

#

Just ask gpt for example API client in python

fickle mica
#

All I need is the API query to see if someone has voted.

tawdry agate
#

So you're just looking for ready solution instead of learning how to make it..

#

Topgg probably has official package for python

#

But idk if updated..

mint vault
#

Use the right branch though

#

Or just make a simple HTTP request to the endpoint with aiohttp, not too hard

rain heart
#

even requests works fine, not the best but still something

mint vault
#

if you run it in a coroutine yeah sure

mint vault
#

Worth reading entirely

tawdry agate
woven coral
#

many of the SDKs are awaiting pull request reviews from Veld

somber path
#

?verify

tawdry agate
oblique kestrel
#

?verify

astral marlin
#

Hello, good day. Could you send me the files to connect my bot to the top.gg API? Please send the API documentation as a link.

runic creek
astral marlin
magic laurel
#

?verify

tawdry agate
#

where are you gonna merge that new documentation

restive otter
#

?verify

lapis kestrel
#

?verify

mint vault
#

@jaunty plank what are these bots KEKW

warm flax
#

?verify

worldly thorn
#

bot

restive otter
worldly thorn
#

the bot

restive otter
#

Bro, are you an NPC?

#

What nonsense?

worldly thorn
#

actually u might be the npc now that i think about it

restive otter
#

NPCs can talk like humans :)?

worldly thorn
#

Anything can happen

restive otter
tawdry agate
tidal idol
#

Itโ€™s not that urgent ๐Ÿฅ€

vital anvil
#

chill bro

tawdry agate
#

at least them here and what objects they return

#

please

tidal idol
#

the endpoints are on the docs atm arent they

#

my docs version is just a copy of whatevers on there currently

tawdry agate
tidal idol
#

still not that urgent ๐Ÿ˜ญ

#

you can cope

tawdry agate
#

= not urgent

#

its the most important endpoint

tidal idol
#

still doesnt need pushing instantly

tawdry agate
#

what are you priorities

#

I don't know how to access my bot info

#

so please list endpoints

#

Current ones

#

not those that are not working

solemn lagoon
#

Where do i create an api key

#

?

runic creek
#

Crazy support scam

solemn lagoon
#

lol i was gonna click but realize he doesnt have any role

solemn lagoon
#

all the links in the website leads to docs

runic creek
solemn lagoon
#

ohh ty

tawdry agate
icy aurora
tawdry agate
#

So does "GET bots/:bot_id/stats"

thorny otter
#

Where do you see they have been deprecated? I couldnโ€™t find any mention of it in the doc or the recent #announcements

rain heart
#

KEKW istg the impatience

tawdry agate
#

what is this

tawdry agate
#

There's no excuse for this

#

If it's so goddman hard to make new documentation then just list those endpoints here

#

but nobody can even do that

#

I feel like you nobody knows what's on api even

runic creek
tawdry agate
runic creek
#

Not random at all but ok

tawdry agate
#

still not a solution

#

why can't anybody, literally anybody list those endpoints here

rain heart
tawdry agate
#

not some replacement

jaunty plank
#

They are deprecated. So there will be no replacement on v0.
V1 may replace them down the line.

tawdry agate
#

So currently there is no endpoint at all to get information about my bot?

#

so good

#

๐Ÿ˜‚

#

you deprecated something without a replacement

#

big brain move

#

300IQ

jaunty plank
#

You want your own stats?

tawdry agate
#

but yes

jaunty plank
#

That's just /api/bots/stats
Iirc that still exists.

tawdry agate
#

๐Ÿ˜‚

jaunty plank
#

I don't work on the api, I wouldn't know. notlikenoot

tawdry agate
#

5 year old would do better with ai than this

#

thats how bad you manage this stuff

#

@jaunty plank not you personally

jaunty plank
#

We have a small dev team. Priorities are not with the pre-release api.

V1 isnt finalized, V0 was never production ready in the first place.

tawdry agate
#

literally

#

don't deprecate stuff without replacement

#

that's common sense

jaunty plank
tawdry agate
#

thats the problem

jaunty plank
tawdry agate
#

should have left id endpoint, but allow it to query own bot only

#

easy

jaunty plank
#

Anyway, top-stats is run by volunteers of topgg. It will be the closest thing to a replacement for a long time.

#

Querying your bots works. I still have code that works doing that.

tawdry agate
#

Top gg is for putting own bot out there

jaunty plank
#

Top stats gets their stats from topgg.

tawdry agate
#

And everybody knows top gg

tawdry agate
jaunty plank
#

Its a tool for topgg

jaunty plank
tawdry agate
#

wow

#

just wow

#

I can't even comment how stupid this situation is

#

that you just mentioned

#

3rd party api can do what 1st cant

#

๐Ÿ˜‚

tawdry agate
#

๐Ÿ˜‚

jaunty plank
#

That's pretty common.

The third party Spotify api is better than the Spotify official api.

jaunty plank
tawdry agate
#

its impossible to get bot stats

#

or update them

#

things like server count - can't do over api, can't do over website

jaunty plank
#

Posting stats doesn't work?

#

I'll validate that in a little bit and make a report.

tawdry agate
#

idk, i stopped botherwing after getting stats didn't work

jaunty plank
#

ah

tawdry agate
#

imagine when you can post stats, but can't get them

jaunty plank
#

Posting stats works last I checked.
Getting your own stats works.
Getting others stats doesnt.

tawdry agate
#

GET
bots/:bot_id with my bot id doesn't work

#

I am using token

#

it throws whole html with 404

#

weirdly

#

not just small json with error

jaunty plank
#

I think it's /api/bots/:bot-id/stats

Should pull your own stats no matter what ID is used(I think it pulls from the token).

tawdry agate
#

/stats would work?

#

but that will give only stats, not whole info even?

jaunty plank
#

Tbh I'm not sure why we don't replace the dev api with graphql. Much harder for these kinds of issues to arrise.

tawdry agate
#

Love it over rest

#

can query what I want

tawdry agate
#

would be nice if somebody came here and just listed everything that works

jaunty plank
#

The frontend is graphql based. It's been pleasant to use.
I hardly touch the dev api anymore.

tawdry agate
jaunty plank
tawdry agate
jaunty plank
#

Yeah so the frontend api is all graphql.

tidal idol
#

youโ€™re the only person complaining about this atm

tawdry agate
tidal idol
#

what, making the docs?

tawdry agate
#

I can't

#

i simply cannot

jaunty plank
#

Iirc the dev team doesn't use AI.
Even if they did the priorities still are with everything else.

Very very few people use the api for getting bot info.

tawdry agate
tidal idol
#

again you are the only person complaining about this, everyone else either figures it out or waits for it ๐Ÿ˜ญ

#

why would you need to use the API to get bot stats anyways? the stats you can send are server count and shard count, which you can get from your bot anyways

tawdry agate
#

I just want to know current state, so I can make wrapper for myself and use it instead of going in blind because this works and that doesn't

#

But it's somehow so hard to list those endpoints

jaunty plank
#

Whenever I'm at my desk I'll go through them and let you know.
Should be able to start in 3-4 hours, should only take me 30 minutes or so to check them all.

tidal idol
#

me when different people do different things smide

runic creek
#

Here we go again

tidal idol
#

please get a grip ๐Ÿ˜ญ

jaunty plank
#

Yeah it's probably time to stop this.

#

Ina isn't even a programmer notlikenoot

tawdry agate
#

But i see the priorities

#

๐Ÿ˜‚

jaunty plank
#

At this point this is getting excessive. I'm happy to help as much as I can but it's best to end the 'priorities' stuff.

dense mulch
#

Did ratelimits get changed? Suddenly getting hit.

steep vigil
#

@jaunty plank

#

thats a scam

#

dont do it

dense mulch
#

Yeah no kidding ๐Ÿคฃ

dense mulch
#

Fuckin bots man

steep vigil
#

had to say it, some people dont know about it

dense mulch
#

Ye ye np

fleet patio
#

help i need help with my free nitro crypto discord bot

#

dang they got banned nvm

steep vigil
#

lmao i cant believe they say 'note this is not a bot' at the end

tidal idol
#

thanks the rock

#

anyways

dense mulch
# tidal idol <#769566680807899156>

Ah. Gotcha, thanks. I usually see the 500s and ignore em but I saw a few 429s earlier so I thought there might have been some changes I missed

#

Even though I only post very infrequently

tidal idol
#

no worries, its not that well documented in #site-status anyways tbh

#

it makes it sound like its a cloudflare issue based on the message lol

dense mulch
#

Yeahh it does read like its a cloudflare issue haha

tawdry agate
signal granite
#

smh

jaunty plank
# tawdry agate Just wanna know those endpoints

There's not going to be an update to the v0 api going forward. V1 will slowly get updates when a developer has time.

I can make you a list of what works and what doesn't when I'm at my desk and I'll look into updating the docs if I have access.

opal solar
opal solar
#

ooh, that is CF related too? bummer

jaunty plank
# tawdry agate Just wanna know those endpoints

Hopefully this is enough

V0
non functional
๐Ÿ”ด GET https://top.gg/api/bots/:BotID
Only will ever get your own bots stats
๐ŸŸก GET https://top.gg/api/bots/:BotID/stats

๐ŸŸข POST https://top.gg/api/bots/:BotID/stats
๐ŸŸข GET https://top.gg/api/bots
๐ŸŸข GET https://top.gg/api/bots/:BotID/votes
๐ŸŸข GET https://top.gg/api/bots/:BotID/check?userId=:UserID

V1
๐ŸŸข POST https://top.gg/api/v1/projects/@me/commands
๐ŸŸข GET https://top.gg/api/v1/projects/@me/votes/:user_id

signal granite
tawdry agate
#

Ty

stuck kite
#

I assume the @me part is all that's needed since the API key is tied to the app, while older ones (stats) don't do that automatically?

#

Also there's no response data specified for /commands endpoint topggThink

charred lark
little mason
runic creek
little mason
#

I would prefer using something that's supported by top.gg. I guess there must be a way, how would they fetch the votes without using the native API? Scraping?

steep vigil
#

thats against their tos i think

little mason
#

Which make sense, so I wonder how they do it

runic creek
#

But who knows

little mason
#

I don't want to use undocumented endpoints, but yeah maybe they use that?

rain heart
#

Why not use webhooks and count yourself

#

Store every vote in your database, then count them up by the date if you need a date range

#

Including, only keeping up to 3 months or so of votes

dusky spindle
#

Can Anyone help me? I'm Using Python and ```

await bot.topggpy.get_bot_info()


Dec 08 12:39:29 v8476 python[1331]: 2025-12-08 12:39:29,384 - ERROR - Ignoring exception in on_dbl_test
Dec 08 12:39:29 v8476 python[1331]: Traceback (most recent call last):
Dec 08 12:39:29 v8476 python[1331]:   File "/root/Astra/venv/lib/python3.12/site-packages/discord/client.py", line 481, in _run_event
Dec 08 12:39:29 v8476 python[1331]:     await coro(*args, **kwargs)
Dec 08 12:39:29 v8476 python[1331]:   File "/root/Astra/main.py", line 539, in on_dbl_test
Dec 08 12:39:29 v8476 python[1331]:     votedata = await bot.topggpy.get_bot_info()
Dec 08 12:39:29 v8476 python[1331]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 08 12:39:29 v8476 python[1331]:   File "/root/Astra/venv/lib/python3.12/site-packages/topgg/client.py", line 271, in get_bot_info
Dec 08 12:39:29 v8476 python[1331]:     response = await self.http.get_bot_info(bot_id)
Dec 08 12:39:29 v8476 python[1331]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 08 12:39:29 v8476 python[1331]:   File "/root/Astra/venv/lib/python3.12/site-packages/topgg/http.py", line 169, in request
Dec 08 12:39:29 v8476 python[1331]:     raise errors.NotFound(resp, data)
Dec 08 12:39:29 v8476 python[1331]: topgg.errors.NotFound: Not Found (status code: 404):
And so on
dusky spindle
#

Oh is there a new one or was it shut down?

mint vault
#

Neither, it doesn't work, so nonfunctional

#

Been like a month or so

dusky spindle
#

Ok Thanks a lot

#

Was a bit inactive and was wondering now. Thanks man

swift elm
#

trying to create a new token:

{"errors":[{"message":"Unexpected Execution Error","locations":[{"line":2,"column":3}],"path":["createToken"],"extensions":{"code":"INTERNAL_ERROR"}}],"data":null}
vital anvil
#

Anyone else is also welcome ofcourse.

swift elm
# vital anvil should be fixed

another error

{"errors":[{"message":"User not found","locations":[{"line":14,"column":3}],"path":["createToken","value","createdBy"],"extensions":{"code":"NOT_FOUND"}}],"data":null}
swift elm
#

I am

vital anvil
#

Ah i see

#

the user who created the token was deleted

#

not ideal ๐Ÿ˜…

#

will push a fix for this

vital anvil
swift elm
#

works, thanks

signal wigeon
#

anyone know what data is sent through the webhook when someone votes, and in what structure? the documentation doesnt say the exact post that the webhook is doing

mint vault
#

Also you could've just printed it and you also get the answer

minor vigil
#

{"title":"User not found","status":404,"detail":"The user was not resolved into a valid Top.gg user. The user ID might be invalid, or the user may have deleted their account."}

#

Your endpoints really suck, they return empty arrays and incorrect information.
I wanted to create a setup for top-gg to receive notifications, but I'm giving up.
Fix this shit.

signal granite
minor vigil
minor vigil
#

URL: https://top.gg/api/bots/1427622031029174452/check?userId=562539445061025802
Status: 200 OK
Durata: 373ms
Content-Type: application/json
Rate Limit: ?/?
Size: 11 bytes

ANALISI:
SUCCESSO
โ€ข Tipo: Oggetto con 1 proprietร 

ANTEPRIMA RISPOSTA:
{"voted":1}

HEADERS INTERESSANTI:
cf-cache-status: DYNAMIC
Only you can see this โ€ข Dismiss message

Logan
used
debug-topgg

๐—• ๐—ฅ ๐—จ ๐—– ๐—œ ๐—จ ๐—ฆ ๐Ÿšฌ
APP
โ€” 4:29 PMThursday, December 11, 2025 4:29 PM
URL: https://top.gg/api/bots/1427622031029174452/votes
Status: 200 OK
Durata: 493ms
Content-Type: application/json
Rate Limit: ?/?
Size: 2 bytes

ANALISI:
SUCCESSO
โ€ข Tipo: Array con 0 elementi
ARRAY VUOTO - Il dato esiste ma non c'รจ contenuto

ANTEPRIMA RISPOSTA:
[]

HEADERS INTERESSANTI:
cf-cache-status: DYNAMIC

I definitely give up. Your service should be a benchmark, but you've developed it lamely.

What is this crap? Is the database/cache reset every 12 hours?
The more I dig, the more nonsense I see.

Enough!

minor vigil
#

{"id":"784518308336185344","name":"\uD835\uDDD5 \uD835\uDDE5 \uD835\uDDE8 \uD835\uDDD6 \uD835\uDDDC \uD835\uDDE8 \uD835\uDDE6 \uD83D\uDEAC","type":"bot","platform":"discord","headline":"The ultimate management bot, you won't need anything else!","tags":["administration","all-in-one-bot","components-v2","moderation","multipurpose"],"votes":5,"votes_total":5,"review_score":5,"review_count":1}

Jesus ... and now i would like to know WTF is this ID .... nightmare, you guys r crazy F

snow bloom
minor vigil
#

A fucking setup that allows me to designate a channel and get notified when someone votes or writes a review.
But these endpoints are driving me crazy.
To get a card similar to this one:

runic creek
#

Also reviews are not part of the api

#

At least for now

minor vigil
#

With or without a webhook, it's not the problem; the problem is the endpoints.
Which endpoints provide me with the information I want?

Who votes? (username, usertag, avatar, etc.)
Who writes reviews? (same info)

jaunty plank
#

reviews are not part of the api.

minor vigil
#

very bad.

jaunty plank
#

webhooks provide an event when someone votes and includes their discord user ID

minor vigil
#

But the webhook to create this event always uses endpoints, right?
I don't want to use webhooks; I'm in development; I don't want to use ngrok or anything else.
It should work without it too.

jaunty plank
#

The easiest way to test webhooks locally is using postman. If you're comfortable with curl its the fastest way.

signal granite
jaunty plank
#

You can also setup a command for users to run to check the endpoint. But I'd really not reccomend it.

#

webhooks are easy and reliable.

runic creek
jaunty plank
#

๐Ÿ‘€

#

I thought it worked notlikenoot

#

Fun

mint vault
#

If you don't want webhooks, then you won't be able to implement whatever you want - pretty straightforward

leaden dragon
#

Quick question when I'm getting votes for one individual user using the older version of the API does it show the total votes they have ever given or the one vote they given in the twelve hours?

vital anvil
#

So feel free to use the API as is now

robust sphinx
#

Question for you guys. If your bot has it. Where do you guys get weather API's? Currently experimenting with something

timid musk
wild pine
#

Hello

cinder frigate
#

So whatโ€™s the topgg API?

#

Does it have docs website?

stuck kite
#

I just added an automatic commands push to API but I'm getting 401. I've reset my API key and tried again but no change. Sends the exact same thing to Discord and works. Only difference is the URL, method (PUT vs POST) and Authorization header. Not sure if there's some backend issues or if I'm doing something wrong..?

tawdry agate
mint vault
#

Shouldn't post that, just the guilds count

tawdry agate
#

something about shards should be done though

#

If I had multi instances bot, they would need to communicate with each other to get total sum of servers

#

Posting stats like , first three shards has this, three next ones has this would be perfect

mint vault
#

Well, as you said, make the instances communicate with each other

#

And that's more for clustering than sharding

#

Bots get with a single instance and multiple shards quite high

#

Once you have the multi-server/clustering you likely have the instances communicate with each other either, e.g. for rate limits etc.

tawdry agate
red rock
#

im getting:

TopGGAPIError: 401 Unauthorized (You need a token for this endpoint)
    at Api._request (/home/ubuntu/node_modules/@top-gg/sdk/dist/structs/Api.js:61:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
   at async Api.postStats (/home/ubuntu/node_modules/@top-gg/sdk/dist/structs/Api.js:86:9) {
  response: {
    statusCode: 401,

out of the blue for autoposter

rose briar
#

i got same error and that fix it.

red rock
vital anvil
#

ok good

#

was a temporary deploy hiccup

#

mb gang

stuck kite
#

I had gotten 401 before when trying to update commands using a token. Idk if that was fixed or not.

#

Will try again next update I guess

deft ledge
#

how can i use auto rewards for my discord bot in python

vestal wasp
#

#announcements message
eh, I rely on the IP because of my firewall. Is there no chance in getting the cidr beforehand?

icy aurora
vital anvil
#

Wdym domains

#

Its request ip not target IP

icy aurora
#

ahh

shy plume
#

Hello, i am using discordjs/core is sdk the only way to use topgg poster?

steep vigil
shy plume
steep vigil
keen bloom
#

Hey, I'd like to know how to set up my bot to give a reward when someone votes for it.

keen bloom
#

But how do I get my bot to identify the vote?

#

For him to give the reward.

mint vault
#

see the payload

toxic sapphire
#

how to see top cowoncy only my server?

mint vault
#

ask in the support server of the bot

stuck kite
tidal idol
#

and have verification based on that?

#

then no matter what IP is used its always tracable back ^_^

vital anvil
#

would break the existing layout, new version will have a new way to secure and verify requests.

stuck kite
sick ice
#

What endpoints do I use for checking if a user has voted for my server?

runic creek
snow bloom
#

I sent my bot servers to one of my bots api endpoints. It wont update on the bot page but if I do get bot info it shows the amount of servers. Confused on why its not updating on the page

mint vault
#

refresh data and wait some time ๐Ÿคทโ€โ™‚๏ธ

snow bloom
#

fixed it

#

I was using the old profile api key

raven plume
#

whats the API route to get reviews for bot

runic creek
#

There is no official endpoint for reviews afaik

uneven dew
#

how to implament oir find how to make users use a command only if they vote

steep vigil
unreal vine
#

How do I use the TopGG widgets when they give an Internal Server Error?

snow bloom
uneven dew
#

how to chnage color of page for bot

#

and other statistics

uneven jacinth
#

Hey, i want to know when the user voted, and how many votes and when their vote will expire.. how it's possible through api??

uneven jacinth
jaunty plank
#

Hi, the answer to the first question is using webhooks
The answer to the second question is using your own database
The answer to the third is 12 hours after receiving the webhook.

uneven jacinth
#

should i share a webhook in a channel, when user vote?

#

then count in our database

icy aurora
#

im sharing mine since mine gives out rewards and etc

uneven jacinth
runic creek
icy aurora
nova vortex
#

It it only me or does regenerating token doesn't work
I keep getting the same one after clicking many times

snow bloom
vital anvil
nova vortex
#

I'll use new ones but I still need to regenerate the old one

vital anvil
#

What for?

#

KZ_sideeye did you leak your token?

nova vortex
#

It doesn't matter what for
There's a regenerate button so it should do that

vital anvil
#

kinda true, its a bug

nova vortex
vital anvil
#

i can cycle ur token manually for now ๐Ÿ˜”

nova vortex
#

Sent it to my friend in a code by accident so it's safe but still I don't like the fact that it says success and the token doesn't change

vital anvil
#

can u link the bot page?

nova vortex
#

~~you can also give me free auction Cute_Cat ~~

icy aurora
#

no

nova vortex
vital anvil
#

nice try

icy aurora
nova vortex
#

(did you reset it?)

vital anvil
#

fixing the bug

nova vortex
#

Even better

vital anvil
#

oh it's not broken

#

the token just changes at the end

#

not the start

nova vortex
#

Nope

#

I reset it many times and copied into notepad

#

All the same

vital anvil
#

oh ur right

#

the response sends the new token

#

but it doesn't update it Thonk

nova vortex
#

Who fucked up the code

vital anvil
#

only one person who could

nova vortex
#

Bug bounty pretty please SteamHappy

vital anvil
#

we don't pay out bounties for bugs

nova vortex
#

Auction SteamHappy

vital anvil
#

Not gonna happen

#

Sorry friend

vital anvil
#

well good news

#

it was just cache

#

should be fine

shell crest
#

Trying to use the API, but I really feel excluded here xD

shell crest
#

It's not working with getting votes from the bot either

mint vault
#

Your Top.gg ID is 202212111498502144

polar saddle
#

I need a bot that notifies me when someone new joins a server

vital anvil
vital anvil
#

๐Ÿค” any asks for the top.gg api btw?

steep vigil
#

i dont do much api stuff though other than vote webhooks

vital anvil
#

noted

shell crest
shell crest
shell crest
# vital anvil ๐Ÿค” any asks for the top.gg api btw?

This might not be for the API, but I would like the website comments to be improved a bit. I've had many a problem responding to them. I've also got the problem that I can't transfer my projects from a team to myself, even though I just transfered them to the team as a test

#

And profit sharing from the votes would be nice, but I'll shut up now xD

vital anvil
shell crest
vital anvil
#

what I want is to just calculate the % of revenue made on a vote page

shell crest
#

Oh yeah, that'd work

#

A monthly thing then

#

Btw, did you fix the issue with the SDK crashing the bot even though there was a global error catch? That's the only reason I removed the voting in the first place

vital anvil
#

which sdk is that?

shell crest
vital anvil
#

yeah that's not ideal. SDKs definitely should catch the errors

#

Will check on it

shell crest
#

Nope, only have back to mid december unfortunately

#

I'm also assuming this is UTC

vital anvil
shell crest
mint vault
frozen folio
#

The servers where my bot is located show 0.

steep vigil
river patio
#

hello

#

i need some help

river patio
#

@snow bloom

snow bloom
finite dome
river patio
#

In the discord dev protal?

#

or

river patio
#

@snow bloom

finite dome
snow bloom
finite dome
#

Yeah someone replied with that, appreciate it

agile isle
#

am I able to test the webhook locally?

snow bloom
agile isle
snow bloom
#

Is your localhost on an open network with an open port?

agile isle
agile isle
snow bloom
snow bloom
agile isle
snow bloom
#

Your public ip can be find by typing what is my public ip into google

agile isle
#

I think I found it 1s

snow bloom
#

You will still need that port, port forwarded on your network

agile isle
snow bloom
#

Ye whatever is recieving your webhook

agile isle
snow bloom
agile isle
snow bloom
#

Have you ever hosted your own site before?

agile isle
#

I either did all local or all public

snow bloom
#

What engine are you using?

#

Apache, nginx?

agile isle
#

if express is one of them, then express๐Ÿ˜‚

#

tf is a engine in here?

#

define engine pls

snow bloom
#

Oh i see express.js

#

You ran node app.js and it has the output of running locally on port 3000?

agile isle
#

yes

#

also opening localhost:3000 api works just fine

snow bloom
#

So you can get to it from browser but top.gg isn't sending?

#

Did you set up the authorization?

agile isle
snow bloom
#

Wait 1 sec. Lemme jump on my pc

agile isle
#

alright, thanks

#

@snow bloom no need anymore

#

thanks!

snow bloom
agile isle
icy aurora
finite dome
#

I believe I used windows powershell, but just to see if the message would auto ping

icy aurora
finite dome
finite dome
#

Finally got the bot online and to remain online within discord. Mad props to the devs here cause this stuff ainโ€™t no joke

mint vault
#

There are so many ways and the easiest is probably the screen command

finite dome
#

Yeah I was just having difficulty keeping my bot thatโ€™s under review active and online. Didnโ€™t know what I was doing so I asked chat

#

Figured out, I had my index file capitalized smh

vital anvil
#

just docker man

rain heart
#

this

#

or if you wanna do "containerised", but with extra steps, kubernetes (and if too much money, droplets)

icy aurora
vital anvil
#

vs pm2: you're already doing random config hell, might aswell learn the industry standard
vs screen: this doesnt scale lol

icy aurora
vital anvil
#

why pm2 then

icy aurora
#

lazy

vital anvil
#

hey chatgpt write me a dockerfile for my node app

#

do u run docker container and pm2 on same machine?

icy aurora
#

yes

vital anvil
#

cool so if ur pm2 app starts overloading ur docker container is also cooked

icy aurora
#

my docker is hosting my cdn site

vital anvil
icy aurora
#

and i never had pm2 overload shit

mint vault
#

Kubernetes doesn't love Docker, it loves images, usually made with Docker

#

And Docker on Windows is just shit, so can as well add on the website that you'll likely move over to an UNIX-based system afterwards KEKW

icy aurora
#

for my vos

#

vps

mint vault
#

Yeah it's just annoying to do stuff with Docker on Windows

#

People will then come with the fact that Docker's a daemon that runs as root and isn't ideal for security

#

Will come up with alternatives like Podman which aren't really necessarily better

#

For hosting Docker's amazing honestly, for creating images and testing - better be on a UNIX-based system

#

Docker Desktop is fine for hobby projects.
For commercial work in enterprises you have to have a paid license after a certain number of employees or income

icy aurora
#

damn

unreal vine
#

Hello, my TopGG API isn't working. It was written in Fastify and I'm not using the TopGG SDK; I'm creating a POST route for it. The problem is that the API works when making a request through the command prompt. Could someone help me? I'm passing the token correctly, but it still doesn't work.

Some people told me that TopGG retrieves the token and puts it in a Bearer <token>.

#

@vital anvil

#

@jaunty plank

vital anvil
unreal vine
#

which is a post route

#

For some reason the endpoint isn't working on TopGG. I configured the auth correctly, and I set the CORS with origin *, but it's still complicated.

#

@vital anvil

vital anvil
#

What about it doesn't work @unreal vine

#

is this your webhook endpoint?

solemn dust
#

can someone guide me a lil with topgg api

steep vigil
solemn dust
steep vigil
#

so stats posting, and vote rewards

solemn dust
steep vigil
#

alright for stats posting i literally just do requests and simple interval task loop

#

for that i just do it the simple way

#

it could be even smaller i just have a bit extra in there

#

vote rewards i use fastapi and i realised just now that i forgot an important part leaving the bot vunerable FU-

steep vigil
steep vigil
#

so question for the smarter people uh if im using fastapi for a random endpoint for vote stuff, and i recieve one, how can i ensure its topgg via the secret key thing since i cant really tell how to do it

autumn locust
#

Hi does anyone know why this issue happens in few weeks

solemn dust
#

@steep vigil bro what is this webhook what do i add in the webhook url ? and auth ๐Ÿ˜ญ

steep vigil
#

i use a port eg. 0000 (not true for this example) and cloudflare tunnels to redirect my host 'localhost:0000' to sub.domain.tld/0000 for example so that it is public without my IP showing or having to constantly change links

steep vigil
#

its good for when you know you will never close it or have a power cut

#

else whenever you close it you have to change the urls every time

solemn dust
#

and just take the token from it and make requests

steep vigil
#

i think so

solemn dust
steep vigil
#

you have to make a function to do that

autumn locust
#

Does anyone know why does this issue happens?

dusk linden
#

Its STILL not fixed ๐Ÿ˜ญ?

#

That is crazy

autumn locust
#

Yeah still not fixed

icy aurora
dusk linden
#

That make sense but it would be nice to have and endpoint to check your page

vital anvil
void estuary
#

@strong dome in all honesty i would need to see the specific request you're sending to help you with your 404

strong dome
#

I can send the whole code block if youd like.

void estuary
#

for example, if i make a GET request to this endpoint

https://top.gg/api/bots/1413584945015951551/check?userId=1234

it returns a 404 user not found error

{
    "message": "User not found."
}
void estuary
strong dome
# void estuary sure
# --- Check if user voted on Top.gg ---
async def check_user_vote(user_id: int) -> bool:
    headers = {
        'Authorization': TOPGG_TOKEN
    }
    params = {'userId': str(user_id)}
    async with aiohttp.ClientSession() as session:
        async with session.get("https://top.gg/api/bots/1413584945015951551/check", headers=headers, params=params) as resp:
            if resp.status == 200:
                data = await resp.json()
                return bool(data.get('voted', 0))
            else:
                print(f"Top.gg API error: {resp.status}")
                return False```
void estuary
#

i guess try logging what user_id is being queried

#

also would be helpful to log the error response, not just the code

strong dome
#
Top.gg API error: 404```
#

Thats the error

void estuary
#

not the code

strong dome
#

Ah. How would I do that? I dont know much about py

strong dome
void estuary
#

inside of the else block

strong dome
void estuary
#

raise Exception() iirc

strong dome
#

and wheres that go..

void estuary
#

i don't understand what you're trying to do

#

if the endpoint is returning 404 u shouldn't need to throw an error

#

if it usually works and returns 404 only sometimes, there's probably an issue with how user_id is being passed

strong dome
#

How do I do the user_id issue?

void estuary
#

well i would need to see where the check_user_vote function is called from

#

i'm not an expert at python by any means, but passing the user_id as an integer seems strange

strong dome
#

Its sent as a str

#
params = {'userId': str(user_id)}```
void estuary
#

well yes but receiving it to the function as an int makes no sense imo

#

why convert from string --> int --> string?

strong dome
#

I dont know tbh

void estuary
#

maybe i'm missing something related to python but that's a red flag to me

strong dome
#

That may not be right

#

Cause it worked fine for me..

strong dome
#

Fixed the code. It happens again, ill lyk

void estuary
solemn dust
#

@steep vigil bro i added the ngrok link there its not working

steep vigil
solemn dust
steep vigil
#

I'm tired and it's been a long day

solemn dust
solemn dust
steep vigil
#

I don't know

solemn dust
mint cedar
#

I keep getting these weird errors

peak rampart
#

hey

finite dome
#

so without server webhooks, there's no real way to track votes when people vote on top gg for your server huh

#

this is the problem I'm running into and here I thought the webhook url in the bots webhooks tab would suffice

finite dome
#

cause I feel like ive done everything

#

i feel defeated

urban kayak
#

Dm me.

steep vigil
#

@finite dome its likely against ToS via webscraping

urban kayak
#

Ok cannot help xd

mint cedar
finite dome
mint cedar
#

You can start an aiohttp server on the same machine where your bot is running

finite dome
#

Shit Iโ€™m gonna look into that, appreciate you

odd raptor
urban lynx
#

I need to make a vote cmd so that when some1 votes for my bot the bot dms em a msg. M using discord.py

mint vault
peak oasis
#

How can I test the api if I can't vote?

#

I'm on cooldown, is there a test button anywhere?

steep vigil
#

'sent test vote'

urban lynx
#

;-;

#

Why tf are the docs broken af?

#

;-;

runic creek
#

Because they are not updated I guess

urban lynx
#

Breh

#

@runic creek ? ;-;

#

I need help man

#

ts has fried my brain

#

;-;