#topgg-api

1 messages · Page 19 of 1

west dove
#

AttributeError: 'TCPConnector' object has no attribute '_conns' is what I get, topgg.DBLClient() is causing that

#

Oh or actually the base64 encode didn't work

#

from JWT yeah

cloud cypress
#

hi, just asking if its TOS to be giving users some sort of reward for every time they vote?

dapper copper
#

but people dont do anything for nothing in return lol

steep belfry
#

it can be that cuz topggpy is severely outdated (4y)

west dove
#

But yeah

#

That thing's outdated as hell

steep belfry
#

topggpy us very outdated

#

is

#

just setup a simple flask server

#

or aiohttp maybe fastapi

#

easy

woven coral
#

it hasn't been updated since November 2021

steep belfry
#

yeah

west dove
steep belfry
#

Its gonna break

west dove
#

learning linux a bit at the same time

steep belfry
#

obv

steep belfry
#

If you can do python u can do flask

woven coral
#

i have a rewrite of the top.gg python sdk but it's still not approved by veld to be published to pypi atm

woven coral
#

also some of the API's endpoints do not work rn

#

veld is hard at work and he has priorities

west dove
#

so the api token thing won't be fixed any time soon?

woven coral
dapper copper
#

he recently pushed a fix so that tokens actually show for new bots

#

that was a side effect

west dove
#

okay, when i came back home i check the site again

#

and theres some JWT out of nowhere 😭

steep belfry
woven coral
steep belfry
#

Then randomly that happened

west dove
steep belfry
#

yeah?

west dove
#

will give it a try then, thanks

fluid smelt
#

any ETA until the auth token is fixed? thanks!

frosty comet
#

Something wrong with my bot token (for top.gg) it says random serverID or something

steep belfry
#

Prolly

west dove
#

Yeah that's the issue since yesterday

frosty comet
#

that thing

winter quail
#

Hoe does ts works?

vestal wasp
#

hoe

#

it's a superset of JavaScript to add types, namespaces and enums (for better or worse)

steep belfry
#

There's a easier option btw

west dove
#

not yet

steep belfry
#

then just built a simple aiohttp server

west dove
#

well im just using aiohttp sessions

#

for logs

steep belfry
# west dove for logs
async def receive_votes():
    from aiohttp import web

    async def handle_vote(request):
        data = await request.json()
        user_id = data.get("user")

        character = get_character(str(user_id))

        if character:
            character.reward_gold(500)
            character.level_up(100)
            character.save_to_db(str(user_id))

            return web.json_response({"status": "success", "message": "Vote reward given!"})

        return web.json_response({"error": "User not found"}, status=404)

    app = web.Application()
    app.router.add_post("/receive-vote", handle_vote)

    runner = web.AppRunner(app)
    await runner.setup()
    site = web.TCPSite(runner, "0.0.0.0", (your port))
    await site.start()

Its pretty easy

west dove
#

😭 never used that from aiohttp before

steep belfry
#

then you can configure Hookdeck

#

to get the votes from topgg

steep belfry
west dove
#

Don't I need top.gg's API token for that

steep belfry
#

no

west dove
boreal monolith
#

@cunning dagger can you review my bot please?

abstract mothBOT
#

@boreal monolith

topgg When will my bot be reviewed?

Our current average review time is 1–2 weeks.

Some bots may take longer to review than others depending on their features. Because of this, we can't guarantee your bot will be reviewed as quickly as someone else's, and there's no exact timeframe for approval. There's also no way to check your position in the queue — but remember, you're not first or last!

You're free to edit your bot's page anytime, both before and after review. This won't affect your place in the queue.

You can read more about our review process here: How the Reviewing Process Works.

topgg_ico_bulb In the meantime, please make sure your bot follows all of our Bot Guidelines for a quick and smooth approval!

frosty comet
#

When will token glitch will be fixed?

jaunty plank
#

Has anyone tried encoding it themselves yet?

Just encode it as base64, see if it works, let us know if it does.

vital anvil
#

I will fix it today

#

This is a stupid bug from me

#

ugh

dapper copper
#

it's okay veld

#

you have literally worked yourself to the bone, we appreciate you

vital anvil
#

haha

#

its silly

#

the bug is

#

i write a sign a token

#

then return the token object rather than the written token

dapper copper
#

when did you write the code

#

I don't suppose it was during a hyperfocus insomnia session

vital anvil
#

adhd rapid bug fix session

dapper copper
#

yea, oh well, small bug easy fix

vital anvil
#

fixed!

#

@frosty comet

#

you can get your token now

frosty comet
#

Yayaya

#

Thanks bro

vital anvil
#

no problem

frosty comet
#

Also I used vote tracker bot it also Didn't worked it was glitch or something?

vital anvil
#

Not sure, we dont manage that bot :x

frosty comet
#

No i mean webhook thing..

#

Bot was working.. in other servers

west dove
vital anvil
#

we also make the bugs

west dove
#

Heard you're kinda busy but yet you found time to deal with it which is great

vital anvil
#

Ofcourse!

#

Generally i want top gg to be stable in all fronts

#

So we're making big changes to push it in that direction

viral radish
#

wrong server?

vivid star
#

what server do I go to

west dove
#

okay so apparently topggpy library is still working, even if last update was 4 years ago

#

I managed to work with voting stuff

dry mantle
eternal charm
#
import { Webhook } from "@top-gg/sdk";

const webhook = new Webhook(env.TOPGG_WEBHOOK_SECRET);

app.post("/vote", webhook.listener(async vote => {
  console.log(1);
}));

nothing is being logged in the console when i send a test upvote. TOPGG_WEBHOOK_SECRET logs fine and is set on the dashboard, as is the url. no middleware is present either

vestal wasp
#

is the url publicly accessible

eternal charm
#

it works fine when i send it myself via postman

#
app.post("/vote", (req, res) => {
  console.log(req.body);
  console.log(req.headers);

  res.sendStatus(200);
});

even without the library its not logging anything, i dont think top.gg is sending the request in the first place

#

but again sending via postman works fine

#

oh weird, it works when i vote normally but not when i send the test vote.. the "test" button must be broken

vestal wasp
eternal charm
vestal wasp
#

ah ok

eternal charm
#

i figured out that the test button is just broken

#

idk how to report that to a dev but yea

vestal wasp
#

@vital anvil

#

ez reported

eternal charm
#

ez

#

idk in other servers you get kicked for pinging ppl

vestal wasp
#

