#topgg-api
1 messages · Page 13 of 1
go
go
ko
ko
jo
ko
jo
jo
go
go
in
why in
im in
now why in
then go in like how soon
im ready like rn
@rustic whale spam
Now that my bot is approved how do I get the api
ok
Hey, how do I get my APIKEY?
@warped sand
Okay I'll check, ty
Is it that?
@icy aurora
ping me if u have an answer
Yes
Yes that's your token.
If the bot Iâm working on is meant for a single server; am I eligible to get an api key ?
hell no
your bot must be in multiple servers and been approved by topgg reviewers
Topgg bot is like slow or stuck with assigning voter role
I figured probably let the serverâs bot do the assigning
you dont need "api" for that.
would you kindly explain?
webhook
thank you, i reviewed the documentation, it seems i can't do it with the nocode platform im using, will require some nodejs to listen then reformat it for the platform. its good news either way đ
Someone here who could help me with the api?
What is api?
With the top gg api
What is top gg api??
Youâre kidding me?
One message removed from a suspended account.

...
Don't laugh
Don't laugh
One message removed from a suspended account.
im allowed to.
bot.topgg_webhook = topgg.WebhookManager(bot)\
.dbl_webhook("/dbl", "dbl_auth")\
.dsl_webhook("/dsl", "dsl_auth")```
ok so this adds routes to listen to
but whats the base webhook url
how do u get that
http not https if you don't have a domain and SSL.
If you're using an IP at home make sure you're port forwarded
Ty^^
One message removed from a suspended account.
Ok ty for telling me ^^
how do i port forward
It'll depend on your router.
https://portforward.com/router.htm
Open ports on your router with our port forwarding guides. We have guides specific to your router.
so should i forward from the port i set in the webhook to the same port of my computer's public ip ?
is there any way to even check if the request is reaching my router/server
are you running a web server like nginx or apache?
oh nvm looks like you want to port forward
its thru the topggpy webhookmanager which sets up its own web application
and the test post request \isnt coming thru
i'm not sure about port forwarding that much, prolly youtube it or read the document that woo linked
if you're using it for testing, consider using a free application like ngrok that assigns public urls which map to your local network
(kinda like port forwarding but you don't have to configure anything)
I want to make the add link command a topgg vote requirement in my bot, but I don't understand the document. Can anyone send me the code?
@solid imp
check the pins of this channel
you only get a possible approach of implementations, not code
there's no universal way to do it, check your requirements and what works best for your application

do u use the python sdk or the actual api
Actual api
No abstractions = lesser overhead as long as you know what youâre doing
ok it finally works ! thanks for the help sohunn and woo
is it possible to specify a subdomain on the ngrok-free.app domain on the free plan
Im not sure, Iâve never actually tried it
iirc no
thats a paid feature
to have static subdomain names
They do allow one static subdomain that they generate
oh well why is it even an issue?
It was when I asked lmao then I figured it out
TopGGAPIError: 401 Unauthorized (You need a token for this endpoint)
at Api._request (/root/discord/mursy/node_modules/@top-gg/sdk/dist/structs/Api.js:61:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Api.postStats (/root/discord/mursy/node_modules/@top-gg/sdk/dist/structs/Api.js:86:9) {
response: {
statusCode: 401,
headers: {
date: 'Thu, 28 Dec 2023 04:39:06 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '24',
connection: 'keep-alive',
'access-control-allow-origin': '*',
'access-control-allow-headers': 'Authorization',
etag: 'W/"18-XPDV80vbMk4yY1/PADG4jYM4rSI"',
'set-cookie': [Array],
'cache-control': 'private',
'cf-cache-status': 'DYNAMIC',
'strict-transport-security': 'max-age=15552000; includeSubDomains; preload',
'x-content-type-options': 'nosniff',
server: 'cloudflare',
'cf-ray': '83c71e192f7e7a48-DUS',
'alt-svc': 'h3=":443"; ma=86400'
},
trailers: {},
opaque: null,
body: BodyReadable {
_readableState: [ReadableState],
_read: [Function: bound resume],
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
[Symbol(abort)]: [Function (anonymous)],
[Symbol(kConsume)]: [Object],
[Symbol(kBody)]: null,
[Symbol(kContentType)]: 'application/json; charset=utf-8',
[Symbol(kReading)]: false
},
context: undefined
}
}```
started getting this error once my bot was verified with discord, I don't think its related but was working before hand and I haven't changed anything
```js
require('dotenv').config();
const errorLog = require('/root/discord/mursy/Files/Modules/errorlog.js');
const client = new Discord.Client(
{
shards: 'auto',
intents: ['GUILD_VOICE_STATES', 'GUILDS', 'GUILD_MESSAGES', 'GUILD_MEMBERS', 'DIRECT_MESSAGES', 'DIRECT_MESSAGE_REACTIONS'],
partials: ["MESSAGE", "CHANNEL", "REACTION", "CHANNEL", "USER", "MEMBER"]
}
);
const { AutoPoster } = require('topgg-autoposter')
try {
const ap = AutoPoster(process.env.TOPGG_TOKEN, client)
ap.on('posted', () => {
const currentDate = new Date()
console.log(`[${currentDate.toLocaleString()}][Mursy Systems] Posted stats to Top.gg!`)
})
} catch (e) {
errorLog(e)
}```
Please ping with Response
Hello, would like clarification on sending bot stats to the api. Docs aren't super clear on sharding and how user count is rendered on the site.
I have two shards that are unaware of each other's server's count. Setting server_count as a number, shard_count as 2, and shard_id to either 0 or 1 depending on the shard
I expect that the server counts get added together to be shown on the bot webpage, and that the # of shards is also shown. However, my bot's page is showing only one of the server counts, but is correctly showing 2 shards
What's the correct combination of params that need to be sent between these fields?
i think autoposter automatically adds the server counts of all shards for you when sending the data
const ap = AutoPoster(topgg, manager);
as long as the manager is set to shardingmanager so like i have it to
const manager = new ShardingManager('./bot.js', { token: token });
i just use autoposter
đ€·
check to see if your top.gg token was changed on the webhooks area maybe verification changed it?
Mmm I donât have a JavaScript bot but looking at the implementation it just looks like the data itâs sending is the server_count and shard_count đ€
Checked, I regenerated it, and put the new token and still same error
hi. i am using aoi.js as coding library. but i don't know how to use api. can you help me?
it it possible to get server vote logs like something similar to bot votes
Only with webhooks
There is no api for servers i guess
Then idk
does anyone here have experience with development of a python webhook for the event when someone votes for your bot on topgg?
await dbl.getVotes().then((x) => {
if (command.dbl && !x.filter((y) => y.id === interaction.user.id).length)
return interaction.reply({embeds: [Oy], components: [OyVer]})
else command.execute(client, interaction, dbl)```
Can't votes be checked with getVotes?
it's hasVoted not getVotes
hasVoted() checks if the user has voted and changes the value of voted after 12 hours so the user would have to vote every 12 hours. getVotes() retrieves 1000 votes in a month. From the code he provided here, it looks like he is filtering these 1000 votes in search of the person who used the command.
I have no idea if this is the intended effect, but it is definitely a way to check if someone voted for the bot during the current month
You probably need to do some debugging to check if this filtering works at all, what x is and so on
I think getvotes has a much stricter rate limit. So its not ideal without significant caching. however it can be great with that caching.
The only concern with so much caching is people not showing up as voted for awhile.
Try this , create a function
topgg.js
const {
EmbedBuilder,
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
} = require("discord.js");
const axios = require("axios");
const apiToken = require("../config.js").topGG; // your topGG token
module.exports = {
voteCheck: async function (interaction) {
try {
const userId = interaction.user.id;
const response = await axios.get(
`https://top.gg/api/bots/BOT_ID/check?userId=${userId}`,
{
headers: {
Authorization: apiToken,
},
}
);
if (response.data.voted < 1) {
const voteLink = "https://top.gg/bot/BOT_ID/vote";
const embed = new EmbedBuilder()
.setColor(0x00ffff)
.setDescription("### Vote if you want to use this command.");
const row = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setLabel("Vote for me")
.setURL(voteLink)
.setEmoji("đ")
.setStyle(ButtonStyle.Link)
);
interaction.reply({
embeds: [embed],
components: [row],
ephemeral: true,
});
return false;
} else {
return true;
}
} catch (e) {
}
},
};```
and use it in your commands like this :
ping.js
```js
const { SlashCommandBuilder } = require("discord.js");
const { voteCheck } = require("../functions/topgg.js");
module.exports = {
data: new SlashCommandBuilder()
.setName("ping")
.setDescription("Pong!")
,
async execute(interaction, abot) {
const vote = await voteCheck(interaction);
if (vote != true) {
console.log('Bouta get a vote');
return;
}
interaction.reply({content: `Pong đ`, ephemeral: true})
}
};
Dont forget to do
npm i axios
And replace BOT_ID with your bot's ID
how do I get the server count of a specific discord bot (importing into webpage)
Can anyone help me to create like when any owner added my bot he got dm like Thanks for adding, Vote me Like tht + I need Smth so I can get vote [my bot is chat bot wht I should do đ]
It depends on the language in which you write the bot. Generally, the process is the same: you get a guild object from the event that fires when someone adds your bot, this object has the value owner containing the owner's id, you fetch the user from the cache or api and send him a dm
Remember that the person who adds your bot is not always the owner. Often, ownership of the server is transferred to the alt account
As for the second part of the message, I don't quite understand what you mean
Like if u got invite tracker bot or moderation bot u can add some specific command , to use it u need to vote , but I got chat bot what can I do in it?
I have no idea how your bot works, what commands it has and so on. You can always add something to the bot, but if all it does is respond to users' messages, there are not many commands that may require voting
where can i find topgg token?
it says page settings under Webhooks but the page is 404
you must have a bot has been aproved in topgg
alr
of a bot, or a user?
Save it in your own database
He is asking about total vote count by user
mostly he probably not asking for that who knows
Is it possible to hide the server & shard count on a bot that's posted through the api?
Upp
no
A bit too late
When I press 'send test' for maybe like the 4th times because the previous times I pressed it, my project didn't work due to my stupidity â I received an error saying it cannot process my request. I was assuming maybe I was ratelimited. How long will I need to wait?
It worked now! 
@chilly light So you want to know who voted. That's why I said check pinned messages.
I want to see it from the link
Use this https://top.gg/api/bots/bot_id/check?userId=ID where bot_id is the id of your bot and ID is the id of the user you want to check if he voted for your bot
There is also this
So make sure you authorize yourself correctly
That would help me, but how do I find out if you just voted for the moment?
You want an event? youll want to use webhooks
https://docs.top.gg/resources/webhooks/
CAN ANYONE HELP ME THE CODE IS NOT WORKING I DONT KNOW WHY LIKE I HAVE TO ADD ANY WEBHOOK OR PASSWORD?
import topgg
# This example uses topggpy's webhook system.
bot_topgg_webhook = topgg.WebhookManager(bot).dbl_webhook("/dblwebhook", "password")
# The port must be a number between 1024 and 49151.
bot_topgg_webhook.run(5000) # this method can be awaited as well
@bot.event
async def on_dbl_vote(data):
"""An event that is called whenever someone votes for the bot on Top.gg."""
if data["type"] == "test":
# this is roughly equivalent to
# `return await on_dbl_test(data)` in this case
return bot.dispatch("dbl_test", data)
print(f"Received a vote:\n{data}")
@bot.event
async def on_dbl_test(data):
"""An event that is called whenever someone tests the webhook system for your bot on Top.gg."""
print(f"Received a test vote:\n{data}")
Did you fill in the webhook url and auth? Not a Discord webhook
fill it in on top.gg*
?
This one
Thats for webhook-topgg, a third party service.
a webhook sends a request one place, since you're using their url it goes to them rather than your webhook server
So from where I can get a correct webhook
The bottom section of this message: #topgg-api message
The url will depend on your hosting location(the public ip, ports available, http vs https) for your code.

