#topgg-api

1 messages · Page 7 of 1

raw hornet
#

The process logs the same vote twice therefore also sends the vote log message twice which is kinda annoying

jaunty plank
#

are you responding to the webhook quickly?

#

we have a retrial system, if the webhook isnt responded to quickly it will retry the webhook because it didn't think the webhook was received.

raw hornet
#

It wasnt an issue a few days before none of my code changed either so thats why Im wondering

jaunty plank
#

Well, for example if you send a message to discord and wait to respond to the webhook until after then it might just be the discord api being a bit slow.

#

The other way to correct it is just storing votes temporarily in memory.
If someone voted a second ago ignore any votes from the same person shortly after.

raw hornet
#

It worked fine before so idk whats wrong but ill see what I can do thanks!

autumn lance
#

Is it possible to get the updates I have posted on top.gg for my bot trough the api?

rain heart
#

no

autumn lance
#

ok

next quiver
#
future: <Task finished name='Task-96' coro=<WebhookManager._run() done, defined at /usr/local/lib/python3.11/site-packages/topgg/webhook.py:144> exception=OSError(98, "error while attempting to bind on address ('0.0.0.0', 5000): address already in use")>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/topgg/webhook.py", line 150, in _run
    await self._webserver.start()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_runner.py", line 121, in start
    self._server = await loop.create_server(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1519, in create_server
    raise OSError(err.errno, 'error while attempting '
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 5000): address already in use

Can somebody help me? Why am I getting this error?

restive otter
#

Error says it all

#

error while attempting to bind on address ('0.0.0.0', 5000): address already in use

brittle cape
#

If I already learned js. I wont ask it again here 😑
Ive try write code app.post.user as vote but it say "vote is not defined"
And yeah im not a developer ok. So if you cant help anything or cant give any solving. please just up my post ok!

#

Thank you mate 🙏
I appreciate it

#

Its not a bot for vote but server. My server already up on topgg

restive otter
#

also your code has so many mistakes that a person who knows at least js basics wouldnt do

kindred hemlock
#

What

pliant shell
restive otter
heavy crater
#

I want to send a Dm to users when they vote my bot

#

how can I do it?

rain heart
#

Fetch the user id provided in thr webhook, check if your bot shared a server with itif yes try to dm

brittle cape
#

I never say to don't want to develop. I just say I'm not a developer. I just want to learn how to build a bot and now I've problem and need help. I know my code so terrify but because of that I ask here to someone help me. I'm here to solve my problem not to show off my code. Read first before typing. You're smart but you have 0 reading and 0 thinking before typing man and also 0 attitude
Do you think every people learn coding like saying bullshit like you?
Ok, I don't want to argue with people who have 0 attitudes like you man. Done man, thank you for your bullshit@restive otter

kindred hemlock
#

Hey! Sorry help bot here

#

Can I help you with your frusteration?

brittle cape
restive otter
pliant shell
#

I saw wrong

gilded plover
#

^

jaunty plank
#

The bot client.

gilded plover
runic creek
#

client is your bot which you define with

const client = new Client()
restive otter
#

In the example of event with topggpy, what is on_dbl_test?

rain heart
#

on_dbl_test is, as the name suggests, the callback for when a test vote is made using the test button on the webhook settings

#

the docs should contain appropriate examples on usage

left thunder
#

can someone help me with the topgg vote managing. I code in python, and im honestly not understanding what I need to do to set up a vote handler

knotty garnet
#

did you download the library?

left thunder
restive otter
#

You can trigger a test vote from your bot's settings page on Top.gg

zenith quest
#

@zenith quest

pliant shell
rain heart
#

???

restive otter
#

People are such drama queens CS_kekw

#

fr ong

fading cliff
#

how to make python code if member vote on top gg do ting

restive otter
fading cliff
raw hornet
#

Very odd but it works again now so thats good

untold sparrow
#

#development would be the channel for general development related questions blob_nod do mind that people will not just give you the code

left thunder
#

where do i get the webhook url from?

restive otter
#

Where you host the webhook listener

#

e.g. http://IP:PORT/something

#

Where IP could be your VPS IP and PORT the port where the listener is running

#

If you're running it locally you'll need to enable port forwarding, which is not recommended so I'd recommend you to use a proper VPS if it's the case - same place where you host the bot itself

knotty gull
#

How do I setup bots after I invite them I’m very new at this

#

Please

restive otter
#

read channel name

restive otter
knotty gull
#

Ok I’ll try it now @restive otter

balmy crest
#

How do I set up the Webhook to count how many servers my bot is in? I'm just not understanding the Docs...

left thunder
left thunder
# hushed acorn

what does that do, I mean I see what it's saying it is doing, but how does it play a part here?

hushed acorn
left thunder
#

and that tells me what it is, but how does it play a part here?

#

in me getting the webhook url

hushed acorn
#

can you read

#

or

#

nah

left thunder
#

dude, reading, and understanding is 2 different things

hushed acorn
#

that's the part it plays

left thunder
#

i see wtf yall typed, do i understand...nope

left thunder
#

Jesus

hushed acorn
#

bro

hushed acorn
left thunder
#

ok, i read it

#

what now

hushed acorn
#

that's where you set the port

left thunder
#

that's?

hushed acorn
#

yes?

left thunder
#

that is? What is "that", the code, a website, a link?

#

im so lost

hushed acorn
#

☠️

#

are you serious

left thunder
#

dude, if your done asking me the same thing 3 times in a row...

#

why would i sit here asking about smth i understand...

#

make it make sense

hushed acorn
#

I asked you to read because your saying you don't understand. what doesn't make sense?

left thunder
#

ok, your showing me the port and what it is right?

hushed acorn
#

i did awhile ago

left thunder
#

im asking

#

it's a yes or no, easy stuff

#

even the kids get it

hushed acorn
#

ok?

left thunder
#

so im asking..

#

follow me now

#

Where am i using this port?

hushed acorn
#

goodbye 👋

left thunder
#

im done

dusty stone
dusty stone
dusty stone
left thunder
#

maybe I need to emphasize on the fact that all these terms and shit im new to, telling me things ur familiar with is gonna puzzle me.

left thunder
# dusty stone Please read <:Okay:998558380807430215>

And stop treating me like ion got eyes. I see wtf your showing me. If I could see the shit to make it work I think I would have been pretty set by now. What I dont do is understand what exactly your showing me, why your showing me, and what it means

#

idk how else to stretch this

dusty stone
left thunder
dusty stone
#

Because it would help me help you

left thunder
#

no, im literally asking why

#

cause i literally dont know

#

is it so the website knows where to dump the information?

dusty stone
#

Oh.

#

Set up your own service to reward users in a server. If you're not a developer, dont worry about these settings.

#

You don't need to set a webhook url

left thunder
#

Why not?

rain heart
dusty stone
dusty stone
rain heart
#

Didnt seem apparent on your wording then

left thunder
left thunder
dusty stone
left thunder
dusty stone
#

Ah I didn't see that

#

Well what action?

left thunder
#

editing my db to allow more features to a user

#

to put it simple

dusty stone
#

hmm mysql? postgres? mongodb?

#

The easiest would be to spin up a small node web server.
I don't have top.gg access so I don't actually know what data it sends

left thunder
#

so why r u helping if you've never done it before?

left thunder
dusty stone
left thunder
#

can I make webservers in vs code? Ik i can in replit

sinful gust
#

when will you put my bot on top.gg, i I've been waiting for 1 week+

#

Hehe

restive otter
#

Wait one more week

sinful gust
#

Ok

dusty stone
left thunder
#

since i alr use a webserver for hosting?

dusty stone
#

I have never used replit eShrug I self host or use ovh dedicated machines

left thunder
left thunder
dusty stone
#

ah python

#

well install the topgg package

pip install topggpy
left thunder
#

yh, did that alr

#

not in replit

#

vs code

dusty stone
#

well you need to do it wherever you are going to host it in the end

left thunder
#

imma try it and see

dusty stone
#

well where is your database hosted?

#

replit? then yeah

left thunder
#

replit, it host where ever my bot is hosted

dusty stone
#

but that code... doesn't look right

left thunder
#

i really dont get why people do that lol

restive otter
#

Well, you're starting the webhook when there's a vote only

#

Which means you'll never catch any votes

#

As it never started

left thunder
#

wdym

restive otter
#

When someone votes, you run the handler

#

Which means until someone votes it will never be ran

#

Since it will never be ran, it will never catch any votes

#

So it will never do anything

left thunder
#

i see

dusty stone
#
await bot.topgg_webhook.run(5000)

is what starts the webserver.
You don't run it until you receive a vote event... which you cannot receive without it running

#

Yeah exactly what Krypton said

restive otter
#

Start it in the on_ready event or similar

left thunder
#

oh, ok

restive otter
#

Ideally setup_hook if you have your own bot class as people should have

left thunder
restive otter
#

Then use it there

#

Better than on_ready

restive otter
#

Better than before yep

left thunder
#

aiit, imma try it first in vs code, then in replit

left thunder
dusty stone
#

yeah

#

if you mean running your code in vscode

#

python3 yourfile.py

#

vscode should have a "play" button in the top right though

left thunder
dusty stone
#

Then I'm not sure what your question is catSit

#

vscode is just a fancy text editor

restive otter
#

You can, though it won't be reachable by Top.gg or other external devices unless you port forward which is not recommended to do. Just test it on Replit, will be faster and better

left thunder
#

@restive otter isnt it import topgg?

restive otter
#

Have you installed it

left thunder
#

i installed topggpy through replits pakage feature

restive otter
#

Probably doesn't work correctly krShrug

left thunder
#

i'll just have to prolly manually install it

#

replit moment

restive otter
#

If you can run commands then install with pip

left thunder
# restive otter If you can run commands then install with pip

getting this error

Traceback (most recent call last):
  File "main.py", line 14, in <module>
    import topgg
  File "/home/runner/Truth-Bot/venv/lib/python3.8/site-packages/topgg/__init__.py", line 24, in <module>
    from .client import DBLClient
  File "/home/runner/Truth-Bot/venv/lib/python3.8/site-packages/topgg/client.py", line 42, in <module>
    from . import errors, types
ImportError: cannot import name 'types' from partially initialized module 'topgg' (most likely due to a circular import) (/home/runner/Truth-Bot/venv/lib/python3.8/site-packages/topgg/__init__.py)
#

do yk why?

restive otter
#

Most likely due to the double installation of the package

left thunder
restive otter
#

Remove the package and have it only once?

#

Or if you have a topgg.py file/module, don't name it like that

left thunder
restive otter
#

There's a file explorer? Make use of it

left thunder
restive otter
#

That's a web viewer, not a file explorer

left thunder
left thunder
#

but ever since i inputted the port or code, it's giving me that

#

can u not bro

restive otter
restive otter
#

Especially the one with replit's package manager

#

Uninstall it and just install the one with pip

left thunder
#

so when i installed it in the replit files, thats what i call em lol, and not the venv, it started working

#

it ran

cold dagger
#

alr

left thunder
#

@restive otter remember im trying to get the webhook url so i can do smth when a vote comes in

left thunder
#

@restive otter Hey so I did some research and watch a couple video's. And I understand the port and IP and all that. So the webhook url is the url or webserver that collects data from another webserver through a webhook. Well, idk if that makes sense lol. But how do i create webhook url to give it? Is that done in the code I have alr?

restive otter
#

The URL is as you said the web server

#

So it may be an IP or a domain, depends how Replit works

#

Never used Replit but I suppose it's something like xxx.repl.it/yyy

rigid relic
#

Use Oracle VPS

left thunder
jaunty plank
#

(you dont have to use cloudflare, its just their learning resource is really good)

west bough
#

D

restive otter
west bough
#

Kanyou give 20000cridite

#

Plaize

#

😭

restive otter
west bough
#

Plize

restive otter
#

No.

cursive kraken
#

Error: 504 Gateway Time-out
at Api._request?

tidal idol
#

site is down

#

thats why

rotund ether
#

site down

sterile bramble
plucky lance
#

Well the go for it and code it yourself
Examples how it works are available in the docs in this channel description

onyx prawn
#

Is api still down?

restive otter
#

Yes

#

Also port forward if you are running it locally

fleet quarry
#

how to get it?

restive otter
#

"Edit" button on your bot's page, go to the "Webhook" section on the left menus and click on reveal

fleet quarry
#

how to get auth

restive otter
#

Literally read above...

fleet quarry
#

ok

#

thanks

high topaz
#

I'm having some issues getting my bot to update it's server count, my bot runs on discord.py btw

#

anyone able to help me?

restive otter
#

Not without code, error and more information

high topaz
#

the error's huge

#

the code:
bot = discord.Client(intents=discord.Intents.default())

dbl_token = os.getenv('top.gg TOKEN')
bot.topggpy = topgg.DBLClient(bot, dbl_token, autopost=True, post_shard_count=True)

@bot.event
async def on_autopost_success():
print(
f"Posted server count ({bot.topggpy.guild_count}), shard count ({bot.shard_count})")

print(f"Failed to post server count\n{e.__class__.__name__}: {e}")
#

then it blows up in my face with an error like 30 lines long

rain heart
#

Well having the error would help

high topaz
#

The main point tho was that topggpy wasn't a subcategory of bot

delicate cedar
gusty leaf
restive otter
gusty leaf
#

@restive otter i want api key for my music bot

#

how to get it

rain heart
#

you need an approved bot on top.gg

heavy crater
#

what's this?

#

@jaunty plank sorry for ping but its urgent can you help me out?

jaunty plank
#

The site is down

#

including the api

heavy crater
jaunty plank
#

Soon hopefully, its been coming back for the past 20 minutes or so.

vague cosmos
#

how can I get the time that the recent voter can revote?

rain heart
#

you need to calculate that yourself

#

once a webhook request comes through, get the current time, calculate +12 hours to it, and there you have the time they can revote on

#

there is no way to do it without webhooks

vague cosmos
#

ah okay

restive otter
#

Either IP:PORT of your VPS

#

Or domain and port if necessary

#

How do you connect to your VPS

#

Then ask them

restive otter
#

None is better

#

The difference is what's used, IP or domain

#

In the end it's an URL containing either IP or domain, and if needed a port, of where the web server is running so that Top.gg can make a request there and your web server is handling it correctly.

#

Then the port used will be 5000

#

Then it won't run because its a coroutine and must be awaited

#

No

#

It will be http(s)://domain:port/path

#

.com is part of your domain

#

Path will be whatever path you use to catch the request Top.gg will make

#

There is only one port, as shown above

#

http(s)://domain:port/path

restive otter
#

No where, it doesn't need any port

#

Top.gg will make a request to the URL you give

#

In that URL you give the port of the web server that is running

restive otter
#

To start a web server on port 5000

restive otter
restive otter
restive otter
#

Just as side note, you don't need to reply ping on every message. We're only 2 talking it's not like we get lost.

#

And it doesn't matter if you already have a port assigned for something

#

A computer has multiple ports, so does a server

#

65535 ports

restive otter
#

Then use another port

#

Not all 65535 ports are used on a computer

#

If they are, it has a serious problem

restive otter
#

Doesn't matter

#

They have multiple servers

#

Not one server for all customers

#

So I need to use the higher port ?

#

A different

#

Higher or lower, doesn't matter

#

Okay, thanks

restive otter
#

That would be the path

#

So http(s)://domain:port/dblwebhook

#

You can change it or not, doesn't matter much

restive otter
#

Where the cog is loaded

#

Or where the bot is starting

restive otter
restive otter
#

You can very well start the webhook listener in the main file

restive otter
#

That could be one place, yes

restive otter
restive otter
restive otter
restive otter
#

If yes, how to set up a whitelist ?

rain heart
#

so you can whitelist these

restive otter
rain heart
#

depends on how your webhook will handle requests

#

thats why its probably best to whitelist the ips from the docs

restive otter
restive otter
jaunty plank
#

If you haven't gotten it working yet I wouldn't worry too much about dealing with a dos yet.

restive otter
#

IP whitelisting won't be done in Python

restive otter
#

API for voting discord servers?

tidal idol
#

do you mean webhooks?

#

or voting for servers via an api

restive otter
#

Waiting on my bot application, but my server application has gone through

tidal idol
#

works for bots and servers

restive otter
tidal idol
#

says bots on the docs but it applies for servers too

restive otter
tidal idol
#

wdym

restive otter
tidal idol
#

Guild:

{
  "user": "471409054594498561",
  "type": "test",
  "query": "",
  "guild": "906981869340487700"
}```

Bot:
```js
{
  "user": "471409054594498561",
  "type": "test",
  "query": "",
  "bot": "1009848030951907530"
}```
restive otter
tidal idol
#

you do it on your servers page under "Webhooks" --> "Send test"

green python
rain heart
#

yes

green python
#

ah ok

#

thanks!

restive otter
dire lake
#

Is there way to check how much time is remaining for user to vote again?

jaunty plank
#

thats something youll want to track on your end

dire lake
jaunty plank
#

When you receive a vote through a webhook you should save when they can vote again in a database.

#

Then you can just check that database

torn vigil
#

when i instal @top-gg/voting-sdk it return a error: Permission Denied

dire lake
jaunty plank
#

Thats something you'll want to track in your own database

jaunty plank
#

That's not publicly usable yet

lunar trail
#

hey i have been trying to log votes from top.gg, my console shows nothing when i tested this vote.
Yes i have modified the bot webhook page, webhook url as http://my.ip4.address:port/dblwebhook, my port is 80 here since iam using to test votes on my local pc. Would you mind having a look at this and notify me whats wrong 🫣
https://pastebin.com/LfbGWP1H

restive otter
#

You need to port forward otherwise Top.gg won't reach your locally running server.

opaque coral
#

How do i send a test vote?

restive otter
#

There's a test vote button

#

In the webhooks settings where you put your webhook URL, password, etc.

worn warren
#

how do i get a api

lunar trail
restive otter
#

Port forward the port of where the server is running on your local machine

opaque coral
restive otter
#

You create a web server

#

Listen to an endpoint for data

#

Expose that web server to the internet

#

Get the IP:port / domain:port and put that as webhook URL

opaque coral
#

How do I create a web server (I’m dumb)

restive otter
#

Replace JavaScript with another language if you use another language

opaque coral
#

And then?

restive otter
#

read

opaque coral
#

No

restive otter
#

too bad

opaque coral
#

Can you give an example?

restive otter
#

Google has examples

opaque coral
#

Great help

gloomy crypt
#

Why does the api keep saying in my terminal it sends when I have the autoposter? I could continuously restart my bot and a second later it will always say that it posted stats to topgg.

gloomy crypt
jaunty plank
gloomy crypt
#

Ah.

gloomy crypt
#
TopGGAPIError: 503 Service Unavailable
    at Api._request (/home/xxx/Documents/code/Bots/public/Paradise/node_modules/@top-gg/sdk/dist/structs/Api.js:76:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Api.postStats (/home/xxx/Documents/code/Bots/public/Paradise/node_modules/@top-gg/sdk/dist/structs/Api.js:99:9) {
  response: Response {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://top.gg/api/bots/stats',
      status: 503,
      statusText: 'Service Unavailable',
      headers: [Headers],
      counter: 0
    }
  }
}

This keeps happening when i restart my bot. I have no idea why.

rain heart
gloomy crypt
#

Okay.

sonic ferry
#

Hey. I am a doubt. Is it possible to make top.gg auto voter which automatically votes a bot?

rain heart
#

no

#

as thats against the guidelines

restive otter
#

@golden adder, hello! Sorry to disturb you, but I'm the one who created the Top.gg SDK's C++ version. When will you upload it to Topgg's Github?

rain heart
rain heart
#

create a pull request, not push directly to it

#

oh nvm I see

restive otter
#

Isn't it Johand that manages that now that Mac left

vestal wasp
#

Hey, (using node.js sdk) how can I get all the bots of a developer (user id)?

restive otter
#

You don't as there's no endpoint for that

restive otter
#

remember
you can always scrape :trollface:

restive otter
#

Hey, nothing happen when I click to test vote. My code :
main :

async def setup_hook(self):
        for ext in self.initial_extensions:
            await self.load_extension(ext)
        bot.topgg_webhook = topgg.WebhookManager(bot).dbl_webhook("/dblwebhook", "hygJHGfdsf*-s/df")
        await bot.topgg_webhook.run(7564)```
cog :
```py
def __init__(self,bot:commands.AutoShardedBot):
        self.bot = bot

    @commands.Cog.listener()
    async def on_dbl_vote(data):
        

        print(f"Received a vote:\n{data}")```
jaunty plank
tidal idol
#

also when your code is running, try visiting either the ip:port or the url (whichever is applicable) in your browser and see if that works

restive otter
tidal idol
#

what error?

restive otter
tidal idol
#

that means the port is not open

#

is this hosted on a VPS?

restive otter
tidal idol
#

what port have you been allocated

restive otter
tidal idol
#

the server port

restive otter
tidal idol
#

then change py await bot.topgg_webhook.run(7564) to py await bot.topgg_webhook.run(4512)

restive otter
tidal idol
#

do you get that when you visit the ip:port

restive otter
tidal idol
#

i'm not sure then sorry

restive otter
tidal idol
#

nope sorry

restive otter
tidal idol
restive otter
tidal idol
#

i'm really not sure then

#

i can't help any further

restive otter
tidal idol
restive otter
jaunty plank
#

https:// is only if you have ssl, if you dont have ssl it should be http://

rain heart
#

Dns probe refers to that domain not being accessible, has nothing to do with your website

timid rose
#

any way to make like this?

rain heart
#

that cant be changed, no

#

iirc some have it, some not

timid rose
rain heart
#

If I remember correctly

timid rose
mighty scroll
tidal jetty
#

@clear pecan did you get it to work? I tried 2.0.0a0 and still hangs for me

clear pecan
#

no lol

#

I do with webhook

brisk summit
#

Api having any issues

#

Getting a 504 timeout

tardy onyx
#

Yeah same dude

wicked spruce
brisk summit
#

Hm

unique ruin
#
Error: 504 Gateway Time-out
    at Api._request (/root/Ares/node_modules/@top-gg/sdk/dist/structs/Api.js:76:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async hasVoted (/root/Ares/commands/information/profile.js:76:15)
    at async getBadges (/root/Ares/commands/information/profile.js:42:15)
    at async Object.run (/root/Ares/commands/information/profile.js:24:18)
    at async AresClient.<anonymous> (/root/Ares/events/messageCreate.js:117:5)```why is this constantly coming?
brisk summit
unique ruin
#

):

polar elk
#

Top gg down ?

rain heart
#

See above

brisk summit
#

@steady sand

#

Why i don't hve bot dev role

rain heart
#

Do you have an approved bot?

steady sand
#

but bot is in team

steady sand
brisk summit
#

Yh@rain heart

steady sand
#

octor monitor

brisk summit
#

We two are devs of it

#

@chrome pier

chrome pier
#

Can’t see any log of your bot being approved all were declined

#

Can you send message link here when it was approved?

brisk summit
#

Umm basically, it's mine and @steady sand

#

Octor monitor

#

It's verified here

#

I'm owner of it, but it is applied by alto

chrome pier
#

Then you won’t get bot dev role then the one who submits bot gets role

brisk summit
#

But as I'm the owner of it, cant i request for it

#

As it is in a team in topgg where I'm in

chrome pier
#

We only give role to those who have submitted bot

#

Not even team members

brisk summit
#

But logically it's not

#

It's our bot

steady sand
#

bruh

chrome pier
#

Then I recommend submitting it from your id

steady sand
#

@chrome pier the bot belongs to him actually

chrome pier
#

No need to argue about this

steady sand
#

am just a partner

brisk summit
#

Ah fine, thanks for time

chrome pier
#

Np

steady sand
#

bruh

brisk summit
#

Nvm

steady sand
#

still cant you give a role

#

: |

#

ok

chrome pier
#

No need to argue further

brisk summit
#

Ahh

steady sand
#

@brisk summit add octor pro in top.gg

brisk summit
#

Dm

barren forge
#

Why is topgg api downing so often?

chrome pier
barren forge
chrome pier
#

Well yea recently site is going down more but I believe engineers are aware and already working on it, so these types of issue won’t happen again.

barren forge
#

hmm thank you

gloomy crypt
#
TopGGAPIError: 504 Gateway Time-out
    at Api._request (/home/xx/Documents/code/Bots/public/Paradise/node_modules/@top-gg/sdk/dist/structs/Api.js:76:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Api.postStats (/home/xx/Documents/code/Bots/public/Paradise/node_modules/@top-gg/sdk/dist/structs/Api.js:99:9) {
  response: Response {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://top.gg/api/bots/stats',
      status: 504,
      statusText: 'Gateway Time-out',
      headers: [Headers],
      counter: 0
    }
  }
}

Getting this even though they stated it was back up.

rain heart
#

Its still having issues yeah, we're aware

gloomy crypt
#

But they have stated it was back up. I would update this to miss confusion.

vast prawn
#

@golden adder can you remove captcha on the api.

#

Thats annoying

golden adder
#

The captcha?

#

Cloudflare verification?

#

There's no point in posting your stats to the API now anyway. We're only serving cached versions of pages.

#

It'll be back when the site's fully back

vast prawn
#

Cause of UAM cf

fair osprey
#

In my opinion the TopPHP library is too little object-oriented like it's a simple "funcion collection".
Actual (user vote check):

$api = new DBL([
      "token" => "YOUR TOP.GG API TOKEN HERE."
]);

if($api->connected)
{
      $isVoted = $api->get_user_vote(799697654279307314, 242351388137488384);
      if($isVoted) echo "This user voted!";
}

in my opinion it is easier for developers to use one that is truly object-oriented like:

$api = new DBL([
        "token" => "UWU"
]);

$api->exceptions->manage('notConnected', function(\DBL\ErrorException $e) {
    echo "Error: {$e->message}";
}

if ($api->bots->get('1234567890')->hasBeenVoted('12346782899939')) {
    echo "User 12346782899939 has voted this beautiful bot!";
}

Because you can enter the required data less times and do more things like:
"I need to get the bot's informations and check if the user has voted!!!"
With normal:

$api = new DBL([
      "token" => "YOUR TOP.GG API TOKEN HERE."
]);

if($api->connected)
{

       // Omg first i need to get the bot's information because i need the prefix idk
      $prefix = $api->find_info(Http::BOT, 799697654279307314)['prefix'];

      // Ok NOW i need to check if the user has voted :)
      $isVoted = $api->get_user_vote(799697654279307314, 242351388137488384);
      if($isVoted) echo "This user voted!";
}

With a more object-oriented version you can create a "bot object" and you won't need to insert the bot ID twice:

$api = new DBL([
        "token" => "UWU"
]);

$api->exceptions->manage('notConnected', function(\DBL\ErrorException $e) {
    echo "Error: {$e->message}";
}

// Only if is connected
$bot = $api->bots->get('123467783238475');
// Now get the prefix
$prefix = $bot->prefix;
// And check if an user has voted
$has_user_voted = $bot->hasBeenVoted('15637485968547');
// Perfect

And one other important thing: objects take less memory than arrays so they're better

rain heart
#

Yeah the original maintainer of that Library either left or got banned

#

If you'd like to, you can create a pull request on that repo and improve how it currently is

fair osprey
harsh quiver
spice bobcat
#

Can I set automatic role taking when voting ?

restive otter
#

yh, create an event listener

spice bobcat
#

Can you explain to me in more detail?

restive otter
#

what programming language r u using

spice bobcat
#

English

#

@restive otter

restive otter
#

funny

#

"programming" language

harsh quiver
#

Is the api still down?

#

Still I can't access to the api

fair osprey
#

why API Docs speak only about users and bots but not about guilds and auctions?

nimble kindle
#

Hello, how can I create a command that will list the top voters?

runic creek
#

You must first collect these votes somehow (preferably with a webhook), then store them in the database, when you want to get the top voters you take their number of votes and sort them from the most

fair osprey
#

In what language?

runic creek
#

There are so many possibilities to do something like this, it's all up to you how you do it

jaunty plank
fair osprey
#

*not lolcode 👀

#

hmm why top.gg API aren't in a SocketConnection but you use webhooks for managing events

nimble kindle
runic creek
#

I'm not sure, I've never been that interested in it

jaunty plank
#

Especially since things can be retried(if your webhook/bot is offline for 10 minutes you shouldnt miss any votes)

fair osprey
jaunty plank
#

sockets are easy, sockets at scale is hard.

#

(and more expensive)

fair osprey
#

oh yes, I stupidly didn't think about socket load balancing

jaunty plank
#

I have considered making a webhook to websocket thing for my webhook service, and the only reason I havent is it would have to be a premium feature.

#

Even at my much smaller scale its still not simple.

fair osprey
#

i have used sockets only for creating a stupid online game (written in JavaScript) so I don't know as much about them however they are easy to manage, mainly for events.
Discord that has money uses them while top.gg uses webhooks

jaunty plank
#

Discord has to use sockets tbh

#

But even they are moving to webhooks as much as possible

#

slash commands use webhooks

fair osprey
jaunty plank
#

responses are webhooks

#

Thats why you have three seconds to respond

fair osprey
#

not four?

jaunty plank
#

is it four? 👀

fair osprey
#

I'm not counting how long discord gets angry because the bot stumbled over some mistake I made but I think it's about four seconds but I could be wrong

jaunty plank
#

its three

fair osprey
#

oh, webhooks

#

now i must add ReactPHP to TopPHP for webhooks management :(

jaunty plank
#

at least webhooks are simple ^_^

fair osprey
#

true

#

But I still don't understand why the Guids APIs are not documented

jaunty plank
#

We have no guilds api

#

or no proper one

rain heart
#

Not one supported yeah, using it anyways won't give you any support for it

fair osprey
#

I don't really have the URL so even if I wanted to I couldn't

fair osprey
#

just one more question.
When I get a Webhook I get a POST request with the fields given in the documentation but where do I check the Authorization parameter?
Is it in the headers by any chance?

rain heart
#

Authorization header it is called

plucky lance
#

All it takes is to enter the entire url and callable php file as webhook url and get the request data calling file_get_contents().#

fair osprey
plucky lance
#

As well as using the $_SERVER GLOBALS to verify the source IP and get the headers calling getallheaders() to verify the authorization if somebody is using it

fair osprey
#

and because of this we need to open a webserver on the library

plucky lance
#

I feel like you're thinking into it a bit too deep.
Did you take a look at the other libraries by any chance, for example the JS one?

fair osprey
plucky lance
#

I would actually provide a standalone build people can add to their environment not providing an entire library that covers any possibly way of handling requests.

#

I wouldn't add react to just make use of the webserver.

fair osprey
#

reactphp doesn't weigh that much come on

fair osprey
plucky lance
#

while that is true, I would always try to avoid unnecessary libs if possible

fair osprey
#

also me but reactphp is used by a lots of projects

#

and is better to have ReactPHP as dependence than cURL

plucky lance
#

the (other) lib(s) actually doesn't serve a webserver, just simply the request management

fair osprey
#

what?

plucky lance
#

it's optional to include other libs as webserver or spoken middleware

fair osprey
#

so would you suggest making the react/http library optional

#

i can do this but removing react for the webhook management is inconvenient

plucky lance
#

That would at least follow the same way how the existing libs are handling it

#

Using your own middleware using the JS lib is the default, too

#

Optionally you can go with the one in the script examples

#

The lib for example doesn't include express as dependency

fair osprey
#

got it

#

anyways thanks for the help

plucky lance
#

err np, just wanted to share my thoughts

fair osprey
#

you're welcome

#

no wait

plucky lance
#

as it's totally up to you how you wanna do it anyways

#

I wonder anybody even has the time to touch the topgg-php lib anyways :D

fair osprey
#

is "you're welcome" correct in this case?
Omg idk english wery well

fair osprey
plucky lance
#

sounds about right, yeah freerealestate

fair osprey
#

just a question

#

do you prefer the old style (example:

$api = new DBL([
      "token" => "YOUR TOP.GG API TOKEN HERE."
]);

if($api->connected)
{
      $isVoted = $api->get_user_vote(799697654279307314, 242351388137488384);
      if($isVoted) echo "This user voted!";
}

)

or the new style (example:

$api = new DBL([
        "token" => "UWU"
]);

$api->exceptions->manage('notConnected', function(\DBL\ErrorException $e) {
    echo "Error: {$e->message}";
}

if ($api->bots->get('1234567890')->hasBeenVoted('12346782899939')) {
    echo "User 12346782899939 has voted this beautiful bot!";
}

)?

plucky lance
#

well personally I would go with the fully oop style 2nd one but you gonna keep things as simple as possible as not everybody using the libs really knows what he does

plucky lance
#

so handling the exceptions internally would probably be better

fair osprey
vagrant birch
fair osprey
plucky lance
#

Even if everything is documented and explained correctly a lot of people still don't read it or understand what things means or do

plucky lance
#

but if you wanna maintain this than choose whatever u prefer I guess

fair osprey
#

let's try the oop library
i just hope to document it well

#

anyways internal exceptions manager is a little bit ugly because you can define the return functions for all the errors UNTIL you don't "open another object" (like $topgg->bots)

plucky lance
#

true, if you wanna keep a non-blocking style throwing an exception wouldn't make much sense here, too

fair osprey
#

i just finished the library

#

cool

plucky lance
#

👌

unique ruin
#
Error: 504 Gateway Time-out
    at Api._request (/root/Ares/node_modules/@top-gg/sdk/dist/structs/Api.js:76:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async hasVoted (/root/Ares/commands/information/profile.js:76:15)
    at async getBadges (/root/Ares/commands/information/profile.js:42:15)
    at async Object.run (/root/Ares/commands/information/profile.js:24:18)
    at async AresClient.<anonymous> (/root/Ares/events/messageCreate.js:117:5)```
#

why is the api most of the time down iara_smh

runic creek
#

Pretty typical, as well as the fact that in an hour or two everything should be back to normal

#

That's probably why they recommend using webhooks to collect information about votes

radiant pollen
#

what’s the api path to post bot server counts & shard counts?

fair osprey
white veldt
#

How can I get info if someone voted for my bot (webhook, etc)

lament terrace
#

sooooooooooooooooooooooo been a hot take since ive talked here (my main was token sniped, got it back but i only use to when updating my bots discovery page now)
can i update my bot server count on top using a separate file like the deploying of slash commands? i wanna keep less stuff in my index as possible

rain heart
#

sure

lament terrace
#

Was there a update to the docs I can no longer find how to access the server count?

rain heart
#

Nope, still there were it was previously at

gloomy crypt
#

I have this error;

FetchError: request to https://top.gg/api/bots/stats failed, reason: getaddrinfo ENOTFOUND top.gg
    at ClientRequest.<anonymous> (/home/xxx/Documents/code/Bots/public/Paradise/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:512:28)
    at TLSSocket.socketErrorListener (node:_http_client:496:9)
    at TLSSocket.emit (node:events:512:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND'
}
gloomy crypt
#

@rain heart.

restive otter
#

And where is your bot ID in the request as the documentation says?

#

It's api/bots/:bot_id/stats

vocal chasm
#

how can we setup server vote tracking system.
like if anyone vote our server it will log in a channel
like bot voting track system

#

because i can't find server webhook api

rain heart
#

Server-based webhooks work the same way as bot-webhooks, just with a different format provided. Refer to the webhooks docs @ https://docs.top.gg

Top.gg documentation

Welcome to Top.gg

rain heart
#

and getaddrinfo ENOTFOUND top.gg means that your server was unable to either resolve the DNS top.gg or reach out to the IP that is behind top.gg

gloomy crypt
rain heart
#

so more related to your server's connectivity, try making a wget https://top.gg

#

Aswell as posting your code please

gloomy crypt
#

It is working fine now. It was only that one. And I took the boilerplate code.

rain heart
#

then that error is related to a timeout

gloomy crypt
#

It is using the autoposter.

rain heart
#

a timeout from the recent site issues is what I'm referring to

gloomy crypt
#

Oh.

#

Well that would explain the mass 503 errors.

#

That I have ignored as I got no ping about them.

#

Your API goes down an awful lot. Maybe it should be rewritten along with the entire backend or site.

I say this because it seems very unstable with the amount of errors that are present.

jaunty plank
#

A production site the size of topgg would take a lot of time to rewrite it, especially with having such a small dev team

gloomy crypt
#

If you need more people on the development team, open applications I say.

jaunty plank
#

👀 and pay them with what money?

gloomy crypt
#

If you really need this to be with how bad it has gotten. I am willing to help do it for free. If of course you are willing to give me access.

whole lotus
#

maybe students apply

jaunty plank
#

Honestly, I doubt it's even possible for us to offer it free.

whole lotus
#

but professionals? hard to say

jaunty plank
gloomy crypt
#

No need to offer it. I am willing to do it for free.

#

Every little helps.

whole lotus
#

a senior comrade works for free only if it's for his own projects.

#

I speak for myself :P. I would never work for free on a project that isn't even mine.

jaunty plank
#

I've been developing websites for years, and I don't think I have the qualifications.

Especially with the product stack being quite a few programming languages

jaunty plank
gloomy crypt
restive otter
#

can I see some of your works

gloomy crypt
#

Most of my work is work related, and is private.

whole lotus
#

people with more experience have their unversioned side projects. would hardly get into a project that is not his or that is being paid for it

#

you are at a crossroads lol

restive otter
gloomy crypt
#

That is what you think.

restive otter
#

also a lil bit off topic, is this your main discord account?

gloomy crypt
#

Not what you see

restive otter
#

seems like an alt

restive otter
gloomy crypt
#

It is very much so aside my alt.

#

Work account if you will.

restive otter
#

I could apply too, but will be rejected

gloomy crypt
#

¯_(ツ)_/¯

#

I only offered.

restive otter
#

seems like they declined it

#

respectfully

jaunty plank
#

Declined what? Job application?

restive otter
#

the offer

jaunty plank
#

All of mine got declined

whole lotus
#

I've been working with web/mobile development for over 10 years, there comes a point where language is irrelevant. Languages are just forms of different syntaxes.

restive otter
restive otter
jaunty plank
restive otter
#

but yeah I don't think Top.gg would hire any of us

restive otter
#

tbh I'm working free rn as a library contributor

jaunty plank
#

Our backend is c++ iirc.
So at minimum that would be needed as a language

restive otter
#

just waiting for them to review my contribution

whole lotus
#

i'm working in a crawler discord bot for curiosity

whole lotus
#

its been fun

#

good work/sutdy for all

jaunty plank
#

Yeah

restive otter
#

so that explains why its so messy rn

#

also happy bday

mossy thicket
pliant sable
#

my bot listing shows an old pfp, how can i resolve this?

restive otter
#

Unrelated to the API

swift moon
#

How can i get a "API Token"?

restive otter
#

Bot Page > Edit > Webhook

restive otter
#

Hello, yesterday, i got an API key. today i got an error '503 unavailable', resetted the token and now it says unauthorized, what can i do

tidal idol
#

Website is down, hence why the 503

restive otter
fickle willow
#

hello, i have

@client.event
async def on_dbl_vote(data):
  print(data)
  if data['type'] == 'test':
    print("TESTING VOTE")
  else:
    print("BOT VOTED")

but when my friend voted the console did not print anything

wet seal
#

Python?

fickle willow
restive otter
#

Have you set the webhook URLL to be correct

#

In the bot's settings page on Top.gg

wet seal
#

I am suggesting you to use auth

restive otter
#

That has nothing to do with it

fickle willow
#

must i use webhook, so just setting up client.topggpy = topgg.DBLClient(client, dbl_token) wont work?

restive otter
#

Well, votes are sent via webhooks

#

So yes, it is a must

fickle willow
#

ah, how do i get a webhook url tho? not faimilar with this part

restive otter
#

^

fickle willow
#

thanks : )

restive otter
#

how to get "topgg_auth""topgg_api""topggWebhook_auth"

fair osprey
#

?

restive otter
#

thees no webhook ur; and auth

#

@chrome pier

runic creek
#

Because you have to set it

#

Read the pinned messages and you'll understand what's going on

fickle willow
#

Can I know exactly when a user voted for my bot with api endpoints in python? Or the only way is using the on_dbl_vote event with a webhook because I want to reward users but I can't make sure that they don't repeatedly claim the reward

restive otter
#

Webhook

inner pelican
#
axios({
    method: 'get',
    url: `https://top.gg/api/bots/${clientId}/check?userId=${userId}`,
    Headers: {
      "Authorization": topGgAuth
    }
  })
  .then((response) => {
    console.log(response)
  })
``` i have this code to try and check if a user has voted for my bot however it always returns unauthorised

when i go to the same url but just in my browser it works
rain heart
#

going to your browser is correct behaviour as it uses your authorization

#

go to your webhook section, press "regenerate token" and then refresh the page

#

the token you then see is the valid one

inner pelican
#

just regenerated it and i still get the same error

#

now i changed my code to this and get forbidden ```js
axios({
method: 'get',
url: https://top.gg/api/bots/${clientId}/check?userId=${userId},
headers: {
"Authorization": topGgAuth
}
})

rain heart
#

then "topGgAuth" is not the correct token

#

aka is empty

#

also ensute that the clientId is indeed your bot and not a different one, as you can only make requests to your own bots endpoint and not a different

inner pelican
#

nvm got it working

spring oriole
#

Can you send the code that sends a message to the channel when top.gg is voted for node.js, I really need it please

plucky lance
#

It's up to you to write your own code

#

The API docs already give you an example and idea how it works

queen terrace
restive otter
#

log tgg and see if it is valid

rain heart
#

Press regenerate token, refresh the page, use the one you see now

queen terrace
#

just retried with the token stroked badly

#

still same issue

#

the autoposter works and it uses same token

rain heart
#

And you're copying the whole token and not part of it?

#

then your token isnt properly being passed on your code

fair osprey
#

I just make a simple proposal:
But why not implement (like Discord) in the headers the number of maximum requests, the number of remaining requests, and the time when the rate limits resets?
It would be much easier to handle rate-limiting with the libraries

fresh wing
#

I'm not being able to regen the token for my bot api, it just says "success" and ends up giving me the same one and also I'm getting this error 401 for the same piece of code I used to upload stats successfully about an hour ago

#

It worked before I regened the token, the new token doesn't show up even if it was generated

rain heart
#

regenerate, refresh the page, use that token

fresh wing
rain heart
#

the first part of your token is always the same

fresh wing
#

let me try again

#

still failed with status code 401, it gave me a new code this time

rain heart
#

then cant help

#

try it out using postman or just a dummy application to ensure the token is right

#

or you're not passing it through correctly

fresh wing
#

welp, I used the same exact code before regening the token for the first time and it worked normally. let me try postman

rain heart
#

Also providing content type json?

fresh wing
#

hold up, the api key before regenerating worked

#

so in conclusion this feature doesn't work

rain heart
#

It does work

#

Click, refresh page, get a fresh token

fair osprey
fresh wing
#

Just tried again, the same code after regenerating, started working after 2 minutes

#

I'm not sure what's going on, did that like a few times the old one worked. Just redid the same thing again and the new one works

#

thank you

#

the exact same stuff, 3 minutes apart

rain heart
#

have

#

you

#

set the content type to json

fresh wing
#

but oh well, it works now, thanks!

jaunty plank
#

The api expects it to be set

fresh wing
#

so you mean it may not work if it's not set? basically working always when it's set right

fresh wing
# fresh wing

I set it in this with the new token after refreshing, didn't work.

fresh wing
rain heart
#

they're using the library, which does it itself

trail edge
#

I am getting a error in this file

#

Error: TypeError: topgg.getVote is not a fuction

#

@jaunty plank @rain heart really sry for ping can u guys help

rain heart
#

no i cannot

trail edge
#

Ok

plucky lance
#

getVote(...) obviously doesn't exist

#

Isnt the function called hasVoted()?

#

I think so

#

Where do you even get this method name from?

trail edge
#

I thought it's getVote

jaunty plank
#

Yeah sorry, I cant help for awhile 😦

trail edge
#

Np

#

You someone who can help?

restive otter
#

Read the documentation

trail edge
#

503 service unavailable

restive otter
#

503 are server errors

#

So you can't do anything besides trying again later

#

The website is also does at the moment, so try again in a few hours

trail edge
#

Ohk thats maybe because my bot is added today

restive otter
#

No, as I said it's a server error

#

Nothing you can do besides waiting

trail edge
#

Ohk

#

You are Flantic Developer right?

restive otter
#

No

trail edge
#

But your name is similar

restive otter
#

Not a bot developer at all

trail edge
#

Ohk

restive otter
#

Similar name doesn't imply similar person sunglasscat

trail edge
#

Hehe i fixed the error

#

🙂

#

It wasn't getVote it was .getVotes

#

Stil thanks Krypton

#

I found from the link you gave

echo hound
#

Hey

#

How do I make a bot that gives an automatic rank to the person who votes

restive otter
#

Also pinned messages in this channel

echo hound
restive otter
#

In the "Libraries" section on the documentation you can choose the language you use & see examples

#

The webhooks section is for you to learn how to use webhooks

echo hound
#

I am an Arab I don't understand much English

restive otter
#

And the pinned messages here explain how things work w/ examples

restive otter
echo hound
restive otter
#

Then we can't help

fair osprey
#

If you use PHP i can help you, otherwise I can't

sudden smelt
#

how can i make vote notifications were when someone votes it is sent to a channel?

restive otter
pulsar adder
#

How do I fix authorization issue with password

jaunty plank
#

👀 I dont know what you mean by that

pulsar adder
#

Nvm I found a fix, it was just returning an error cause it was being a dor dor

#

But new issue, when someone votes my bot, a message isn't sent to the webhook, how do I fix this

jaunty plank
#

You're not using a discord webhook correct?

random sigil
#

hey, I'm using the python-sdk, and the autoposter isn't doing anything

restive otter
#

unfortunate

random sigil
#

indeed

#

just wanted to let everyone know about my personal problems

restive otter
#

Thanks for sharing them Prayge

random sigil
#

np

#

btw, if anyone is curious of that personal problem, I just used the direct api to fix my problem 👍

fair osprey
#

However, I need an official response that I will apply without reply, preferably from a moderator:
Is using an undocumented but very common endpoint that is used by all top.gg clients, for a purpose that mirrors what it was created for, using documentation that is guessed by simply analyzing the requests that top.gg makes, however alerting the user that that part of the library is "abusing" an endpoint and that it is not remotely safe to use it, legal or not?

restive otter
runic creek
fair osprey
#

so DeepL sometimes helps me

#

(for example for long messages / important messages I use DeepL because I can make mistakes)

#

anyways sorry

restive otter
#

Legal? Don't know but you probably won't get sued in court for making a request to an endpoint.

Simply don't expect consistency nor you will get any support for what you will be doing.

fair osprey
#

Oh, i know that i'm not supposed to expect consistency or support about this endpoint but i was asking only if it was legit because i may insert this in the library

restive otter
#

What is even the endpoint's purpose

fair osprey
#

https://top.gg/api/search
You can imagine by yourself (i think)

#

oh sorry i was just forgetting

restive otter
#

Doesn't the API have that endpoint already?

fair osprey
restive otter
fair osprey
rain heart
restive otter
#

Yeah well then you probably won't get sued for making a request to that endpoint

rain heart
#

a user-based endpoint is not an api endpoint, especially if not documented and shouldn't be used for libraries

#

yeah you wont get sued, but its still undocumented and a user facing one, essentially considered scraping

fair osprey
restive otter
#

Scraping is pretty different tbf

#

Far from being scraping

#

I personally wouldn't do it, if you want to go ahead I guess

rain heart
#

theoretically scraping is using endpoints that are:

  • undocumented
  • often used by user clients (such as normal site navigation)
    doesnt need to be directly involved with reading the html site content
restive otter
#

No, scraping is more mass data gathering

#

That is just simulating a user's normal interaction which isn't scraping

fair osprey
rain heart
#

scraping is that too, since you're not interacting with an api endpoint thats documented

restive otter
#

Then every browser is doing scraping which shouldn't be allowed bravemmlol

rain heart
#

thats a user interaction, browser-used API endpoints

#

should I consider "reading top.gg's undocumented API endpoints" as selfbotting then? is essentially the same as reading official ones amirite

restive otter
#

Well either way, to answer your question @fair osprey; Do what you want, you won't get sued for doing a request to an endpoint and providing it to others.

rain heart
restive otter
#

Just don't expect it to become the official PHP library

rain heart
#

the docs still refer to a newer version ||for probably the past 2-3 years now|| of the API, which might contain that endpoint of not, I dont develop the api endpoints

restive otter
#

I'd rather make it a suggestion and wait for it to be official, though it will take ages to become implemented so yeh

fair osprey
#

Perfect, thanks you guys for the answers, I'll update the library removing this funcionality and i'll make an extension for this which won't be official

#

:D

#

anyways

#

PLEASE check out my pr because I've been working on it a lot

restive otter
fair osprey
#

damn github

#

WHY DO YOU NOT SEND ME NOTIFICATIONS

#

WHYYY

rain heart
#

github being github

fair osprey
#

F

restive otter
#

The thing with 'renews' is that they may not be needed if it works fine at the moment

#

Though with caching not being in the current implémentation it's definitely better

fair osprey
#

I was forgetting

restive otter
#

Yeah it's pretty weird

#

Also not sure what the .idea folder is doing there

fair osprey
restive otter
#

PhpStorm yeah

#

Though that should not be pushed in a GitHub repository

#

Sometimes it should be, but those files are pretty much irrelevant and have no point on being pushed

fair osprey
restive otter
#

Yeah, you can remove that kek

fair osprey
restive otter
fair osprey
#

true

#

anyways i just removed it

#

and...

#

I appreciate your time and effort but this is probably better off as a third-party library. There have been no changes to our API that would justify pushing out breaking changes.

I still think your work would be useful as an alternative to this one though so people have the option. Feel free to offer it as a third-party sdk! 🙏

#

F for the caching system

restive otter
#

Yeah it's pretty much understandable

fair osprey
restive otter
#

I mean, you can always try to make it more popular - eventually make a PR to get a link on the current PHP library page on the documentation website

fair osprey
#

true but now i need to cry with DeepL

fair osprey
#

i should wait an opinion from they

fair osprey
restive otter
#

Yeah then try to make your library to have a better SEO when searching for "Top.gg php library"

#

Can have your own documentation site hosted on GitHub pages as well

#

Because people shouldn't really use that outdated library

#

I cannot understand how can I authorize to use the Api

#

Nor it should be encouraged for people to use it

restive otter
#

Where can I add this header? In my code?

#

Yes

#

Alright

#

Ty

pulsar adder
#

Well, yes and no.

#

Yes because my bot requires a webhook request to be made to send the message, and no because it's a custom url that I'm using in top.gg

unkempt dust
#

yo

#

im using the topgg webhook listener api right now

#

nothing happens when someone votes

#

and im using the exact same code from the docs

#

(I changed the auth to my webhooks auth)