(it doesn't work for me either fyi)

#

never used the test button so yeh

vital anvil
#

can look at it soon

eternal charm
#

thx love u

placid heart
#
import { Api } from "@top-gg/sdk";
        const top = new Api(process.env.TOP_TOKEN)
        const hasVoted = await top.hasVoted(ctx.message.author.id)
        if(!hasVoted) return ctx.error("You must vote for us to use this command, [click here](link is here but automod blocking)");
TopGGAPIError: 404 Not Found

someone can help?

placid heart
#

nvm, fixed

eternal crater
meager ivy
#

hmm does the "send test" button in the webhook section of the bot edit page is working?

meager ivy
#

i have clicked this many time but it doesn't send anything

placid heart
meager ivy
eternal crater
#

could be something wrong with your code or wrong address (where top.gg will send the POST request) of yours

eternal crater
meager ivy
#

idk how to report that to topgg dev

eternal crater
#

or just let it here as the team gon check this channel from time to time anyway

#

idk joyshrug

steep belfry
eternal charm
steep belfry
#

or that

fluid smelt
#

for some reason the GET bots/:bot_id/votes endpoint is not returning any votes even though I know for a fact I have recent votes, all other endpoints work no problem

jaunty plank
topaz skiff
#

So do you set up the code based on the example in the documentation in your bot's python script?

wanton wolf
#

i know nothing about this library so idk why my script freezed

hollow bison
wanton wolf
wanton wolf
#

I think there was an error in return that was immediately caught by the library(topgg) and did not return either the error or the result and because of this the script freezed

#

i hope if i get help

mighty shuttle
#

iirc the /bots/{id}/votes route is currently broken, and returns an empty array

wanton wolf
#

it means that now impossible get votes?

mighty shuttle
#

The best way to handle them is through a webhook, so when you receive the vote you can store them on your end.

wanton wolf
#

okay

mighty shuttle
#

You can also fetch the user's specific data /bots/{bot}/votes?userId={user_id}, which will give you a response to check if they have voted.

runic creek
mighty shuttle
severe jacinth
gilded pelican
#

Y'all something wrong?

#

Been getting a lot of 500 status

quasi gate
#

/bots/{bot}/check?userId={user_id} dont work?

primal arch
#

help me

Do u know how I can use the api so my bot can detect who voted?

primal arch
primal arch
#

Bruh how long does it take to type?

#

U were saying something?

quasi gate
#

do you want to make a checkvote command?

primal arch
quasi gate
#

yes

#

you can use axios

primal arch
#

Cause I’m confused idk how to put a code in my bot that will help it to detect that

primal arch
quasi gate
#

wait

primal arch
#

I use chatgpt to code lol

quasi gate
#

const topggToken = 'zzzz';
const botId = 'zzz';
const userId = message.author.id;

    try {
        const response = await axios.get(`https://top.gg/api/bots/${botId}/check`, {
            params: { userId },
            headers: { Authorization: topggToken },
        });
#

and embeds

primal arch
#

Ooh

#

I see

quasi gate
#

if (response.data.voted === 1) = vote

else no vote

primal arch
#

So just I have to replace the bot I’d and the token in the web hooks page of top,gg right?

quasi gate
#

yes

primal arch
quasi gate
#

yes

primal arch
#

Bruh

#

Why is it deleting

quasi gate
#

idk

primal arch
#

Ok so thanks

quasi gate
#

example
const topggToken = 'zzzz';
const botId = 'zzz';
const userId = message.author.id;

    try {
        const response = await axios.get(https://top.gg/api/bots/${botId}/check, {
            params: { userId },
            headers: { Authorization: topggToken },
        });

if (response.data.voted === 1) {
const embed = new EmbedBuilder()
.setColor('#0099ff')
.setTitle('thx to vote :)')
.setDescription('¡i suck ur dick!')
const voteMessage = await message.channel.send({ embeds: [embed], components: [row] });

primal arch
#

const topggToken = 'zzzz';
const botId = 'zzz';
const userId = message.author.id;

    try {
        const response = await axios.get(`https://top.gg/api/bots/${botId}/check`, {
            params: { userId },
            headers: { Authorization: topggToken },
        });

if (response.data.voted === 1) = vote

else no vote

primal arch
#

So if someone votes the bot will dm them to suck their dick right?

topaz skiff
icy laurel
primal arch
#

** give me a simple python bot script that I can use so if someone votes for my bot they get a dm saying hello thanks for voting, I will modify it later to my needs but rn I completely don’t understand how I will code this so just do that please a simple script that uses my top.gg token and bot I’d. And detects whoever votes for it and the bot dms the person**

steep belfry
#

....

#

ChatGPT warrior

icy laurel
#

@quasi gate

topaz skiff
# severe jacinth oh!

Yes, could you please help me with an answer? I would be happy to reach out to you in DM, if you prefer that. Thanks.

quasi gate
quasi gate
severe jacinth
icy laurel
#

I think so, I dont understand poruguese

icy laurel
primal arch
#

Plz

jaunty plank
#

There isn't enough information in your request, what programming language do you know? What bot library do you know?

topaz skiff
alpine horizon
#

Hello 👋
Is there a way to fetch the bot's global rating with the api?

dapper copper
#

it's average_review_score I believe

#

or avg, I can't recall right now

alpine horizon
primal arch
#

Any help?

#

Is the api down or smth?

viral radish
# primal arch Any help?

how are we able to help you out when you don't give us any clues on how you're using the API? :^)

primal arch
#

Would that help?

viral radish
vocal gulch
#

Hi Everyone, is there a way to generate a test token for a dev bot??
I want to use it in Rust using autoposter

primal arch
placid heart
#

How can I check the number of votes for my bot using API?

placid heart
#

?

primal arch
placid heart
#

Np

placid heart
#

points = total votes
monthlyPoints = monthly votes
?

woven coral
#

yes

placid heart
#

tysm

placid heart
# woven coral yes
  const res = await fetch(`https://top.gg/api/bots/${client.user.id}/stats`, {
    headers: {
      Authorization: process.env.TOP_TOKEN
    }
  });
  const data = await res.json()
{ server_count: 4, shards: [], shard_count: null }

hm?

#

nvm,

#

xd

primal arch
# primal arch

@woven coral please help me I don’t know what’s wrong but it’s giving me an error trying to fetch the api

dapper orbit
primal arch
dapper orbit
placid heart
primal arch
#

😭

dapper orbit
#

Yes, i think you spam to much)

primal arch
#

I’m just a normal user trying to get help here

#

Plz

#

I’m very troubled

placid heart
#

which error do you have, give code

primal arch
primal arch
placid heart
primal arch
#

I’m just tryna make a bot that gives rewards for voting

primal arch
#

I’ll take it

#

Just that it should work

dapper orbit
#

use ChatGPT

placid heart
primal arch
primal arch
#

I don’t care

placid heart
primal arch
#

I’m a dev too yk

placid heart
#

which command or something

primal arch
#

Like !checkvote cmd

#

Like that

placid heart
#

try this endpoint

#

which returns

{
"voted": 1
}
quasi gate
#

ik

#

i fix it

pearl frost
#

V1 when

steady dawn
#

Airners the best platform for earning

fossil maple
#

Is there somewhere I can see the webhook info when someone votes for my bot (the post body)? The webhook tester works but It doesnt show me the info so I dont know how to extract the user from it.

I can call webhook I am using with an API tester so I dont know which parameters to pass in to make it work.

Something like body.user?

fossil maple
jaunty plank
#

That is the json structure

#

ie
{
"user" : snowflake,
"bot": snowflake,
...
}

fossil maple
#

And that is all that is in the body?

empty gazelle
fossil maple
#

I set up the webhook for votes. When I test it, it says it works but nothing goes to the channel Inset up to log the votes. If I trigger the bot webhook with an API tester it works.

How do I know for certain the vote POST actually went off? Is there a log somewhere?

empty gazelle
fossil maple
#

No, it's a botghost webhook.

empty gazelle
#

not sure how to help you with that one 👀 that may be a question for botghost support

fossil maple
empty gazelle
#

I see, thats not possible unfortunately

jaunty plank
#

Yeah, we dont have that log.
We know webhooks are sent though, last I heard no votes were missed for awhile.

fossil maple
#

Do the vote POSTs work with IFTTT webhooks?

jaunty plank
#

I havent used IFTTT in so long, but I'd assume so

slender eagle
#

Hello, just wondering how do I get a top.gg token because I want stats for my bot sent to top.gg, like server amount sent to top.gg, any ideas?

jaunty plank
slender eagle
deft hollow
#

How to Get Top gg api?

tulip pulsar
vestal wasp
#

wdym

tulip pulsar
vestal wasp
#

what does "get api" even mean

tulip pulsar
tulip pulsar
#

Hello can anyone help me to make a event like when a user vote for my bot it send in a specifyed channel like

Vote count 2```
like this any api? to find it
Or like a api to get recent vote info
wanton wolf
#

this function wont work for me i think

wanton wolf
#

like 3 days ago but when i press 'send test' it returns status code 204

jaunty plank
#

Topgg webhooks are not discord webhooks

#

You need to use your own webhook url and auth

wanton wolf
#

so i need create my own website?

#

i seem to understand how it works, are there any ways then for it to send a request to my bot? I don't know much about APIs

snow bloom
mossy hill
#

Error code 500 when posting stats?

sleek flare
#

Getting error 405 when checking individual votes 😭

#

Been doing this since god knows when, surely this isn't a fault on my side?

async with self.bot.web_session.post(
    url="https://top.gg/api/bots/1094999557110251570/check",
    headers={"Authorization": token},
    params={"userId": ctx.author.id},
) as resp:
  ...
runic creek
runic creek
sleek flare
slender eagle
#

Just wondering how do I setup the webhook URL system?

#

Do I need to do it through a bot?

#

or what do I need to do it though?

snow bloom
slender eagle
#

okay so like a discord server?

#

or a bot?

#

I'm trying to figure this out

#

LOL

snow bloom
slender eagle
#

okay now how does that work...

snow bloom
#

You have the have a listening event somewhere for it that's open to http requests. The top.gg api sends a webhook to that open http and then from there whatever you are receiving on should process what you do next with it

slender eagle
#

intresting

#

okay so the way I want it setup is for server count and vote notis

snow bloom
#

You would have to have a open facing http listener

#

So it depends. What are you hosting your stuff on?

slender eagle
snow bloom
slender eagle
#

I actually have to check that

snow bloom
#

If it does just make an endpoint for the webhook to be sent to

slender eagle
snow bloom
#

The only way to get it to work is too have an endpoint to receive it on

slender eagle
#

okay, I'm waiting for a reply from someone in the support server for discloud

#

btw const webhook = new Topgg.Webhook("your webhook auth") is the webhook token or the webhook url? I think it is the webhook token lol I am not sure

slender eagle
runic creek
#

It can be anything, a password or a randomly generated token. The important thing is that it is the same as what you entered on top.gg

#

This is a safeguard to prevent someone from "accidentally" spamming your webhook. All requests that do not match will be ignored

wanton wolf
#

It seems to me that this is the worst library that I saw, there is not a single working function

snow bloom
#

@gritty bobcat what error codes are you getting?

gritty bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

snow bloom
gritty bobcat
#

One message removed from a suspended account.

snow bloom
#

Does your postman declare the bot_id variable?

gritty bobcat
#

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.

snow bloom
#

What is your native coding language?

gritty bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

snow bloom
#

That's odd. How are you formatting curl? I am completely inexperienced with postman

gritty bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

snow bloom
#

1 sec testing a curl statement out

snow bloom
gritty bobcat
#

One message removed from a suspended account.

snow bloom
#

Heres a powershell curl command

Replace ID with your bot id
Token- with ur auth token make sure the quotes stay around the token
and replace the server count number, since it is an integer it doesnt need quotes.

Then let me know if the response is a 200 or 500

jaunty plank
gritty bobcat
#

One message removed from a suspended account.

snow bloom
#

perfect 🙂

gritty bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

gritty bobcat
gritty bobcat
snow bloom
#

Anytime, I am here to help

jaunty plank
#

I'll see if I can make a PR on the docs.

Third time I've seen people use forms for it.

I just wish we gave proper errors notlikenoot

gritty bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

jaunty plank
#

One day!

snow bloom
#

True, I dont think I've ever used forms tbh

tulip mist
#

Is there is any request that tells me if the user voted or not? or should i use webhooks

runic creek
#

Webhooks are preferred

snow bloom
#

Webhooks are nice because all you have to do is be listening rather than sending request after request

tulip mist
rain heart
#

ratelimit

snow bloom
tulip mist
vital anvil
#

nvm im dumb

snow bloom
heavy birch
#

Why can't I get a token?

inland nimbus
#

Hello , which url should i write here?

#

I am doing when someone vote i got in specific channel with voter info as a log .Also do i have to install @topgg-SDK package?

calm moon
#

how to get your webhook

runic creek
runic creek
inland nimbus
runic creek
#

It can be http://ip:port/votes but it can also be http(s)://yourdomain/votes

#

How you do it is up to you

inland nimbus
#

Also do the test button works well

runic creek
#

You mean the npm one?

inland nimbus
runic creek
#

This package can create webhook for you and makes it easy to use the API

#

You can still make a webhook without it, but that decision is up to you

inland nimbus
runic creek
#

It should work but top.gg has been having some issues lately

#

So I'm not sure

inland nimbus
woven coral
#

is bannerUrl gone from the API?

#

because it's not in the repo and a quick bot search gave me a bot object that doesn't have bannerUrl

frail arrow
#

I need help

#

How can i make vote : true/false

#

Checks for user if they hsve voted or not

#

If they havent voted an embed appears tells to vote

#

After they vote the command executes

#

(Js)

errant stratus
frail arrow
#

Nvm i made it

woven coral
vital anvil
#

not sure, i haven't removed it iirc

woven coral
#

do you have plans on removing it?

#

or deprecating it in some way

#

because if so, i'll add it to my spreadsheet

mighty shuttle
#

@woven coral Does the api even provide that , dont think it ever has?

rain heart
#

God, bannerUrl is stone age top.gg

#

Was probably even before the redesign

#

It was when the bots were listed as cards

woven coral
#

i saw i have it in my sdks lol

#

but it's not in the documentation

mighty shuttle
#

Ah, been gone a while

pastel zephyr
tranquil steppe
#

Do we have an eta for the refresh data being fixed? I know it's a known issue, I'm just curious

runic creek
#

Not really

#

There is no ETA on any of the current issues

main dock
#

@tranquil steppe @tranquil steppe

#

@frail arrow

frail arrow
solar rover
#

@frail arrow

woven coral
#

veld if you're reading this, feel free to tell me if i should do otherwise

woven coral
#

@scarlet cobalt what do you think?

scarlet cobalt
untold sparrow
untold sparrow
# woven coral have fun with easter!

Thank you! Don't know if you celebrate, if you do happy Easter and if you don't I hope you've had a good weekend poggythumbsup I don't see any issues w/ you continuing work on the package blob_nod Just make sure the code is well documented and or easy to understand and send a PR bigsmile

#

Must admit I'm not up to date on API coverage on most of our libraries save for js and py. We missing features?

woven coral
#

i am currently working on updating the other sdks as well

#

except php, i don't understand php

untold sparrow
#

Solid simonsalute Appreciate it

untold sparrow
woven coral
#

so far most things have been updated, except for maybe the new review object

#

and most libraries sadly still has not been tested

#

some of them do compile yes, but that's about it

untold sparrow
#

Tested or reviewed?

#

Ah

#

Need any help in that regard?

woven coral
#

sure if you're free!

untold sparrow
#

They call me unit test Jesus (they don't)

woven coral
#

i appreciate your offer! kittyLove

spring lake
#

i have found an error on the Edit site when i try to test send a webhook for votes isnt working but when i make a real vote its working and the data can be pushed to my bot webhook server

frail arrow
main dock
#

Radhe radhe 🙏🏻

opal solar
#

Is it normal that requests to the /stats route time out?

bold jetty
#

why has the /users endpoint been removed from api?

#

i literally cannot use it as it throws this, I think you guys should rewrite the package according to the api.

bold jetty
#

oh well

#

that's more or less unfortunate

#

no other way to get user info?

jaunty plank
#

It was deprecated, iirc it wasnt really used

#

the info was all very very outdated on it anyway

vital anvil
sudden bronze
#

are there any known issues with the /stats post endpoint? I've been getting a 500 error for the past few days

bold jetty
#

I was only gonna use it for avatar hash of the voter

quiet trench
#

So I'm trying to add a discord bot but when I put in the application ID it says it can't find it.

#

I have triple and quadruple checked, that ID is definitely correct.

quiet trench
#

Also possibly related question, how are bots that are only user-installable (not guild-installable) handled?

#

Would I just provide a user count as the server count? That seems like it'd be rather unfair though, much easier to get more users than it is to get more servers.

dapper copper
radiant pasture
slender eagle
#

Hello, just wondering how can I get my bot stats to show up? I am trying to get it setup and I am having a hard time doing so

quiet trench
radiant pasture
#

but the server count yeah you can ask here poggythumbsup

#

-servercount

abstract mothBOT
sudden bronze
#

I've been getting a 500 error posting server/shard count for a few days now, any specific reason for that?

quiet trench
#

If the bot needs to be guild installable in order to get approved then it would be nice to know that before the review is declined to avoid waiting 1-2 weeks for a review twice. Especially since there would be some design tweaks needed to properly handle guild installs.

quiet trench
radiant pasture
radiant pasture
woven coral
#

uh where's the search query parameter?

#

i was checking my sdks and then i realized that the docs doesn't even have the core search feature documented?

#

it's still there right?

#

@untold sparrow what do you think?

radiant pasture
#

hello bot devs, is your server count updating via the api?

onyx swift
#

Hi, yes it does

woven coral
#

oh is it recently fixed?

radiant pasture
#

no idea tbh

woven coral
#

oh

#

a bit odd question to ask lol

radiant pasture
#

asking from #support just wanted to know lol

woven coral
reef kernel
#

-help

#

-botinfo

#

-botinfo Lumora#2965

woven coral
untold sparrow
short sail
#

-botinfo Musical#7063

restive otter
#

-botinfo

#

-botinfo Zyntra Bot

rain heart
#

bruh

abstract mothBOT
#

@restive otter

Please use commands in #commands!

true falcon
#

-botinfo

#

-help

#

-userinfo

#

-botinfo 1362443670007185580

rain heart
#

Bruhhh

abstract mothBOT
#

@true falcon

Please use commands in #commands!

true falcon
#

sory

iron cosmos
#

Guys I had the script that posts my discord bot stats on topgg and everything worked perfectly but one day I don't know what changed the bot says posted stats on topgg but it doesn't

#

My bot stacked on 12k servers

restive otter
iron cosmos
#

It's 16k basically that's why I'm asking

vestal wasp
unkempt jacinth
#

the topgg autoposter doesnt post my full server count on topgg since I added sharding to my bot
any way to fix this?

vestal wasp
#

broadcast eval

unkempt jacinth
#

const results = await client.shard.broadcastEval(c => c.guilds.cache.size);

#

this is the correct usage

#

of the broadcastEval

#

right?

vestal wasp
#

you have to reduce it too

#

that will just return an array of numbers

unkempt jacinth
vestal wasp
#

like [12, 32, 54, 45]

unkempt jacinth
#

Ah

vestal wasp
#

.reduce((acc, cur) => acc + cur, 0)

unkempt jacinth
#

Alright, ill implement that hopefully it works

unkempt jacinth
#

/**
 * Initialize Top.gg stats autoposter (sharding-aware)
 * @param {string} topggApiToken - The Top.gg API token
 * @param {Client} client - The Discord.js client instance
 * @returns {void}
 */
async function initializeAutopost(topggApiToken, client) {

    if (client.shard && client.shard.ids[0] !== 0) return;

    async function getTotalServerCount() {
        if (client.shard) {
            const results = await client.shard.broadcastEval(c => c.guilds.cache.size);
            return results.reduce((acc, count) => acc + count, 0);
        } else {
            return client.guilds.cache.size;
        }
    }

    const ap = AutoPoster(topggApiToken, client, { postInterval: 1800000 }); // 30 min

    ap.on('autopost', async () => {
        const totalServerCount = await getTotalServerCount();
        ap._poster._post({ serverCount: totalServerCount });
    });

    ap.on('posted', (stats) => {
        console.log(`✅ Posted stats to Top.gg | ${stats.serverCount} servers`);
    });

    ap.on('error', (error) => {
        console.error('Error posting stats to Top.gg:', error);
    });
}

module.exports = { initializeAutopost };```
#

this is my full code

#

i have no idea what im doing wrong lol

vestal wasp
#

console.log is your best friend

#

also why even bother using a library for literally a single http request

unkempt jacinth
#

I tried debugging

#

but

#

the log

#

didnt even show up

#

in my console

vestal wasp
#

is initializeAutopost called, try calling getTotalServerCount outside of autoposter

#

maybe remove autoposter entierly and just use fetch

unkempt jacinth
#

do you know what the endpoint is

#

by any chance

vestal wasp
unkempt jacinth
#

I managed to fix it

#

thanks :)

woven coral
neon basin
#

$ yarn

#

-help

abstract mothBOT
#
Bot Commands

Commands for Your Role:
avatar
botinfo
help
ping
roleinfo
serverinfo
userinfo

neon basin
#

-botinfo

abstract mothBOT
#

downvote You need to provide a bot to find

neon basin
#

-botinfo 1362995466077208588

abstract mothBOT
#

"Aranyani – The mystical forest spirit of your server! Calm, wise, and ready to help with fun, chat & moderation."

ID

1362995466077208588

Username

Aranyani

Prefix

!

Server Count

0 servers

Monthly Votes

0 monthly votes

Total Votes

0 total votes

Tags

admin, automod, autorole, autoroles, free, gaming-community, level-up, level-up-system, moderation, reaction-roles, small-server, welcomefarewell-messages

Owners

@neon basin

restive otter
#

Hi guys, is there any daily quota limit for the APi? I'm trying to make a bot that can search glboal bots and in guild

mighty shuttle
restive otter
#

Ah okay

abstract mothBOT
untold sparrow
# woven coral what about now?

Going fine dining / drinking with uni friends so today is not possible. Could perhaps look into it tomorrow depending on how the day looks

woven coral
#

alright!

#

@jaunty plank wbu?

jaunty plank
#

Search on the api has been broken for years iirc.

woven coral
#

is it deprecated or not

jaunty plank
#

I think the docs for it should be removed until it's fixed.

woven coral
#

because i was concerned when its not mentioned anywhere in the docs

#

maintaining 9 sdks at once is plump_pain so i need to make sure

jaunty plank
#

Is this on the main docs site? Or an sdk

woven coral
jaunty plank
#

Sadly I don't think updates are working for that right now.

I'll make sure to note it down for the next meeting, or @dapper copper if you get a chance.

#

I debugged updating the docs like a year ago, but the fix wasn't handled on the team side I guess.

woven coral
#

😭

woven coral
jaunty plank
#

That the docs are wrong? Probably not.

woven coral
#

no

#

the search feature

#

in GET /bots

jaunty plank
#

Search works for users, just not for devs.

dapper copper
#

I'll look into the docs issue

woven coral
#

for users?

dapper copper
#

but we may very well just rewrite docs as a whole tbh

woven coral
#

yeeeesss make it like topstats

jaunty plank
#

I can find my notes on it @dapper copper

Its a two second fix on the teams side

#

Literally just an outdated setting

dapper copper
woven coral
dapper copper
#

wouldnt be too hard to do either

#

I'd also talk to Lua since they are pretty decent with documentation and styling

woven coral
#

yeah

jaunty plank
woven coral
#

lua is truly the goat

woven coral
#

so the purpose of the GET /bots endpoint is just to merely retrieve top bots based on a specific sorting criteria now

#

i mean if it's deprecated i have no problem removing it from every sdk i've been working on

dapper copper
#

afaik search hasnt worked for ages tho, as woo said

woven coral
#

do they plan on fixing it or deprecating it

dapper copper
#

No idea, we'll let you know when we know more

woven coral
#

alright, please do

#

i am aware the team has priorities ayaka_pray

#

since they have huge plans ahead for this year

#

but don't forget to not leave the devs behind lol

iron cosmos
#

Guys did the api changed cause my bot stopped posting stats like it used to

tiny rose
#

Does anyone know how to check if the person is logged in to top.gg, if they have never logged in it will say "No" and if they have already logged in it will say "Yes". That's it.

rain heart
#

nope doesnt exist

tiny rose
#

okay

fading furnace
#

hi

fading furnace
#

guys

rain heart
#

lmao hidden from likely spammer

hushed steppe
#

@abstract moth

ionic fox
#

hey! I found a mistake in the API. How can I contribute and make a change?

gritty bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

runic creek
iron cosmos
#

guys how to post bot stats if our bot is over 16k servers

#

my bot stoped posting from 13k

runic creek
#

There are bots that have many more servers and post statistics without any problems

sullen summit
#

@iron cosmos hey if u show me ur code i wont mind helping u out 👍

#

oh wait top gg has their own api? nvm sorry i thought u were referring to discord api im sorry @iron cosmos

tepid pendant
#

It would be good if the API also returned the timestamp of when a user voted.

  • The /bots/* route has a rate limit of 60 requests per minute. So I can't use it for large bots manish_broken_inside

  • Sometimes webhooks are missed randomly — some users report that the bot still asks them to vote even after they’ve already voted.

woven coral
#

if webhooks are randomly missed then maybe it's a problem from the servers' side?

#

like POST /bots/stats is not working rn

tepid pendant
buoyant siren
#

im using botghost (non-coding bot builder) and after test requesting individual user vote API, it send me this response

sullen summit
buoyant siren
#

Hello, I just have a question regarding your bot's voting system.
Is it possible to get or find out the last voter who voted for the bot?
We are developing a feature that relies on this behavior, and it would be really useful to know the most recent voter.

buoyant siren
#

i mean is there api to get last voted user info like ID

#

last voted user API

woven coral
#

if /bots/votes doesn't work but /bots/BOT_ID/votes does (by this i mean it gives a 200), is it a part of the bug that caused the endpoint to not work? (as in it's still listed in #support pins)

#

i've updated several of my sdks to destruct token information to retrieve the bot ID again because of this

#

i was planning to create a pull request to the Node.js SDK to fix this but i paused at the last minute to see whether this issue is intentional or not

noble inlet
#

Hello

waxen needle
#

why am i receiving multiple vote post requests for a same user

runic creek
#

Generally top.gg repeats webhooks when you either don't respond with status 200/ the webhook receives a 5xx response or when the request timeouts (you have 5 seconds to respond before the request is considered timeouted)

buoyant siren
#

why there is no response

woven coral
eternal charm
#

is anyone else experiencing issues with intermittent webhooks?

crisp imp
#

Is there any ways to get the votes of a server?

viral radish
crisp imp
#

Okay

high tapir
#

Hey, I use the TopggAPI with Javascript and get the following error with the code await api.getVotes(): TopGGAPIError: 400 Bad Request.

Implements:

const api = new Topgg.Api(“TOKEN”);```

Dependencies:
NodeJS 22.16.0
NPM 10.9.2
Disocrd.JS 14.14.1
TopggAPI 3.1.6

Can anyone help me with this?

runic creek
#

It's probably because the library hasn't been updated for a long time and the endpoint used by the .getVotes() function simply doesn't work as null noticed in this message - #topgg-api message

#

Unfortunately, this "working" endpoint does not work completely because in theory it works but returns nothing afaik

arctic crescent
#

is it possible to make a command like /votes and see how many times you voted for the bot

still cradle
#

i need help

#

im trying to check if a user has voted for my bot

runic creek
polar laurel
#
class ScamBot(commands.AutoShardedBot):
    def __init__(self):
        intents = discord.Intents.default()
        intents.message_content = True
        intents.members = True
        super().__init__(command_prefix="/", intents=intents, shard_count=2)
        print("[DEBUG] ScamBot initialized")

        self.topgg_token = os.getenv("TOP_GG_TOKEN", "").strip()
        self.ready_for_stats = asyncio.Event()

    async def setup_hook(self):
        self.update_topgg_stats.start()
        print("[DEBUG] setup_hook running")



    @tasks.loop(minutes=30)
    async def update_topgg_stats(self):
        await self.ready_for_stats.wait()

        url = f"https://top.gg/api/bots/{self.user.id}/stats"
        headers = {
            "Authorization": self.topgg_token,
            "Content-Type": "application/json"
        }
        try:
            shard_counts = [len([g for g in self.guilds if g.shard_id == i]) for i in range(self.shard_count)]
            data = {
                "server_count": sum(shard_counts),
                "shard_count": self.shard_count,
                "shards": shard_counts
            }
            async with aiohttp.ClientSession() as session:
                async with session.post(url, headers=headers, json=data) as resp:
                    if resp.status == 200:
                        print(f"[TOP.GG] Posted server count: {data['server_count']}")
                    else:
                        error = await resp.text()
                        print(f"[TOP.GG ERROR] Status {resp.status}: {error}")
        except Exception as e:
            print(f"[TOP.GG EXCEPTION] {e}")```
#

Any help please!

#

Figured it out

#

Nvm

vestal wasp
#

"scam bot"

polar laurel
#

Im having issues with it running @on_ready for some reason. Idk why but it eventually does

#

It ran eventually so idc

#

Now my page isent showing the data...

vestal wasp
#

the page is cached iirc

polar laurel
#

I refreshed the data

#

And my page dosent even show it

#

This is a site thing so ima move this to support

dreamy tartan
#

How can I get my top.gg API Token?

vestal wasp
#

bot settings webhook

dreamy tartan
#

Got it, ty!!

vestal wasp
wanton wolf
#

Is it possible to know what place my bot is in on the leaderboard by votes?

vestal wasp
wanton wolf
#

thanks

polar laurel
#

still waiting

urban elk
#

hi! where can i find the topgg master branch that compatible with py-cord ?

polar laurel
#

Im sorry ima sound like a jeark here. What the hell did i screw up. Someone please tell me

sharp flame
vestal wasp
#

you need to use an API token

sharp flame
vestal wasp
#

yeh

sharp flame
#

Like that ?

vestal wasp
#

try and see

#

although I personally recommend using webhooks and storing the voted state yourself

sharp flame
#

It doesn't show me anything, there have been recent API changes.

jaunty plank
#

👀 thats an undocumented api endpoint

vestal wasp
#

isn't it the same endpoint as for updating stats

#

just as a get instead of post

sharp flame
#

What do you mean? Because before it worked, I went through that to check.

vestal wasp
#

idk what your issue is, it works just fine

#

the unauthorized error is intented

sharp flame
#

This is what my code does

#

Well, I have a person using my bot who wants to vote but I have a 404 error.

vestal wasp
#

a 404 is returned when they've never voted

#

I don't like that they did it like that but yes

polar laurel
#

Bot says the stats are submitted. Page says otherwise.

class ScamBot(commands.AutoShardedBot):
    def __init__(self):
        intents = discord.Intents.default()
        intents.message_content = True
        intents.members = True
        super().__init__(command_prefix="/", intents=intents, shard_count=2)
        print("[DEBUG] ScamBot initialized")

        self.topgg_token = os.getenv("TOP_GG_TOKEN", "").strip()
        self.ready_for_stats = asyncio.Event()

    async def setup_hook(self):
        self.update_topgg_stats.start()
        print("[DEBUG] setup_hook running")



    @tasks.loop(minutes=30)
    async def update_topgg_stats(self):
        await self.ready_for_stats.wait()

        url = f"https://top.gg/api/bots/{self.user.id}/stats"
        headers = {
            "Authorization": self.topgg_token,
            "Content-Type": "application/json"
        }
        try:
            shard_counts = [len([g for g in self.guilds if g.shard_id == i]) for i in range(self.shard_count)]
            data = {
                "server_count": sum(shard_counts),
                "shard_count": self.shard_count,
                "shards": shard_counts
            }
            async with aiohttp.ClientSession() as session:
                async with session.post(url, headers=headers, json=data) as resp:
                    if resp.status == 200:
                        print(f"[TOP.GG] Posted server count: {data['server_count']}")
                    else:
                        error = await resp.text()
                        print(f"[TOP.GG ERROR] Status {resp.status}: {error}")
        except Exception as e:
            print(f"[TOP.GG EXCEPTION] {e}")```

Reutrns 190 submitted. But does not show on site. Ive reloaded and cleared cache no luck
This is the only other part
```py
async def on_ready():
    print("[DEBUG] on_ready triggered")
    if hasattr(bot, "ready_for_stats"):
        print("[DEBUG] Setting ready_for_stats event")
        bot.ready_for_stats.set()```
The bot reports it has submitted the data to top.gg every time i check my page i dont see any of the stats. Ive reloaded data and checked after a few hours. Help
runic creek
#

Maybe try without shards, never seen someone using it tbh

polar laurel
runic creek
#

Unfortunately the API is very buggy and I wouldn't be surprised if the API simply didn't return most of the errors

polar laurel
#

honestly it seems to be buggy.

#

Yeah for some reson that fixed it

#

that made 0 sence

novel girder
#

where to get the top.gg api key?

vestal wasp
#

bot settings > webhook

desert talon
#

Has anyone else encountered a status 500 issue at /api/bots/<bot ID>/stats?

vestal wasp
#

I had seen other people with issues there

desert talon
#

found the issue

#

forgot to format my data as json

#

still shouldnt be giving an internal server error though

signal harness
#

can you show how your passing the data, but hide the key?

#

and check other endpoints to see if they all return that?

desert talon
#

Sure

signal harness
#

seems to be working for me on the /stats endpoint

desert talon
#
>>> import requests
>>> requests.post("https://top.gg/api/bots/735147633076863027/stats", headers={"Authorization": ...})  # -> 500 Internal Server Error
>>> requests.post("https://top.gg/api/bots/735147633076863027/stats", headers={"Authorization": ...}, data="not empty")  # -> 500 Internal Server Error
>>> requests.post("https://top.gg/api/bots/735147633076863027/stats", headers={"Authorization": ..., "Content-Type": "application/json; charset=utf-8"})  # -> 500 Internal Server Error
#

these are the variants on /stats giving internal server errors

signal harness
#

ah POST

#

let me try that

desert talon
#

yes

#

my bad for not specifying

signal harness
#

ya im getting an internal error

#

ill forward this over to an engineer to look at

desert talon
#

bet

signal harness
#

will get back to you when they respond, sorry about the delay.

desert talon
#

no worries

novel girder
#

cant able to send npotification to my discord channel who voted my bot

novel girder
#

@signal harness

signal harness
#

This appears to be hosted by yourself, so method not allowed seems to be on your end because its your code?

nimble canopy
#

Where do you find the API token please?

signal harness
#

bot settings > webhook

nimble canopy
signal harness
#

Check the number of times a user has voted yet

slender eagle
#

Hello, I am looking into making vote rewards for my bot just where do I get started? I am not sure how to get started

runic creek
polar laurel
#

Did the API break? My bot is suddonly unauthorized with the token top.gg gave me

signal harness
#

Can you try a new token?

polar laurel
#

I can just seems odd it randomly got resetted.

signal harness
#

I do not believe it does just double check you have the current one

polar laurel
#

Its the same but now it works. Idk what was happening there. Odd

visual ridge
#

Hey, i don't use the normal way in package file which should be "discord.js": "^13.17.1" but i made it as "discord13": "npm:discord.js@^13.17.1" and it works with everything but i just noticed that the bot stopped updating stats.
Last time the code i provided below worked 25th May but now it returns error with unsupported client.
So i need to ask, is there still a way of using it the way i prefer or am i forced now to use the first one? 😦

const { Client, Intents } = require('discord13');
const client = new Client({ //intents }); //client exported to the code below

module.exports.topggstats = async function (client) {
    const vars = require("./Settings.json");
    const { AutoPoster } = require('topgg-autoposter');
    try {
        const poster = AutoPoster(vars.topgg.token, client);
        poster.on('posted', (stats) => {
            console.log(`${stats.serverCount}`);
        });
    } catch (error) {
        console.log(error);
    };
}
runic creek
#

You can try with the official top.gg library, i.e. @top.gg/sdk and make the autoposting logic from scratch, or completely abandon external libraries and create your own API request using the documentation (https://docs.top.gg)

#

It's possible that top.gg-autoposter does some checks under the hood of the client to choose the right way to obtain information from the client for a particular library and they didn't foresee a situation like yours, although from what I understand it shouldn't be any different from the discord.js client

visual ridge
#

will do, thank you! peepoShy

indeed it resolved the issue, thank you once more! kleelove

charred ferry
#

Failed to post server count! Status: 500, Error: {"message":"An unknown error occurred, sorry!"}

getting this when trying to post the server count on topgg, can someone is there any fault on my side or from the topgg server-side?

runic creek
#

Not without better context, are you using some library perhaps?

vital anvil
charred ferry
rain palm
#

@vital anvil yo sister

vital anvil
#

?

rain palm
#

way my bots top.gg token regenerate by his own??

rain palm
vital anvil
#

on tthe dashboard

#

you dont need to ping me every time

rain palm
#

hum

#

🙁🙁

rain palm
vital anvil
#

dashboard -> webhooks

rain palm
#

yup

rain palm
hollow night
#

hi! im trying to create a reward system for whenever users vote for my bot but i have no idea how to test it to see if it works since you can only vote every 12 hours. is there a way to simulate a user voting to test functionality?

vestal wasp
hollow night
#

oh

#

im blind ty

hollow night
#

hi again! im still trying to get the webhook to work but i keep getting error messages anytime i try to test it. i have like no idea what to do

#

i followed the example given on the documentation but for some reason, mine doesnt seem to work

polar laurel
#

Is it possable to use the API to send the # of scammers i have in my db?

rain heart
#

Wdym with #

#

How should the top.gg API do that

polar laurel
#

I dident know if you could send custom feilds on it

rain heart
#

you cant

hollow night
#

does anyone have a tutorial on how to setup webhooks for discord py?

#

or topggpy

viral radish
#

@woven coral I'm bored so lets just rewrite the python sdk mmLol

hollow night
#

oh i already figured it out

#

ty tho

viral radish
#

kk no problem 👍

viral radish
#

I forgot, I only saw that it was last updated 4 years ago mbbb

#

-# it was 0:44am at that time, eepy

woven coral
#

you could try working on my fork's v0-rewrite branch

viral radish
woven coral
#

take your time!

#

i am in no rush haha

viral radish
#

Same, had my last exam for this quarter onionpray

#

-# Finally peace

woven coral
#

congraaatss!!

pseudo crater
#

While setting up the server count for my bot on top.gg, I noticed that you can enter literally any number. Isn’t that a bit misleading?

runic creek
#

You can, yes it is true but just because you can doesn't mean you should. Lying about the number of servers can get your bot removed from the website

#

Also it is not such a big factor that will better position your bot or something, taking such a risk is simply not worth it

urban elk
#

hello! is there any api that return last_vote or smth weirdsip

vestal wasp
#

it's faster (as in runtime performance) and you won't hit ratelimiter

vestal wasp
#

I personally don't use any

#

it's like ten lines of code

urban elk
#

okeh i have no other choices than using aiohttp

vestal wasp
#

how so

urban elk
#

ohh wait, i understand now

urban elk
# vestal wasp how so

ok thank you! i fear it might be working! idk how to test if the webhook is working or not...

vestal wasp
#

there is a test button

#

in the webhook settings

#

(or just ask smb to vote)

urban elk
vestal wasp
#

well I don't do python but basically

urban elk
#

why its so complicated on python sob prob just me

opal solar
#

Guys I've received the vote event like 10 times a few hours ago. Anybody else having this experience?

vestal wasp
#

/ from the same user?

opal solar
#

Yes

vestal wasp
#

are you responding with a proper 200 status code

opal solar
opal solar
vestal wasp
#

topgg retires events if you fail to respond properly

runic creek
#

top.gg also repeats requests if it thinks the request timed out (took you more than 5 seconds to respond)

#

So you should probably respond to the request first, then do some shenanigans with the database and so on in my opinion

uncut kelp
#

where api token topgg?

#

it's same with webhook token?

visual ridge
#

in webhook tab

feral oracle
visual ridge
#

if your bot is not accepted then you can't get the token
but your answer is to go to docs

feral oracle
visual ridge
#

have you even submitted your bot to the top.gg ? im asking because your answer shows like you didn't

feral oracle
visual ridge
#

and after that time you'll gain the access to the token so in the meantime you can just look at the docs, https://docs.top.gg/docs

feral oracle
#

All i need is the api so my antinuke could work

#

I have bdfd version of my bot

rain heart
#

wild partial token

signal harness
#

Supposed to be like this

feral oracle
nimble canopy
#

Hello, I'm getting a TopGGAPIError: 404 Not Found error... I've done everything I can to make it work, updated it, and the API token is valid, but I'm still getting this error. If anyone knows how to fix it, I'd love to hear it!

Thank you very much.

humble loom
#

....

signal harness
steep vigil
#

hello folks, im tryna setup the webhook thing from the example in the github - do i put the webhook url as http://public_ip:port/votes or http://public_ip:port/dblwebhook?
and yes port forwarding is all ok dw

steep vigil
#

So I made my own answer

#

But since I'm using the docs examples, the endpoint no longer workw

#

Is there an alternative? If so how do I use it

runic creek
#

What endpoint exactly?

steep vigil
#

im basically following a edited version of the github example

steep vigil
#

Since this API is more outdated than floppy disks, I have forced asked my Dev friend to basically get smth that works, as smooth as possible ideally without requests, so if I get smth working I will probably post it here with some instructions to help others

jaunty plank
#

👀

steep vigil
jaunty plank
#

Python works, just no one has made a library for it

nova compass
#

hello where can i get my api token?

signal harness
signal harness
nova compass
#

my bot is approved

signal harness
#

that is the link you for.

nova compass
#

thanks

steep vigil
#

If anyone here has a working example for the python API, please can you share it?

dull otter
#

Recommendations are described on the website

steep vigil
dull otter
steep vigil
#

youre welcome to share your code for the rest of us

dull otter
steep vigil
dull otter
steep vigil
dull otter
#

I used this information as a starting point for my work.

steep vigil
woven coral
#

wait wait wait

steep vigil
#

waits patiently

woven coral
#

i still have the base URL set to /v1/ lol

steep vigil
#

oh lmao

woven coral
#

wasn't anticipating for someone to use my fork

#

one sec

steep vigil
#

it just works better as is, still tryna figure out how to actually get it working but its easier to use

woven coral
#

i'll create a separate branch for it

#

so future changes wouldn't affect it once veld soon announces updates for v1

steep vigil
#

since im using like webhooks = topgg.Webhooks(os.getenv('TOPGG_WEBHOOK'), 9500) but since it also needs topgg imported then its a case of like oh topgg has no attribute webhook

woven coral
#

cc @steep vigil

#

pip install git+https://github.com/null8626/python-sdk.git@v0-public

#

i'm going to sleep now, so i might not reply in 8 hours, good night! kittywave

steep vigil
steep vigil
#

oh my fuckin god it works

woven coral
steep vigil
#

Thanks so much btw, first working API option I've actually found which is intuitive!

woven coral
#

APPRECIATE IT!

#

❤️

pseudo igloo
#

how do i get the API key

#

nvm i got it

lapis forge
#

can i just get a static number of current active votes?

runic creek
lapis forge
#

that's safe to use every 30 minutes right?

runic creek
#

Yea, should be fine

lapis forge
#

mm
apparently I'm not posting correctly

lapis forge
#

huh
so the API docs default to v1, which isn't currently active, so following the API docs means that my posts return 200 and then don't update the info on my bots page

misty aspen
#

hi

peak oasis
#

How do I send embed messages when someone votes for the server using my custom bot?

peak oasis
#

javascript discord.js

#

@steep vigil

steep vigil
peak oasis
#

Ty

lapis forge
#

not underlined 😭

#

anyways
to make use of the webhook do i need to have a public ip?

dull otter
#

As I understand it, you need a static IP. I have it set up on the hosting and everything works

ruby geode
#

I wanna track votes for my server using my custom bot.

dull otter
#

That's what API capabilities are for

#

You can get not only votes, but also reviews

lapis forge
#

websocket mode when 😔

ruby geode
dull otter
#

And someone previously sent a link to GitHub with a ready-made code

ruby geode
#

Oh thank you!

ruby geode
dull otter
#

Yes, that's right. Your bot needs to be approved

ruby geode
#

even if its private?

ruby geode
dull otter
#

A link to what? For a ready-made code?

ruby geode
dull otter
#

Okay, I'm glad, because I haven't written it down

ruby geode
#

where to sent bot approve request

#

I exactly wanna do is i wanna track votes for my server using my personal bot.

dull otter
#

To do this, your bot needs to be approved

ruby geode
#

where can i send the request