cathat
đ
I'm doing it, but it doesn't work because it's in [], how can I fix it?
{"error":"Unauthorized"}
how do i solve this problem
You need your api token
which you need your bot to be approved
How so?
Good question you tell me
I get it this way but the bot sends 2 messages sometimes, what could be the reason? Is top.gg sending the same request twice?
You need to send a 200 response back
Webhook listener should take care of it by itself
If it didn't respond to the webhook appropriately, the webhook would spam with these requests
But the sending time of these messages is identical, so I don't know if it's such a big problem
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1122550707741020160')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1170985971542654988')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1170985971542654988')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=901158094531358750')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1170985971542654988')
0|meko | Error making Top.gg API request: 503, message='Service Unavailable', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1170985971542654988')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1023563939075870800')
0|meko | Error making Top.gg API request: 503, message='Service Unavailable', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1113831005262991390')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1170985971542654988')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1113739022741811232')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=920221158362714134')
0|meko | Error making Top.gg API request: 504, message='Gateway Time-out', url=URL('https://top.gg/api/bots/1168296808741613598/check?userId=1170985971542654988')
can anyone help me about this
topgg servers crashed
ok its mean my code is correct the issue with top.gg?
ok thanks for help

You are welcome
I'm still getting 502 when I POST https://top.gg/api/bots/886196406761693204/stats since 8am to 9am AEDT
cant go in
still being bannedđ„Č
banned?
ur getting a 429
I'm getting 502s
you should be able to just wait it out
ok thanks you
Hopefully u are right
We are presently encountering a service disruption.
For additional details, kindly refer to the #site-status channel.
To receive notifications regarding future incidents or updates, you may assign the "Site Status" role to yourself by going here: id:customize.
Our website is down
error 502 Bad Gateway
and literally message above^
is that why some bots are down?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
we need a: https://http.cat/status/200
bots are back
I doubt that was the reason. If this is the case, the bot should not rely entirely on the top.gg API because it can throw 5xx errors quite often
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
you should make bot about Fathie
One message removed from a suspended account.
about you
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
bros gonna come up here to beat my ass 
One message removed from a suspended account.
it was a joke
how do you add it?
i only have shards with my bot
i want to have the other parameters like server_count
what's your bot coded in
With nodejs using discord.js
Auto-Poster for Top.gg. Latest version: 2.0.1, last published: 2 years ago. Start using topgg-autoposter in your project by running npm i topgg-autoposter. There are 4 other projects in the npm registry using topgg-autoposter.
Oh thanks
youre welcome
it get poseted but it dosen't shows in my top.gg webpage
or dbl statics
how can i fix it
?
If nothing comes up, check that you have correctly indicated the topgg token or that the Client you have passed to it is the correct one.
If you use shards you have to pass the variable that the shardmanager has
Oh I use hybrid sharding
It's the same, I've never used hybrid sharding but from what I see it has a function called ClusterManager, just store it in a variable and then use the autoposter
const poster = AutoPoster('topggtoken', shard-variable)
k
AlguĂ©m Sup que entende portuguĂȘs?
An official API endpoint for that is not supported unfortunately
I have no idea but you don't need a library for most things. This is the most normal API that can be fetched via a link
well, tbh i was planning on using topgg.WebhookManager but not quite sure how to do so with aiohttp||library|| alone
I don't know much about Python, but in each case the foundation is the same: you need an API that will accept POST requests and then you provide a link to this API in the settings on top.gg. Libraries only simplify it - even without much coding knowledge you can create a webhook, but you can do everything yourself without them
It will require a bit more work, that's for sure
!claim
it would be so cool tho, I wanted to add the bot reviews on my website ;/
well , at least consider it as a new suggestion
thanx, imma look more into it then
could someone tell me what url i should add in https://top.gg/bot/{bot_id}/webhooks
im using the topggpy library and that is the last thing left to do
In most cases it's http://your_vps_ip:port/dblwebhook
Of course, you can name the route whatever you want, this is just an example
could u tell me a fix for testing things out while im running it locally?
ok
You would need to port forward your router if you do not have a public IP address
?
I get the same
:P
yes site is down so the API won't work
thats why your requests will return 5XX errors
TopGGAPIError: 504 Gateway Timeout```
When the site is open and the API is working correctly, the status will be 200?
Ty
so my bot's commands are used so much that I got rate limited from topgg api and in result the bot commands will crash. how many requests per seccond can the https://top.gg/api/bots/1018890617373335564/check?userId=${userId} handle ?
it has to be this issue, since the only errors I am getting on my console for the last day is only from top.gg api
TopGGAPIError: 504 Gateway Timeout
ohhhh so that was the error
Site is down still ;-;
thats not a ratelimit error
if you were ratelimited you would see 429 not 504
Thanks for letting me know
Can we please get a webhook to notify us of outage as this is causing issues for my voting requirement features
^ second this
outage again and itâs affecting our vote leaderboard
I'd suggest tracking outages yourself rather than depending on a webhook.
If we used a webhook to notify of site outages the webhook could also go down, even if isolated.
So, I suggest trying it following way:
- As you are using API then I think you will be also using it to update server count which is every now and then. If it fails you will know the site is down and for sometime auto turn off the vote req and once a successful request happens you can again turn on and that will be done by code itself. I have given the logic if still it's unclear please feel free to ask.
- If you want coding part:
bot.site_down=False
try:
make_request()
if bot.site_down:
bot.site_down=False
except Exception as e:
# perform other logics on e here to check if really down
bot.site_down=True
pass
- So when you have commands which require top.gg vote well check for the
bot.site_downvariable and if it is true then override vote req
Or, migrate from any need to rely on topgg api
Use webhooks for voting and store votes in your database instead of requesting vote status or vote list
I require voting for a feature 12 hour duration
That still works
Store votes from webhooks in a database, just query that and check when they last voted and if 12 hours has passed since then
^ at some point you'll need to move to that system anyway. the api endpoint for checking for votes has a ratelimit, as your bot grows youll start hitting our ratelimit.
Ew SQL
nosql works too
Does anyone know that how to message the user, who has voted for the bot?
const user = client.users.cache.get(vote.user)
user.send({embeds: [], content: " " })
How to get that vote object?
Like this, or is there another way too?
const express = require("express");
const Topgg = require("@top-gg/sdk");
const app = express(); // Your express app
const webhook = new Topgg.Webhook("topggauth123"); // add your Top.gg webhook authorization (not bot token)
app.post(
"/dblwebhook",
webhook.listener((vote) => {
// vote is your vote object
console.log(vote.user); // 221221226561929217
})
); // attach the middleware
app.listen(3000); // your port
Code from docs
@icy aurora you there?
Look at the code you provided. It shows vote being defined and being used.
Thereâs few different ways to do this, mine is completely different because sharding manager so
i will rather listen to @jaunty plank
also sorry for late response im trying buy tux
Np, just wanna ask that, what should I put in webhook url in top.gg? Discord webhook link or something other than that?
And inside the auth, what should I put?
the webhook url is the url to the web server your code is hosted on and the path the webserver is on.
For example, http://myVPSip:3000/webhook
The auth can be anything you want, you're the web host in this case so you define it.
hmm
I don't recommend pointing webhooks right at your vps, mask it with cloudflare
Most people dont have domains here
if top.gg is ever hacked or if a mod ever goes rogue (never say never) all those who put direct IPs have leaked their bots hosting ip
you can get a free domain to cloak your webhooks
a .cx or something
it's not easy or cheap to change a vps ip (can cost money to change server)
yeah for sure, I just dont think its feasible to teach people all of these things in the context of an api support channel.
Mods dont have access to webhook info
like me
I dont have domains because Im poor and jobless but im using my credit card pay for hosting
What is the npm that handles voting events?
is anyone currently maintaining the go-sdk ? or is it just so dead that nobody really cares
you can PR if you want to and start maintaining it, @untold sparrow can walk you through it
https://docs.top.gg/resources/webhooks/ and maybe you're looking for
Documentation for @top-gg/sdk
One message removed from a suspended account.
i use https://topgg.js.org/
Documentation for @top-gg/sdk
One message removed from a suspended account.
One message removed from a suspended account.
ik
One message removed from a suspended account.
damn
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Can i add two webhooks to my app?
no i donnt think so
only 1
why would u need 2
đ€
Possibly for the bot and the server
And yes, it is possible, you just need to specify a different port
All bots that offer vote tracking work on the same principle
One for the server to send a message and the other for the bot to emit an event
But I think I can simplify it by combining the 2 into one xd
The bot receives the original webhook and sends it to the webhook of the webhooks for servers and that's it.
https://top.gg/bot/<your bot id here>/webhooks
u get the user's id , just make a function that will have the logic of finding the user with his ID and dm the user. then use the function on the webhook listener ? something like await dmUser(vote.user);
we dont allow browser cookies to be used as authorization
what who the declined my bot limao is a skin checker bot so it need autorization đ€Šââïž
reach out to the bot reviewer that declined it
idgaf
please be respectful, I have nothing to do with your bot being declined
sorry
My bot had votes in the 40s in the past days, but the votes were reset to zero even though it was not the beginning of the month. I thought it was a DDoS attack, but there are still no votes.
@signal hawk
please read #announcements and #site-status
I read it and the moderators said it would pass soon. When will it pass? Will additional days be given? (To prevent votes from being reset)
@radiant pasture
keep an eye out in those channels, you will get a ping when there's any update
okey, thanks.
So, will the votes we cast now be added to our previous votes? @radiant pasture
Last question
yes
okey, thanks
i send mesage
hi is there a way to get all reviews of my bot?
from https://top.gg/api/client/entities/972795104525975622/reviews i can only see top 20s
Well, this is not a documented endpoint, so it is possible that it will not be available in the future, but after a short search of the messages on this server, it turns out that you can add ?page=2 to the link to get reviews from the second page
One message removed from a suspended account.
One message removed from a suspended account.
Same
I donât get it how to reset your member count so confusing 
thankss
One message removed from a suspended account.
One message removed from a suspended account.
uh
So my server member count
Isnât updating on top.gg
it says I got 0 members but I got 2k
One message removed from a suspended account.
A server
Yea
yea that
I Js donât get it why I got redirected here to change it in api or Smr
But I will Js wait for the bot
To go online
One message removed from a suspended account.
One message removed from a suspended account.
damn yea my bad I will Js wait
One message removed from a suspended account.
One message removed from a suspended account.
me neither 
well no i think it existed a while back because there was a vuln with it
but yeah dont use it, it's intentionally not documented because it would allow people to incentivise reviews (not a good thing)
Termed đ
im trying to setup a vote reward event and i have this
const express = require('express');
const bodyParser = require('body-parser');
const { Webhook } = require('@top-gg/sdk');
const userModel = require("/home/container/src/models/userModel");
const webhook = new Webhook('top-gg token');
async function vote(vote) {
const userId = vote.user;
const coins = Math.floor(Math.random() * 2000) + 1;
// Update user's coins
const user = await userModel.findOne({ UserID: userId }).exec();
if (user) {
user.credits += coins;
await user.save().catch(err => console.error(err));
}
// Send a message to a channel
const channel = client.channels.cache.get('1196187591385563227');
if (channel) {
channel.send(`Thank you, <@${userId}>, for voting! Here's your reward for voting: ${coins} coins.`);
}
}
express()
.use(bodyParser.json())
.post('/topgg-webhook', webhook.listener(vote))
.listen(3000, () => {
console.log('Webhook server is running on port 3000');
});
But nothing get sent to the channel
is the vote function running or just no message being sent?
did you fill out the webhook url and auth on the website?
the function is running but no message being sent
and i did fill the webhook url
But not the auth
The auth needs to be filled in:
The authorization is sent by top.gg in webhook requests the @top-gg/sdk library rejects all requests that they are not the same between the website and the library https://docs.top.gg/resources/webhooks/#security
Hello, so I have a problem, how do I access the top.gg api, I need to know what to put after https://top.gg/api
what are you trying to do?
authenticate myself to release the top.gg api
@icy aurora
like post stats or?
only way to authenticate yourself is your topgg bot token and post or get information
That's exactly what I'm trying to do.
URL: https://top.gg/api
Https Headers: Authorization: (mybottoken)
did I make something wrong?
The strangest thing is that when I go to test it, I get this error:
I'm following this site: https://docs.top.gg/api/@reference/#authentication
thatâs base api url
OK, but how do I authenticate?
keep read the documents it would tell you on bots page
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Hi, I tried using @top-gg/sdk but I don't get any interaction when I test send.
const Topgg = require("@top-gg/sdk");
const express = require('express')
const app = express()
const webhook = new Topgg.Webhook("topggauth");
app.post("/vote", webhook.listener(async (vote) => {
console.log("oy verdi")
console.log(vote);
})
);
app.listen(30081);
this code
@old forge
@radiant pasture
yes?
please don't ping people, they will help you if they know the answer
Oky thnks
Sorry if I tag you in case you know.
have you set the correct url for the webhook?
Yes
port 30081 ?
Yes
why not 3000
I wanted to do something different, would you mind if I did that?
no
Ok, I'll try it when the power comes.
It seems like your code is set up to listen for POST requests at the "/vote" endpoint and use the Top.gg SDK's webhook functionality. If you are not seeing any logs when a vote occurs, there could be several reasons for this.
Here are some things you can check:
-
Webhook Configuration:
- Make sure that the webhook is properly set up on the Top.gg website with the correct URL (e.g.,
https://yourdomain.com/vote) and secret.
- Make sure that the webhook is properly set up on the Top.gg website with the correct URL (e.g.,
-
Correct Endpoint:
- Ensure that the endpoint in your code (
/vote) matches the one you set up on the Top.gg website.
- Ensure that the endpoint in your code (
-
Express Middleware:
- Check if your Express app is properly configured to parse JSON. You may need to add the following middleware:
app.use(express.json());
- Check if your Express app is properly configured to parse JSON. You may need to add the following middleware:
-
Port and Firewall:
- Ensure that the port (30081 in your case) is open and accessible. Check your server's firewall settings.
-
Logs for Errors:
- Add error handling to your code to log any potential errors:
app.post("/vote", webhook.listener(async (vote) => { try { console.log("oy verdi"); console.log(vote); } catch (error) { console.error("Error processing vote:", error); } }));
- Add error handling to your code to log any potential errors:
-
Check Top.gg Webhook Logs:
- Check the Top.gg webhook logs for any errors or information regarding the delivery of the webhook.
After checking these points, you should have a better idea of what might be going wrong. If the issue persists, you may want to check the documentation of the Top.gg SDK or seek support from the Top.gg community for specific troubleshooting steps related to their SDK.
const { Webhook , Api } = require('@top-gg/sdk')
const {WebhookClient} = require('discord.js')
const express = require('express')
const app = express()
const webhook = new Webhook(process.env.webhookAuth)
app.post('/top-votes', webhook.listener(vote => {
client.voted(vote)
}))
app.listen(3001)
console.log(`Top.gg webhook listening on port 3001`)
```
this is my code btw, compare it to yours
Did you put token instead of auth?
process.env.webhookAuth = my auth token
ok thank you again
np
@velvet compass stop with the gpt responses
well, that's my code
Change topggauth to the authentication code you put on the website and also port 30081 is quite an unusual port for receiving post requests make sure your port is open and is accessible by âoutsidersâ
I tried to change the port to 3000 but it didn't work again
Cap
IT IS mine lol
ghost ping ???
why didint it work
give an error
give us something
Whatâs the error
Idk
They didnt give an error
They just said it doesnt work
it doesn't give any error
well theres a few possibilities you're gonna have to check
- Your program isn't being run. Change your app.listen(port) to app.listen(port, () => console.log("Listening on port port")) this way you'll know that your app is indeed listening on the port
- Your authentication is wrong
- Your port is closed
Did you fill in the url and auth on top.gg?
const Topgg = require("@top-gg/sdk");
const express = require('express')
const app = express()
const webhook = new Topgg.Webhook("kitty3008");
app.post("/vote", webhook.listener(async (vote) => {
console.log("oy verdi")
console.log(vote);
}));
app.listen(3000, () => {
console.log("app listening: 3000")
});
are you using a local computer to host this?
yes my own computer
Have you port forwarded?
I also tried it on the virtual server, there is the same problem, it does not throw an error.
I would recommend using something like: https://www.yougetsignal.com/tools/open-ports/
to check if requests are getting through
Port checker is a utility used to identify your external IP address and detect open ports on your connection. This tool is useful for finding out if your port forwarding is setup correctly or if your server applications are being blocked by a firewall.
(it sends a remote request to check what happens)
are you sure you port forwarded in your router settings?
I ran the infrastructure and used it
I connect and use phone internet
I dont think phone internet can be port forwarded đ€
I think 95% of phone providers will block things like this
did the website give the same port 3000 is closed message?
I dont think anything is wrong with your code, or anything like that.
Just a firewall is blocking the request somewhere.
typically its just a process called port forwarding, but it sounds like their home network is using a mobile provider. Which typically blocks this type of stuff.
Hopefully their virtual server(I assume VPS) its just UFW or a local firewall blocking the requests.
o, thats a pain
I got lucky with mine I guess, I can just edit my firewall rules on the fly
I open mine for a couple hours at most, then turn it back off just because leaving a port open on a home network isnt the best solution.
Why?
Its essentially taking away one major layer of protection(and the first) for your home network.
Anyone from outside of your network will just be told "no nothing is here" when no port forwarding is used.
When you port forward something anything on that port will be allowed to pass to the computer you forwarded to, any possible vulnerability on that system needs to monitored closely, otherwise you risk outside sources accessing the system, your network, or other things.
On an old computer I had it would wake up during the night all the time. turns out I had wake on lan on that pc and a port forwarded.
It would wake because people would send requests to that port randomly.
Anyone can send a request at any time, malicious, or just because, its just something everyone should be aware of.
thank you for your help, you said something was blocking it. i had to add it from azure portal. thank you again for your help <3
@restive otter@jaunty plank@spring pebble
perfect!
yw np
Port forwarding depends on your specific router, so it can be really hard to help with.
In my router its in the "WAN" > "Port Forwarding" section.
setting my local machines IP(internal network IP) and the local port and protcol and saving.
However, your router may be different. This website lists pretty much every router that you could think of and has a tutorial for it. https://portforward.com/router.htm
If your router isnt listed one from the same brand should be listed.
tcp
deleted because of the leak
you're probably using http not https, your url will probably need to be http://
Is the path set in code the same one you use in your url?
const webhook = new Topgg.Webhook("authhere"); //authhere
app.post("/vote" // path here
any other potential firewalls? Host, or OS side?
Do you mind if I send a request to your system?
Is the auth still the same as before? or just empty
I'm just getting no response at all it just times out
Yeah, weird.
Linux machine? check UFW
Typically the program will crash if a port is already in use
If its windows, windows firewall might also be blocking it
or maybe you need udp for some reason
your express server is using 3389, so it shouldnt be needed
One message removed from a suspended account.
One message removed from a suspended account.
Saddly I'm going to have to get off, I've been on for a long time
There is no API for servers
If you want to receive votes from the server, you must use a webhook
Can i get The Link?
Where can i get/create a webhook url?
The url is something you already "have"
Its just formatting it correctly, for most people(who don't own a domain) it will be http://TheIPOfYourHost:PORT/path
Where can I find that or use that?
and is there a way I could use flash for this or to create my own domain
flash?
flask*
flask is fine
a domain isnt needed strictly, but its generally recommended(for ssl support).
Most people dont use a domain for their top.gg webhook however
and I would need to make the flask app public right?
tbh, I'm sorta new to the whole post request and what not, so I'm hoping to play around with it so I can get the hang of it
How would I do that?
Sounds like you're ahead of most people. Most people just want it to work, and they dont care how đ
making it public?
Just making sure your flask program isnt being blocked by any firewalls.
yh, Ik i'm basically asking to be spoon fed, but not entirely. I need to know how the code works for future reference along with any incoming errors, so ik where it's coming from.
but I'm down to be led by a video or docs that just walks me through the process
once it's not all over the place
Hopefully we will have videos eventually

I'm surprised there still hasn't been any
the docs are not too helpful with configuration of everything. The docs were written with the expectation of people knowing how web requests work already.
I'm hoping we can write more guide style content soon
But here it is:
https://docs.top.gg/resources/webhooks/
https://docs.top.gg/libraries/python/
I'm surprised someone hasnt done it on their own tbh.
Well, I have been poking around for quite a while. I get the gist of how the request is made and received, idk anything further, but rn I'm just stuck at getting a webhook url
What are you using to host?
Home? a vps? dedicated server? something else?
must be bc everyone operates like "once I figure it out, I am gone."
yeah true
I'd imagine it's smth like that
home/local
So itll be your homes public ip
http://YourHomeIP:PORT/PATH
Port and path you'll setup in flask.
With a home network youll need to port forward on your router.
Port and path you'll setup in flask.
or if you use our lib it can be set there too
in dumb dumb terms now 
What is the PORT?
and the PATH
a port is a number between 1 and 60000~
Its part of a network request, it just lets a single system have multiple things hosted on it.
3000 is commonly used
however, it doesnt really matter as long as its not used by something else.
app.run(port=port_number)
or
app.run(port=3000)
Path is the end part of the url.
https://top.gg/user/me
https://top.gg is the main part of the URL
/user/me would be the path.
In this situation path can be anything you want(within reason)
Both will be things you would set in flask
ohh ok. I get it
How would this work with my flash though?
I get the theory, but not so much the practical
Sadly I'm not a py dev, and I've never used flask.
a lot of the practical will have to come from you.
https://flask.palletsprojects.com/en/3.0.x/quickstart/
I'd say look at our library to learn from, but it uses aiohttp
https://github.com/top-gg/python-sdk/blob/master/topgg/http.py
If you just want to get it to work for now our py library could be your best bet
https://docs.top.gg/libraries/python/
Or maybe someone comes around who can help with flask.
I could ask around in the python server and try my luck there. But rn, I the python lib code is of no help until I get the webhook url.
Thank your time though
really appreciated.
How Can i Make Webhook Send? And where I can Put it So when Someone Voted It will Trigger?
Create a webhook (aka web server) according to the documentation, enter the link to this webhook in your server settings (https://top.gg/servers/id/webhooks), click "Send Test" to send a test request
The rest depends on what programming language you use to create such a webhook
You have to write the entire logic of checking whether the request comes from top.gg, responding to the request and saving data from the request in the database yourself
Does the "~webhooks" on the last Argument of the link is the Webhook Code or The https://webhook something smth?
btw what webhook are you talking about? Like a Message Discord webhook?
Nope
You can't use the Discord webhook
You need to write your own webhook, which is a web server to which top.gg will be able to send a request when someone votes for your server
If you don't know how to write such a webhook, read the pinned messages, there is a website created by one of the top.gg moderators that allows you to use Discord webhooks to send embeds
Remember that if you use that website, we won't help you with it here, you will have to write on their support server
Is there a Setuped Webhook I can try
Because I don't know What Webhook link Looks like
If you want to create a webhook yourself, the link to it will look like this: http://yourvpsip:port/dblwebhook
On https://webhook-topgg.com/ How am I Able To Customize one Not Just Picking on Types?
Simplifying top.gg webhooks for all users, allowing non-developers and developers to use webhooks for their bot and server without confusing configuration.
Join their official server. Webhook Topgg dot com is not an official Top.gg tool, it was made by a community member.
Is there a Top.gg Official Web Hook tool?
As I know, nope. But that one works very well.
The Top.gg API itself is the official tool, so be creative with it if you want.
we'll do you know Other Platform for It?
It's kinda going downhill, I haven't been maintaining it well :/
I really should throw it out and remake it.

AD jkkkk
Noo Please don't Its Cool
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
that makes your token is not worthy
Try regenerative new token
Is there Another Website for Webhook but not webhook-topgg?
Oh
Nope
There are probably a few bots that offer to receive votes through them
oh, Because The developer ain't Replying to me Since yesterday, They said I got Temp ban And I tried redoing it last 3 hrs and now, Sad
ahh, gotta love inconsistencies
Is there and endpoint to check if my server has been voted?? I only find endpoints for bots, but not for servers
Youll have to use websockets and save voter information in a database
We have no server api
So top.gg has a websocket server? where do i find information about that
sorry, webhook. I mistyped
I was writing a websocket for something else unrelated at the same time
Ok ty
Hello can anyone help me setting up a killfeed bot for rust console ?
I generated a fresh top.gg API token but when I use it for axios, it gives me 401 Unauthorized
I made another and still the same
ok nvm, using node-fetch solves this
Hi! I am trying to create a vote only command. My code can be found here, https://pastebin.com/F8z0cxDm. The bot always reply's with There was an error fetching votes. Please try again later. Any help would be amazing thanks!
with http headers being authorization & token right ?
I may be wrong, but I don't think you read the documentation fully. When a user votes for your bot, the value for voted is 1 which is a number. In your code you check whether the value is "1" which will always equal false because the digit will never be a string
There is a difference between =, == and === which you should read about because it may be useful to you in the future
Actually, you don't need all these equal signs because 1 means true and 0 means false, so this should work
if(data.voted) {
// user voted
}
if(!data.voted) {
// the user did not vote
}
Then let me know if it helped you because I'm going to sleep now and I won't get up until probably 9 hours later

What is the api to vote
I want to create a bot that will auto-vote for me every 12h
is it possible that top.gg could add an API endpoint for "has user left review" basically returns a list of user IDs that have reviewed a bot?
important to NOT give the rating they left. this could be open to abuse, e.g. "please leave a 5* review to unlock this command".
instead I would want to reward users for leaving a review, positive or negative is irrelevant.
this is different from encouraging ongoing voting, the reviews can be used for iterative improvement to a bot like how reviews are on app stores, but right now it's a hard task to get anyone to review.
It's impossible, the voting API simply does not exist
Oh, doesn't the website issue a api request when u click the vote button?
Yes, but I doubt anyone can send requests using this enpoint. Top.gg has probably thought about this situation and is protecting this endpoint
its possible to get reviews via api
its just an undocumented endpoint
but it returns top.gg userid not discord id
One message removed from a suspended account.
the new API version was never released
One message removed from a suspended account.
I tried it and even after I have voted it doesn't let me run the command and runs the code in if(!data.voted)
what exactly are you trying to do?
I fixed it. There was an quotation mark in the URL where there shouldn't be.
When looking at and trying the python docs of the api it just gives me an error
File "/home/runner/topgg-bull-shit/main.py", line 11, in <module>
bot.topgg = topgg.DBLClient(bot, dbl_token)
File "/home/runner/topgg-bull-shit/.pythonlibs/lib/python3.10/site-packages/topgg/client.py", line 98, in __init__
self.http = HTTPClient(token, loop=self.loop, session=kwargs.get("session"))
File "/home/runner/topgg-bull-shit/.pythonlibs/lib/python3.10/site-packages/topgg/http.py", line 84, in __init__
self.session = kwargs.get("session") or aiohttp.ClientSession(loop=self.loop)
File "/home/runner/topgg-bull-shit/.pythonlibs/lib/python3.10/site-packages/aiohttp/client.py", line 242, in __init__
loop = get_running_loop(loop)
File "/home/runner/topgg-bull-shit/.pythonlibs/lib/python3.10/site-packages/aiohttp/helpers.py", line 301, in get_running_loop
if not loop.is_running():
File "/home/runner/topgg-bull-shit/.pythonlibs/lib/python3.10/site-packages/discord/client.py", line 140, in __getattr__
raise AttributeError(msg)
AttributeError: loop attribute cannot be accessed in non-async contexts. Consider using either an asynchronous main function and passing it to asyncio.run or using asynchronous initialisation hooks such as Client.setup_hook```
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
How to use topgg api?
Just read documentation
If you have used any api before you should have no problem using this api
Anyone help me with setting up a RCE killfeed bot for my rust server, or point me in the right direction??
One message removed from a suspended account.
import discord
from discord.ext import commands
import topgg
bot = commands.Bot(command_prefix="!", intents=discord.Intents.default().all())
bot_token = ''
dbl_token = ''
@bot.event
async def on_ready():
print(f'Logged in as {bot.user.name} ({bot.user.id})')
print('------')
webhook_route = "/dblwebhook"
bot.topgg_webhook = topgg.WebhookManager(bot).dbl_webhook(webhook_route, dbl_token)
await bot.topgg_webhook.run(5000)
@bot.event
async def on_dbl_vote(data):
if data["type"] == "test":
return bot.dispatch("dbl_test", data)
print(f"Received a vote:\n{data}")
@bot.event
async def on_dbl_test(data):
print(f"Received a test vote:\n{data}")
bot.run(bot_token)
``` I was just messing around and taking a look at the API and I noticed that the events aren't triggered (the on_dbl_test) when i go onto the dashboard and do a testvote?
Do proper votes work? Or neither work?
I havent tried proper ones, but test votes dont work
Did you fill in the webhook url and auth?
webhook url replaces the webhook_route?
The route within your program needs to be a route.
The url on top.gg needs to be a url.
and what is the specified route
You're acting as the webhook host, so you set the route to any url route you want.
One message removed from a suspended account.
yes
Why i got undefined?
Amm, nope
do you need help with that ? its easy
Yea, i write u in DM
Is it possible to check how many times a user has voted for the bot
Thats something youll need to track in your own database.
is the API having issues? i often get error 504 https://ss.stefdp.is-a.dev/u/1aHc34tiVcjK.png (in the last week i saw it atleast once if not more every time i opened the console on different days)
The website has problems, so the API will not work either
Just handle and ignore 500 class errors, nothing you will ever be able to do anything about
how do you make it so commands are only usable if they vote for the bot?
Read pinned messages
bro its weird but sometimes it gives error
still updates
is there a way to opress the error?
hello, the server_count is not written in the data of my bot, and although it is certified, it says certificate false
API help!
What API I can use For https Result as Checking how many Votes My bot received on total or this month?
I need a slot games winner comment api
https://top.gg/api/bots/:bot_id and there is monthlyPoints field for the number of votes during this month or points field for the total number of votes
Or you can track this by yourself in your database if you are going to request this data quite often. It's up to you
So like Https Get and https://top.gg/api/bots/:bot_ID
and Get Result for MonthlyPoints??
Yep
Do i need to Like The Authorization Thing, Like "authorize":"BOT_TOKEN" something like that
Of course
hey
i have a wierd problem
seems like Topgg webhook is firing 4 responses
am I missing smth which have been changed ?
@mention me when replying
This is how I handle it on express:
app.post('/vote', webhook.listener(async (vote, req, res) => { //ending url
let value = vote.user;
console.log(`<@value> has voted for your bot`);
res.status(200).end();
}));
try not doing res.status.end(), the hook does it for you
not sure if that would be causing it but that top.gg repeats requests on failed webhooks and that might be it
i added it later on
when it started
but this didn't helped
80 no longer used?
80 is a standard http port, 443 for https.
You can use the standard ports too yeah.
Oks
(python) could there have been an error with autopost that stopped it from running? I can't check the console for errors anymore since it looks like it stopped on 2/6/24.
I replace your.server.ip with my bot id right?
Nope, its an Ip address, not a bot ID
Oh ok good thanks
What information can I get with the API other than the user ID?
I would like to show how many votes we have this month (discord.js)
You can see all available endpoints on https://docs.top.gg
Should the âSend Testâ button work on the webhook?
He tells me that he sent the message but nothing comes
what did you put here
need help with updating member count
how do i log onto my bot with api
and then update member count
http://ip.adress:3000/webhook
your server IP address
Yes
Ik
fake ip
192.23.23.1 or whatever
Have I done
I have it
did you try test vote?
In my code and in my Dashboard
Yes, he says he sent the message, but that doesnât work
Cool, the site is offline
Oh, here we go again
can anyone help?
hello?
Tell me, maybe I can help you?
when an user vote your bot it will liik like this
i need help logging onto my bot with api
like with python
i know this
{"authentication":token here
}
but idk where to put it
or what to do with it
Have you set some authentication token in the server's API?
Have you set some authentication token in the server's API?
ye
i have a token for my bot
i have it
i juist dont know what to put this in
put any thing
no
like how do i actually logon
if i just put this in my code it wont do anything
its not for votes
i want topgg to have how many servers use the bot
Just google "how to add authorization to post request python"
You will definitely find your answer
requests.post("https://top.gg/api/bots/:id/stats", data = {"server_count": len(self.guilds)}, headers = {"Authorization": os.environ["TOPGG_API_KEY"]})
chat gpt gave me this code
will it work
Find out
how about u do it
No, because I don't use python so this code is useless for me
js is dead
Ok
"
One message removed from a suspended account.
When doing the webhook (for my bot), do I have to insert the code into exactly this bot or can it also be added to my private bot?
I'm slowly starting to despair because this isn't working and I don't know why
webhooks can be received by any program that supports being an http server, however giving rewards on a second bot can break our guidelines depending on the implementation.
I just want a voter message but somehow it doesn't work
I use this
Yes
Did you fill in your IP in the url?
The public IP, not an internal IP.
or using a properly configured domain*
Yes
using http correct? not https
http://myip:3000/dblwebhook
Yes http
maybe hes using wrong port number for his server
is this on a local computer? or a vps/dedicated server paid for from a hosting company?
I also tried Send Test, it says it sent it but nothing was logged
I'm currently doing this in VSCode
Yeah, send test wont work either, both will fail until the configuration issue is figured out.
To run this locally you'll need to port forward your router.
Its not really reccomended, but not hard to do.
hey, localhost will not work
dont delete this
@glacial adder i got 2 ways to dblwebhook,
https://oliverbot.xyz/api/dblwebhook
and my ip one i cant show
so
I have the IP address on my hosting server and then :XXXXX is that the port number that I also have to use for the webhook?
might want get vps or a shared server and cuz they dont use localhost they used a ip or shared ip with a port number
I think they're just testing right now webster
probably
Ok, I'll try something
yeah, so http://yourhostip:3000/dblwebhook
as the url
then just make sure the app.listen(3000) line uses 3000 as well.
one question
sense i got https://oliverbot.xyz/api/dblwebhook do i need my port number or nah
http and https have an implicit port.
http is 80, https is 443.
You technically dont need the port on either a domain, or for IP based webhooks.
The reason we typically use a different port on IPs is because of configuration on the server side.
Yes, no, it remains unchanged
cuz i got it configed to http and https
My point was more, even if you dont list a port you're using one.
as long as it works, you dont need to explicitly list one
delete auth and show us screenshot on top.gg webhook on the site
ah
brb i just got home
The blue field is the ip
My Code:
const express = require("express");
const Topgg = require("@top-gg/sdk");
const app = express();
const webhook = new Topgg.Webhook("topggauth123");
app.post("/dblwebhook",
webhook.listener((vote) => {
console.log(vote.user);
})
);
app.listen(50001);```
are you still using vscode?
I switched to my hosting server (the IP address is from my hosting server)
hm
đ did you allow the port through the firewall?
It'll depend on your host, they should have support articles/docs/guides on it.
Oh, do I have to do that?
Oh ok ups
By default most hosts custom firewalls will block all non ssh ports.
I'm hosting on a friend's server who hosts himself, can you allow this somewhere without being an admin?
It would depend on the server/host configuration. We cant really answer that
Ok then I'll wait for my friend. But thank you very much for the help!
Worm thank you very much, it was due to the firewall now it works. Now I only have one more question (I hope I can still ask it here). You said if I use the private bot for this, rewards for voting against the guidelines can be. I would like to assign rolls from a certain number of votes. Is this against the guidelines?
It depends. If the roles are given in the support server of the main bot its okay.
The reason for the role is to prevent users from voting for a different application than the one they want rewards for.
For example, if the intention behind it is to get people to vote for your bot for rewards for a server unrelated to the bot they voted for its against the guideline.
Okay, well, thanks for the information!
One more thing, I don't fully understand this, how do I get the number of current votes for the month (like in the picture)?
Yes, I can't find anything about it there
I can only get the list of all voters or the votes that a user has
The find one bot returns the bot structure: https://docs.top.gg/api/bot/#bot-structure
just wait
One message removed from a suspended account.
who can help me plz ?
I want to make a python discord bot with a cog command that requires voting in top.gg.
i think that the web is down
ddos ?
he is very slow for me
but the web is not down
How can I get in touch with a developer about getting access to their bot on discord. Their bot is on topp and the name is .cryptogoku#0. I really want Bart bingo bot but it wonât let me get it and says to contact the developer but no way to get in touch with them. Thanks
yo guys,
wanna ask by which time zone this website decides thats its a weekend or not ?
You can try adding him as a friend on Discord since you know his username
But I doubt you can do anything about it, it looks like the bot is simply not developed anymore
How can I create my own Bot?
I would like information on how to do that function that gives access to specific commands for a time when the bot is voted and so on. how you do it? and if you could explain it to me thank you very much :D
Could someone advise me to be able to do my Bot well?
is there a way to send a notification on a channel when someone votes the server?
watch yt videos and use docs like discordjs guide
OK, thank you
You can use something like https://webhook-topgg.com/ to only send a message into a channel when someone has voted for your bot. This is not an official tool provided by Top.gg but provided by a volunteer of the staff team.
Simplifying top.gg webhooks for all users, allowing non-developers and developers to use webhooks for their bot and server without confusing configuration.
thank you so much ^^

it can be found on your bots edit page in the webhook section
TopGGAPIError: 404 Not Found
at Api._request (/root/bots/arena-support/node_modules/@top-gg/sdk/dist/structs/Api.js:61:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /root/bots/arena-support/server.js:24:29
at async /root/bots/arena-support/node_modules/@top-gg/sdk/dist/structs/Webhook.js:106:17 {
response: {
statusCode: 404,
headers: {
date: 'Mon, 19 Feb 2024 16:54:07 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '21',
connection: 'keep-alive',
'access-control-allow-origin': '*',
'access-control-allow-headers': 'Authorization',
etag: 'W/"15-bm7tJgu8FHlq5QU+Y6gDxOGPfRc"',
'set-cookie': [Array],
'cache-control': 'private',
'cf-cache-status': 'DYNAMIC',
'strict-transport-security': 'max-age=15552000; includeSubDomains; preload',
'x-content-type-options': 'nosniff',
server: 'cloudflare',
'cf-ray': '858007a39d1984fb-BOM',
'alt-svc': 'h3=":443"; ma=86400'
},
trailers: {},
opaque: null,
body: BodyReadable {
_events: [Object],
_readableState: [ReadableState],
_read: [Function: bound resume],
_maxListeners: undefined,
_eventsCount: 3,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(abort)]: [Function (anonymous)],
[Symbol(kConsume)]: [Object],
[Symbol(kBody)]: null,
[Symbol(kContentType)]: 'application/json; charset=utf-8',
[Symbol(kReading)]: false
},
context: undefined
}
}
anyone ??
That happens when topGG is down
did i do voting wrong?
const TOPGGAPI = new Topgg.Api(config.TopggToken)
TOPGGAPI.on('vote', (voter) => {
const VoteChannel = client.channels.cache.get("1207774395268079657")
if (VoteChannel) {
try {
const embed = new EmbedBuilder()
.setTitle("New Vote")
.setDescription(`Thank you, ${voter.username}, for voting! đ`)
.setColor("Green")
VoteChannel.send({ embeds: [embed]})
} catch (error) {
console.log(`Top.gg Vote Error: ${error}`)
}
}
})
DUDE
are you joking
@jaunty plank @silk idol @scarlet cobalt look at this
Official Top.gg Node SDK. Latest version: 3.1.6, last published: 5 months ago. Start using @top-gg/sdk in your project by running npm i @top-gg/sdk. There are 11 other projects in the npm registry using @top-gg/sdk.
fuck u
???
why are you being rude 
<Api>.on isn't a feature that works - you need to use webhooks and direct requests there
const express = require("express");
const { Webhook } = require("@top-gg/sdk");
const app = express();
const wh = new Webhook("webhookauth123");
app.post("/dblwebhook", wh.listener((vote) => {
// vote is your vote object e.g
console.log(vote.user); // => 321714991050784770
}));
app.listen(80);```
this is the example code - within `app.post("/dblwebhook", wh.listener((vote) => {` is where you would put code like that
looking at my code i use a package i made so i can't really give the code for that - don't wanna self promo or give code that may not necessarily work. i would look at https://docs.top.gg/libraries/javascript/#webhooks and follow the example code, and look at https://docs.top.gg/resources/webhooks/#bot-webhooks for what data is returned via vote webhooks - <vote>.username isn't returned so check what adjustments need to be made
Yeah I do not understand
Ah thanks bun i`ll fix it
do i need express?
For this package, yes
ok
s
@ashen veldt
@ashen veldt your http://yourserverip:port/dblwebhook
or /vote it doesn't matter?
It doesnât matter
alr
so i tried and doesn't return anything nor there are errors 
but bot turns on
I'm not getting the monthly and total votes
const voteCheckUrl = `https://top.gg/api/bots/${client.user.id}/check?userId=${userId}`;
const voteCheckResponse = await fetch(voteCheckUrl);
const voteCheckData = await voteCheckResponse.json();
const botInfoUrl = `https://top.gg/api/bots/${client.user.id}`;
const botInfoResponse = await fetch(botInfoUrl);
const botInfo = await botInfoResponse.json();
const embed = new EmbedBuilder()
.setTitle("Votes")
.setURL("https://top.gg/bot/1016392200516550736/vote")
.setDescription(`${VoteUser} voted for the bot mention`)
.addFields(
{ name: "Voted At", value: `${new Date().toLocaleString()}`, inline: true },
{ name: "Can vote again in", value: "12 Hrs", inline: true },
{ name: "Total Votes", value: `${TOPGG.totalVotes}`, inline: true },
{ name: "Current Streak", value: `${TOPGG.currentStreak}`, inline: true },
{ name: "Bot Total Votes", value: `${botInfo.points}`, inline: true },
{ name: "Bot Monthly Votes", value: `${botInfo.monthlyPoints}`, inline: true },
{ name: "User Voted", value: `${userVoted ? "Yes" : "No"}`, inline: true }
)
.setColor("#7289da")
.setTimestamp();
await channel.send({ embeds: [embed]});```
How do I register for this service?

Can anyone help me in this??
But it's so wrong. You are making 2 requests to API instead of using webhook for votes
I wouldn't be surprised if this second request simply exceeds the ratelimit
Helloz
Hello everyone
herro
am i the only one who has infinite loading in webhooks
umm what ?
Site is down
When will the site downgrade be resolved ?
never
topgg says i need to logon in. is this a problem? never had to for vites before
So the site is down? Because I can not log in or logout how long will it be down for
One message removed from a suspended account.
team is aware, there's the ETA
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
I can use a discord webhook right?
no top.gg doesnt communicate data in a way that discord webhooks understand






