#topgg-api

1 messages · Page 104 of 1

grizzled coral
#

wait wrong channel

queen fossil
#

@tardy sandal 4 - 6 weeks alrightythen risitasHaHAA risitasHaHAA

stable moat
#

Hy

#

I m new to this server.

round oak
#

Hello

#

Also

#

||That i'm need waiting 4 - 5 months||

#

||but now is approved||

solid wharf
hollow lichen
#

Is there any dbl vote tracking code written using discord.js? When someone votes, they will send a thank you message to the channel I chose.

median badger
#

use the api

vivid mirage
#

anyone here know the command code for memes

sonic forum
fierce silo
#

how do i make a vote leadorboard...
is there a method to list everyone who has voted

charred scarab
#

How to DM a user when he/she is voted?

austere swallow
#

there is an endpoint to fetch the latest votes (I think up to 1000) of the bot, but when you bot gets more votes (1000 a month iirc), you will need to switch over to using webhooks instead

charred scarab
#

||If there is no body answer I will go to Among Us||

austere swallow
#

@charred scarab the easiest way would be to setup a webhook listener for top.gg votes, and then every time a user votes you can have it dm the user

#

implementation depends on the library that you are using, but generally I think in js and py it should be relatively easy to setup

#

there is an endpoint to fetch the latest votes (I think up to 1000) of the bot, but when you bot gets more votes (1000 a month iirc), you will need to switch over to using webhooks instead
@fierce silo adding on to my point, if you want to use webhooks you will need to maintain your own list of votes, such as using a database to store who has voted and when, so that you are able to obtain the recent votes of your bot.

#

Also, the libraries that you are using might have convenient functions to access these values

fierce silo
#

im using js

#

and i think just thru the bot without a webhook should be fine for me

austere swallow
#

if you are using the official top.gg js api library, the method will be db.getVotes()

#

although when your bot gets more votes in the future (or if you want to get more than 1000 votes), using a webhook system is mandatory

inner venture
#

@lofty pebble How many shards do you have?

#

oh

#

im way behind wtf

lofty pebble
#

fixed

inner venture
#

or did you just delete it

#

lol

#

were you posting your bots guild count for each shard?

lofty pebble
#

yep

tiny musk
#

||sa||

polar ocean
#

hi

versed junco
#

how do I get a user voting

#

if that doesnt work

#
dbl.getVotes().then(votes => {
        if (votes.find(vote => vote.id == message.author.id)) {
            // code here
        } else
            var embedtwo = new Discord.RichEmbed()
                .setTitle('Error')
                .setDescription("You must be a bot voter to use this command. https://top.gg/bot/663898249538568243")
        message.channel.send(embedtwo)
    });
#

but I get
TypeError: dbl.getVotes is not a function

#

I also trued hasVoted

restive otter
#

@versed junco first of all, this is development question, second of all, update to V12

versed junco
#

ok

#

thanks

patent cloak
#

what are you supposed to put in the "webhook_path" on the webhook? do you create a folder or a file or something, idk (cc @restive otter)

scarlet cobalt
#

One message removed from a suspended account.

hearty jacinth
#

Is therea top.gg api for voting bots?

rapid kettle
#

@hearty jacinth do you mean vote for bots?

hearty jacinth
#

Ye like how bots have a reward for voting

rapid kettle
#

There’s webhooks

hearty jacinth
#

Yea whatever is there a api for doing something like giving a person xp for example when they vote?

rapid kettle
#

Yea

hearty jacinth
#

Name?

rapid kettle
#

The webhooks

hearty jacinth
#

Ah

sullen nymph
#

@restive otter it was related to dblapi.js even if the error wasn't

#

@patent cloak still looking for an answer?

patent cloak
#

@patent cloak still looking for an answer?
@sullen nymph someone said “the webhook token”but yeah i’m still unsure

sullen nymph
#

It's the thing after your domain/IP and port

#

Must start with /

patent cloak
#

ah ok, and with the port, on my vps do i need to do anything to open it? or am i good to just put the d.py example and modify it as much as i need to

true talon
#

@patent cloak

sullen nymph
#

ah ok, and with the port, on my vps do i need to do anything to open it? or am i good to just put the d.py example and modify it as much as i need to
@patent cloak open port with ufw if it's Linux

#

also make sure no firewall is blocking requests

#

for local hosts it's the same tbh

hollow mountain
#

where can i find my DBL token

compact creek
tardy night
#
(node:1600) UnhandledPromiseRejectionWarning: Error: 401 Unauthorized
#

how can I start my authorization of dblapi.js?

twilit gale
#

How to make ping command ?

#

⚔️

plush ore
#

okay 2 things

#

1 that's the most basic feature to create and pretty much every tutorial has that command

#

2 development support in #development this is for api support

#

-api

abstract mothBOT
#

TOP.GG API ONLY!!!
ANY OFF-TOPIC CONVERSATION WILL BE DELETED AND MUTED
This channel is only for SUGGESTIONS/HELP/BUGS to do with OFFICIAL API LIBRARIES and API DOCS found at: https://top.gg/api/docs

viral veldt
#

im testing my webhooks and i dont see any of the JSON Params listed in the docs.
i cant find where isWeekend and user is located

brazen blade
#

Alguém do Brasil T^T

rapid kettle
#

@viral veldt did you try logging it?

viral veldt
#

yes

#

both res and req

rapid kettle
#

what'd you see?

viral veldt
#
 IncomingMessage {
0|Counting-API  |   _readableState: ReadableState {
0|Counting-API  |     objectMode: false,
0|Counting-API  |     highWaterMark: 16384,
0|Counting-API  |     buffer: BufferList { head: null, tail: null, length: 0 },
0|Counting-API  |     length: 0,
0|Counting-API  |     pipes: null,
0|Counting-API  |     pipesCount: 0,
0|Counting-API  |     flowing: null,
0|Counting-API  |     ended: false,
0|Counting-API  |     endEmitted: false,
0|Counting-API  |     reading: false,
0|Counting-API  |     sync: true,
0|Counting-API  |     needReadable: false,
``` etc
#

i did a find and replace for isWeekend and bot with no results

rapid kettle
#

ahh

viral veldt
#

and the body was empty

rapid kettle
#

try logging res.body

viral veldt
#

i did

rapid kettle
#

what did it come out as?

viral veldt
#

and the result was {}

rapid kettle
#

oooh

#

express?

viral veldt
#

yup

rapid kettle
#

i see

#

are you parsing it?

#

like do you have an app.use(express.json()) below the app declaration?

viral veldt
#

nope

#

i have app.use(cors(), bodyParser.urlencoded({extended: true}));

rapid kettle
#

you need to use express.json() or bodyParser.json()

viral veldt
#

thank you

#

it worked

rapid kettle
#

oh and its req.body too

silent pilot
#

Is it allowed for me to require someone to vote before they can setup my bot?

viral veldt
#

nope

rapid kettle
#

nope

silent pilot
#

K

silent pilot
#

Where do I find the api to find votes on my bot

#

?

restive otter
#

Where do I find the api to find votes on my bot
@silent pilot isn't it obvious...no?

sullen nymph
golden adder
#

I'm not passing the client to the post stats. Instead I'm getting the total guild count across shards and posting that. It works 95% of the time but once or twice it has done this instead. Any reason why?

#

People with sharded bots, how do you post your server count to DBL?

#

Server count should be 2,412

royal veldt
#

?tag

#

-api

#

-help

#

.help

dawn topaz
#

How long does it typically take for top.gg to have counted a vote (as in, my bot can read hasVoted for that user)

#

Curious because right now my bot takes about a minute or two before it sees that person has voted

true talon
#

@golden adder you gotta post the stats for each shard

#

@dawn topaz up to 5 or 10 mins

dawn topaz
#

I see, so it's not my bot, that's good.

golden adder
#

@golden adder you gotta post the stats for each shard
@true talon 🤔 but I don't want shard count on my DBL page

true talon
#

if your bot is shared you're kinda forced to

empty jay
#

-api
@royal veldt do you need help or something dude?

royal veldt
#

@royal veldt do you need help or something dude?
@empty jay nah i got it figured out

empty jay
#

🤦‍♂️

dusty crater
#
const DBL = require("dblapi.js");
const dbl = new DBL('eyJhbGciOiJIUzI1NiIsInR5cCI6IXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXr3ZUaY7eXjyHb3JqCptFOJPbdC5pzGIGi1fcKc', { webhookPort: 5000, webhookAuth: 'password' }, bot);

// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});```
#

i didnt get

#

anything in console

willow spindle
#

nice token leak@dusty crater

empty jay
#

it's not even a legit token

willow spindle
#

Oh wait

#

im on mobile. Didnt see that

dusty crater
#

@empty jay i removed

#

it

#

to avoid a leak

empty jay
#

don't ping me...I was telling them its not a legit token

dusty crater
#

oof

#

ok

#

sry

restive otter
#

hi, is there only a vote api for bot? I need to know if theres an api for server votes

daring anvil
#

hey bro

mental seal
#

Hello @restive otter, who u make the system for ur server?

tardy stone
#

Guys can you please help me
How to paly songs in someone's discord server

#

Play*

willow spindle
#

not related with top.gg's api @tardy stone

#

@restive otter for server votes you can use webhooks

tardy stone
#

What is webhooks?

restive otter
#

@willow spindle ugh? ive read it was for bot votes

willow spindle
#

go to server's page > Edit > scroll down

restive otter
#

aight thanks

silent pilot
#

@silent pilot isn't it obvious...no?
@restive otter nope. I can’t find the code to find votes

hearty tiger
#

how do i make it show servers?

#

or is that not posible

dusty crater
#

http://0.0.0.0:5000/dblwebhook

#

is this url correct

#

that is what it shows in the logs

sullen nymph
#

Replace 0.0.0.0 with your IP address when entering the URL anywhere

hearty tiger
#

uh

#

@sullen nymph whihc 0.0.0.0 are u talking about?

sullen nymph
#

That wasn't directed at you

hearty tiger
#

oh

#

lol

sullen nymph
#

😁

hearty tiger
#

where can i find the post server count thingi

sullen nymph
#

You might want to use dblapi.js, the official top.gg library

hearty tiger
#

i am there but

#

Its under which section

dusty crater
#
Webhook running at http://0.0.0.0:5000/dblwebhook
Hi, Red Sparrow Admin is now online!
Server count posted!```
#

y is this

#

0.0.0.0

sullen nymph
#

JS library, recon

#

@dusty crater Consider it a placeholder

dusty crater
#

placeholder?
its not working

sullen nymph
#

Replace 0.0.0.0 with your IP address when entering the URL anywhere

#

0.0.0.0 just says "available on all possible addresses"

dusty crater
#
const dbl = new DBL('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxfcKc',{ webhookPort: 5000, webhookAuth: 'xxxxxxx' }, bot);

// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});```
#

it doesnt work

#

the vote

#

when i try to test it

#

and press test

sullen nymph
#

DM the URL you entered and Authorization key you use

dusty crater
#

it doesnt log anything

#

ok

hearty tiger
#

@sullen nymph

dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})
```?
sullen nymph
#

what's the code before it

hearty tiger
#
Oops! Error: 401 Unauthorized
#

this means?

willow spindle
#

token is invalid

hearty tiger
#

hm

#

token is valid tho

willow spindle
#

errors don't lie

sullen nymph
#

Eh

#

@hearty tiger reset the token

hearty tiger
#

what do i put in

#
const dbl = new DBL(config.discordBotList, { webhookPort: 5000, webhookAuth: '' });
#

webhookAuth

#

the password?

sullen nymph
#

anything you entered in the Authorization field on top.gg

#

It's a password you create yourself to confirm that the requests are actually coming from top.gg

hearty tiger
#

oh

#

so

#

how do i test whether its working

sullen nymph
#

Actually why are you using webhook

hearty tiger
#

i want to get the votes and then send the user a thank you message :()

sullen nymph
#

Ah, makes sense

hearty tiger
#

yea

#

its spamming null now

sullen nymph
#

the hell

hearty tiger
#

I dont know what I am doing wrong

#
const dbl = new DBL(config.discordBotList, { webhookPort: 5000, webhookAuth: 'authCode' });
const dblClient = new DBL('authCode', client);
dblClient.on('posted', () => {
    console.log('Server count posted!');
  })
  
  dblClient.on('error', e => {
   console.log(`Oops! ${e}`);
  })
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
    const ownerOfZex = client.guilds.cache.get('277105132922208258')
    ownerOfZex.send(`User with ID ${vote.user} just voted!`);
    console.log(vote)
});
#

oh wait

#

i think i put the authCode to token spot

#

🙂

sullen nymph
#

ehh

#

That's not really the issue

hearty tiger
#

yea

sullen nymph
#

well, not for webhooks

hearty tiger
#

that was the issue lol

#

i used the webhook code and put it in the place which is meant for token

#

but i gotta fix webhook ;xx;x

sullen nymph
#

eh well that's one issue fixed

#

Not sure why outputting vote would return null

hearty tiger
#

yea

#

hm

#

so there is a button called test

sullen nymph
#

mhm

#

press save and then test

hearty tiger
#

is there any way to test whether webhook is working

#

like

#

consolelog something

sullen nymph
#

the test button will send a test request

dense basalt
#

You're already logging on the vote event so you're already doing that ^^

sullen nymph
#

the vote event handles both vote and test requests

hearty tiger
#

oh

#

oh

#

the test = vote?

dense basalt
#

The test botton sends a "fake" vote event yes

hearty tiger
#

ohhh

#

when i click test it doesnt log anything

#
dbl.webhook.on('vote', vote => {
    const ownerOfZex = client.guilds.cache.get('277105132922208258')
    ownerOfZex.send(`User with ID ${vote.user} just voted!`);
    console.log('newVote')
    console.log(vote)
});
#

hmm

dense basalt
#

Did you get a DM from the bot?

#
    const ownerOfZex = client.guilds.cache.get('277105132922208258')
    ownerOfZex.send(`User with ID ${vote.user} just voted!`);
hearty tiger
#

no

#

I did not

#

and it didnt console.log('new Vote ') either

dense basalt
#

Did any of the other events trigger?

#

ready or error

hearty tiger
#

webhook.on was triggered

#

and its ready

#

i think

#
Webhook running at http://0.0.0.0:5000/dblwebhook
#

this look ready 🙂

dense basalt
#

And you have the correct URL and Authorization put in your bot's page?

hearty tiger
#

if it was wrong would it still trigger the .on?

dense basalt
#

Yes, the webhook is on your end

#

Sending the request to it is on our end

hearty tiger
#

im using a bot

#

called

#

dblVote or something

#

its possible for 2 users to use it right

#

or was that why the error was happening

dense basalt
#

If you need help with that bot then you need to go to their support server

hearty tiger
#

Yea im using that bot

dense basalt
#

Then go to their support server instead ^^

hearty tiger
#

No, i dont need help with that bot

restive otter
#

Guys it's just a guild id

hearty tiger
#

im just asking cause they are also using the webhook

#

so

#

does it affect the error ?

dense basalt
#

Oh I see

#

No

restive otter
#

you need to send an user/member

dense basalt
#

In the webhook settings on top.gg you need to input the URL your webhook is running and what password you set for it

odd shore
#

Is there anyone who will give registration bot Infrastructure?

hearty tiger
#

here right

dense basalt
#

Yes

hearty tiger
#

yea

dense basalt
#

URL/Authorization

hearty tiger
#

its below

odd shore
#

Is there anyone who will give registration bot Infrastructure?

dense basalt
#

-api @odd shore

abstract mothBOT
#

@odd shore

TOP.GG API ONLY!!!
ANY OFF-TOPIC CONVERSATION WILL BE DELETED AND MUTED
This channel is only for SUGGESTIONS/HELP/BUGS to do with OFFICIAL API LIBRARIES and API DOCS found at: https://top.gg/api/docs

odd shore
#

What

dense basalt
#

Read the embed

hearty tiger
#
const dbl = new DBL(config.discordBotList, { webhookPort: 5000, webhookAuth: 'authCode' });

Is this correct way of using the webhook?

dense basalt
#

Yes

hearty tiger
#

config.discordBotList is

opal kettle
#

How can I get a message in my discord server whenever somebody votes for my bot?

dense basalt
#

Use a webhook

opal kettle
#

Oh alr

hearty tiger
#

config.discordBotList is
@hearty tiger my bot token

#

so its correct?

dense basalt
#

Yes

hearty tiger
#

hm

dense basalt
#

Do you also have your URL input on top.gg?

#

And auth

hearty tiger
#

I have url input too

dense basalt
#

You're not using 0.0.0.0 there right?

hearty tiger
#

is it safe to share it here?

silent pilot
#

what is DBL vote?

dense basalt
#

No

#

Do you have 0.0.0.0 input as the IP on top.gg or not?

hearty tiger
#

its something else

#

vps.something

dense basalt
#

Yeah should be fine then

#

Do you get the "Null" whenever you press the test button?

hearty tiger
#

it doesnt work tho ;x

#

wait

#

lemme try

dense basalt
#

Sure

hearty tiger
#

wait

#

it doesnt log anything when

#

wait it logged now

#

6 nulls

opal kettle
#

what should be the auth code of the webhook if i want it to send a msg in a channel of my server whenever somebody has voted for my bot?

dense basalt
#

Anything you want

#

You set that yourself

hearty tiger
#

and it start spamming null 😭

dense basalt
#

Just make sure it's also the same on your webhook

#

@hearty tiger debug, console.log "1" on the ready event, "2" on error, "3" on vote, etc...

#

Then test and see what's it's spamming

hearty tiger
#

ok

opal kettle
#

should i keep the port to 5000?

#

i mean the webhook port

dense basalt
#

That's up to you

#

If you have nothing running on port 5000 then that's fine

opal kettle
#

alr

hearty tiger
#
dbl.webhook.on('vote', vote => {
    console.log('2')
    const ownerOfZex = client.guilds.cache.get('277105132922208258')
    console.log('3')
    ownerOfZex.send(`User with ID ${vote.user} just voted!`);
    console.log('4')
    console.log('newVote')
    console.log(vote)
});
#

for this

#

it doesnt log 2,3,4 when i click test

opal kettle
#

and how can i see which channel it'll send the msg in when somebody has voted?

hearty tiger
#

use the vote event

dense basalt
#

@opal kettle on the vote even you can do whatever you want, DM the user to thank them for the vote, DM yourself that you got a vote or send it a specific channel

hearty tiger
#
dbl.webhook.on('vote', vote => {
}
#

but mine isnt working for some reason 😦

opal kettle
#

on the vote even you can do whatever you want, DM the user to thank them for the vote, DM yourself that you got a vote or send it a specific channel
@dense basalt alr i understand

dense basalt
#

@hearty tiger nono, do it per event, so "1" on the ready event, "2" on the error event, "3" on the vote event, etc..

hearty tiger
#

@dense basalt isnt both of them different

dense basalt
#

Not sure what you mean by that

hearty tiger
#

defined the other one as dblCLient for posting server

#

does that relate too?

dense basalt
#
const dbl = new DBL(config.discordBotList, { webhookPort: 5000, webhookAuth: 'authCode' });
const dblClient = new DBL('authCode', client);
dblClient.on('posted', () => {
console.log("1")
  })
  
  dblClient.on('error', e => {
console.log("2")
  })
dbl.webhook.on('ready', hook => {
console.log("3")
});
dbl.webhook.on('vote', vote => {
console.log("4")
});
#

I meant like this

#

(Ignore the bad formatting, Discord sucks)

#

Like this, you will know what event is being spammed

#

And if you test your vote and it logs "4" then you know it works

hearty tiger
#
(node:32128) UnhandledPromiseRejectionWarning: TypeError: command.run is not a function
#

uh

dense basalt
hearty tiger
#

so it goes like this

dense basalt
#

at Client.<anonymous> (C:\Users\LXPC\OneDrive\Documents\GitHub\Zex Discord Bot\events\message.js:63:17)

#

What is on that line

#

message.js:63:17

hearty tiger
#

the dark line

dense basalt
#

Seems like Null is being caused by something in your message event

sullen nymph
#

wait

#

why two clients

hearty tiger
#

one for server posting one fore webhook

#

arent both of them different

dense basalt
#

Creating two clients is fine, he doesn't provide his Discord client to the first one which means that one doesn't post stats

hearty tiger
#

sapmming null....

dense basalt
#

What if you remove the DBL part, does it still spam it?

hearty tiger
#

o

#

let me try

#

its spamming my bot username in lowercase lol

dense basalt
#

Well fix that first and then come back for support with the top.gg API

hearty tiger
#

yeaa

dense basalt
hearty tiger
#

when i comment out the dblClient

#

it stop spamming null

#

@.Kyoso

#

;_

dense basalt
#

Did you replace authCode with your actual token here

const dblClient = new DBL('authCode', client);
hearty tiger
#

yea

#

i did

#

wait

#

lm check

#

i used bot token

dense basalt
#

You need to use your top.gg token

hearty tiger
#
Zex#0023 has logged on
(node:38312) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 messageDelete listeners added to [Client]. Use emitter.setMaxListeners() to increase limit
null
null
null
null
null
null
null
null

dense basalt
#

Like you do in your other DBL client

hearty tiger
#

nvm its sapmming null again

dense basalt
#

config.discordBotList

hearty tiger
#

config.discordBotList is the auth

#

oh wait

#

no

#

its the token

dense basalt
#

Do you have your top.gg token or your bot's token as "authCode"

hearty tiger
dense basalt
#

Hm not sure then

opal kettle
#

how can i check my bots total votes?

#

i mean i want to make it display on an embed

#

and send it to me whenever somebody votes it'll also show the total votes of my bot

#

is it something like 'bot.votes'?

#

anyone?

twilit gale
opal kettle
#

ping?

twilit gale
#

@opal kettle When my bot will checked -_- I uploaded more than 30 hours ago !

opal kettle
#

how will i know?

#

i waited for more than a month

twilit gale
weak wyvern
#

I need help, my djs bot says an error while connecting

#
const dbl = new DBL('my token', client);
                                                                                                                                                                                   ^

ReferenceError: Cannot access 'client' before initialization
    at Object.<anonymous> (/home/container/server.js:3:180)
#

@opal kettle When my bot will checked -_- I uploaded more than 30 hours ago !
@twilit gale Bruh

#

I waited more than 3 moths

opal kettle
#

why ping me lmfao

#

use blapi

#

to post data

lunar helm
#

why npm i discord.py doesn't work?slonk

opal kettle
#

idk about python but i think its pip instal discord.py

lunar helm
#

XD

#

I know

#

was a joke...

opal kettle
#

lmao

lunar helm
#

I don't have any role in this server ):

weak wyvern
#

https://npmjs.com/package/blapi @weak wyvern
@opal kettle Thank u

#

And do u know why my discord.py bot os getting this error?

#
Failed to post server count
Forbidden: Forbidden (status code: 403)
Traceback (most recent call last):
  File "/home/runner/Botxd/cogs/TopGG.py", line 29, in update_stats
    await self.dblpy.post_guild_count()
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/dbl/client.py", line 142, in post_guild_count
    await self.http.post_guild_count(self.bot_id, self.guild_count(), shard_count, shard_no)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/dbl/http.py", line 169, in post_guild_count
    await self.request('POST', '/bots/{}/stats'.format(bot_id), json=payload)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/dbl/http.py", line 143, in request
    raise errors.Forbidden(resp, data)
dbl.errors.Forbidden: Forbidden (status code: 403)
opal kettle
#

idk py

#

I only know js

weak wyvern
#

Ah ok

lunar helm
#

What doing blapi? (Sorry for my english, i'm not english)

sullen nymph
#

You're trying to post stats for a bot that's not listed

#

What's your dblpy version?

opal kettle
#

what does error code 1006 mean?

weak wyvern
#

What's your dblpy version?
@sullen nymph How to see

lunar helm
#

I don't know ):

weak wyvern
#

You're trying to post stats for a bot that's not listed
@sullen nymph My bot is listed, @upbeat surge

#

But turned off, bq it cannot start, is getting the error

lunar helm
#

I'm so sorry

sullen nymph
#

pip show dblpy

weak wyvern
#

Ah

#

version 0.4.0

#

Name: dblpy
Version: 0.4.0
Summary: A simple API wrapper for top.gg written in Python.
Home-page: https://github.com/top-gg/DBL-Python-Library
Author: Assanali Mukhanov, top.gg
Author-email: shivaco.osu@gmail.com
License: MIT
Location: c:\users\vps\appdata\local\programs\python\python38-32\lib\site-packages
Requires: discord.py, aiohttp, ratelimiter
Required-by:

opal kettle
#

what does error code 1006 mean?
does anybody know?

sullen nymph
#

uhhh

#

I...

#

Don't remember if that's the latest version

#

so just try pip install -U dblpy and try again

weak wyvern
#

Ok

#

Works

#

Thanks @sullen nymph

#

I still need help

#

I need help, my djs bot says an error while connecting

const dbl = new DBL('my token', client);
                                                                                                                                                                                   ^

ReferenceError: Cannot access 'client' before initialization
    at Object.<anonymous> (/home/container/server.js:3:180)
sullen nymph
#

What's your code like

weak wyvern
#

What's your code like
@sullen nymph Wait

paper seal
#

Try to add the line
const dbl = new DBL('your token' , client);
in exports.run

#

@weak wyvern

jagged pine
#

He declared const client = new Discord.Client() after the code he sent probably

median badger
#

npm i python

restive otter
#

Hello @restive otter, who u make the system for ur server?
@mental seal i added a webhook URL on my DSL server edit page and the URL is just a POST request to /dsl_webhook route in my express.js server that checks if the request is from top.gg and sends a message in my guild if it is a valid DSL vote

big brain time bois

frank parcel
#

Hey everyone. How is your day going?

versed storm
solid wind
#

Hi

mental seal
#

@mental seal i added a webhook URL on my DSL server edit page and the URL is just a POST request to /dsl_webhook route in my express.js server that checks if the request is from top.gg and sends a message in my guild if it is a valid DSL vote

big brain time bois
@restive otter Wow, i goes try, thank u hihihi

jagged axle
#

uwu

gloomy steppe
#

pee

spare flame
plush ore
solemn gate
#

npm install dblapi.js
npm ERR! Unexpected token in JSON at position 0 while parsing near

#

i have this error

latent dome
#

You need inser your bot token x)

willow spindle
#

?

lyric hinge
#

!among us

median badger
jagged pine
#

This has autopost right?
client.dbl = new DBL(apiKey, client);

glad scroll
#

yea

#

it does iirc

molten rover
#

How to specify the correct servercount when using shards? Currently only the servercount of a single shard is displayed

rapid kettle
#

you post it yourself

#

using dbl.postStats()

#

dbl.postStats(<guild amount>, <shard ID>, <shard total>)

molten rover
#

with an interval?

rapid kettle
#

yes

#

you can also just post guild amount

#

if u want

molten rover
#

ok, thanks ❤️

#

where can I get the shard Id? @rapid kettle

rapid kettle
#

what library?

molten rover
#

discord.js

rapid kettle
#

<client>.shard.ids

molten rover
#

but this is an array...?

rapid kettle
#

it works for me

molten rover
#

ok, thanks 😄

solid marten
#

I just got a raspberry pi and i want to convert my stuff to the pi. I use discord.js What do i do once i tranfrer the files? so i have to download the packages

median badger
#

yes

#

and use something like pm2

#

i suggest watching the video

solid marten
#

Ty

brisk zenith
#

client netwirk sockt disconnected before secure tls connection was established

wild cargo
#

How can I send a test upvote to check it works?

trail sigil
#

click 'test webhook' on the edit page

wild cargo
#

tyvm

wild cargo
#
self.dbl = dbl.DBLClient(self.bot, token, autopost=True, webhook_auth="snacc")
#
@commands.Cog.listener("on_dbl_test")
async def on_dbl_test(self, data):
    print(data)
#

I am not getting anything. What am i missing?

patent cloak
#

i think you are missing webhook_path @wild cargo

wild cargo
#

It defaults to "/dblwebhook"

patent cloak
#

oh then idk, the api is confusing to me lol

wild cargo
#

I have no idea why it isn't working

#

self.dbl = dbl.DBLClient(self.bot, token, autopost=True, webhook_port=10010, webhook_auth="snacc")

#

I can see the request in my server logs but the dblclient doesnt do anything

lost plaza
#

Transfermarkt APIsi olan var mı

restive otter
#

i put http://my.IP.Address:5000/dblwebhook

#

and it still logs https://0.0.0.0:5000/dblwebhook

true talon
#

@restive otter the logs displays 0.0.0.0, but it should still works

restive otter
#

i pressed test and nothing happens

true talon
#

make sure port is open

restive otter
#

how eyes3

true talon
#

that your pass is correct

restive otter
#

pass is correct i know that for a fact

true talon
#

idk how to open a port sry

#

Google could help ig

charred scarab
#

@charred scarab the easiest way would be to setup a webhook listener for top.gg votes, and then every time a user votes you can have it dm the user
@austere swallow how to do it ...

nocturne aurora
#

now how do you do a setData trigger every time someone votes?

sullen nymph
#

Whatever setData is

#

You need a webhook

paper acorn
#

Anybody can make a bot for me

worn vault
#

and bruh make ur own bots

nocturne aurora
#

oo

jagged pine
#

Wait what Shivaco isn't a mod anymore?

median badger
#

Wrong channel and break

wild cargo
#

I still cannot seem to get the webhook working

#

dbl.DBLClient(self.bot, token, autopost=True, webhook_port=10010, webhook_auth="snacc")

#

Python3.8

#

It autoposts, but doesnt get the votes

sullen nymph
#

Send me in DMs what you entered on the bot's top.gg page

restive otter
#

ne gelmek bilmedik bir apiymiş

#

api key is given to approved bots only right

true talon
#

yed

restive otter
#

pain

indigo vine
#

Umm Im New To This, Can Anyone Guide Me How To Do The Post Thing With The Webhook & All

weary ember
#

is the webhook data for servers the same as bots

#

just the bot changed to server ?

sullen nymph
#

guild

weary ember
#

ah

#

i mean it doesnt matter

sullen nymph
#

See the last pin btw

weary ember
#

ok its still user

sullen nymph
#
{
  "guild": "358630393869631498",
  "user": "247741991310327810",
  "type": "upvote",
  "query": ""
}
``` this is what I got at some point when testing my server
rapid kettle
#

That’s it

weary ember
#

just needed to make sure

rapid kettle
#

that’s the payload

weary ember
#

wait what other types are there?

sullen nymph
#

test and upvote

rapid kettle
#

test

weary ember
#

oh test

#

ok

rapid kettle
#

query is just URL queries

#

nothing you need to pay attention to really

weary ember
#

it will just delete ur entire botum

unborn jasper
#

Hey

#

How shall I grow my new server?

sullen nymph
#

This is the wrong channel to ask

unborn jasper
#

Where shall i?

#

I am new

sullen nymph
#

Read channel topics

unborn jasper
#

Okay thanks

molten light
#

┬─┬ ノ( ゜-゜ノ)

austere oyster
#

is this all I need to post the server count?

sullen nymph
#

those aren't the things responsible for the actual server count

austere oyster
#

oh

#

oh wait I'm dumb

quasi rampart
#

turk varmmi

#

varmi

restive otter
#

var

#

@quasi rampart

#

var

sullen nymph
restive otter
#

tüm türkler among us odasına gelsin

languid kraken
#

@patent juniper I need a bot for my server!

restive otter
#

sa

median badger
#

move to a general channel

#

if youre not talking about the api

acoustic smelt
#

How to get a dbl client token???

sullen nymph
#

https://top..gg/api/docs#mybots once your bot is approved

subtle jackal
#

||***bad spolier***||

#

/spoiler ||bad spolier||

short thicket
#

Do i need to access API to make a system like if someone gives 1 vote, bot will give them 1 Vote role, if someone gives 2 votes, bot will give them 2 Votes role, if someone gives 5 votes.... etc.

median badger
#

Yes

short thicket
#

And i need to wait minimum 6 weeks to access this API?

median badger
#

Check pins in support

short thicket
#

Exactly what it says

#

Epic

#

I don't wanna add my bot to the website, i just wanna award my members for voting but i still need to wait 6 weeks for that.

median badger
#

Yes

short thicket
#

If this system in website was more advanced, we could easily do it

#

Sad

median badger
#

I mean you could just make your own website but you do you

short thicket
#

I mean you could just make your own website but you do you
@median badger That means i need to buy a website first lol

median badger
#

No

short thicket
#

And i don't know HTML or other web languages

#

So idk what i need to do

merry needle
#

@short thicket html is ez

#

u can learn in a day

short thicket
#

Yeah maybe

median badger
#

Let's keep on topic

short thicket
#

But i don't wanna waste money just to give members some vote roles

median badger
#

Whats the point of vote roles if you dont even want to add the bot

short thicket
#

To make them vote my server, not the bot

#

Bot is only for my own server anyway, private bot

median badger
#

Then just use the role thing on the server list

#

A user can only vote once per 12 hours anyway

short thicket
#

A user can only vote once per 12 hours anyway
@median badger Yeah i know but i wanna make a giveaway that lasts 1 week and make a system like more votes = more chance to win, to make this i need to count their votes and give them those vote roles

#

Only possible by reaching the API i guess, so rip

#

Thanks for the help anyway

quiet vine
#

how to keep the music bot 24*7 in vc ??

oak spruce
mental seal
#

how i use the webhook, i did not understand this

restive otter
#

how i use the webhook, i did not understand this
@mental seal bhot saari ways h use krne ka

Best uses are :- welcome text like sx4
Or chat colliders.

brazen rune
#

h

restive otter
#

how can i get my bot server count on api ?

fervent portal
#

^

restive otter
fresh surge
#

the documentation is confusing as hell

#

i've just read everything and still didn't understand how to properly setup a voting log webhook

#

should i use the discord server webhook option?

restive otter
#

the documentation is confusing as hell
i've just read everything and still didn't understand how to properly setup a voting log webhook
should i use the discord server webhook option?
@fresh surge
bruh the webhook stuff is the only API we have yet
there is no wrapper for DSL API yet and there is no documentation except smth in pins

rapid kettle
#

You can’t use discord webhooks

brisk vigil
#

@fresh surge you need to make a webserver then send the requests there

fresh surge
#

Ok, but what do I need to do on the server side?

restive otter
#

||get gnomed||

fresh surge
#

Ok, but what do I need to do on the server side?
nvm just figured it out by myself

signal hawk
#

-faq 3 TAkiritosip

abstract mothBOT
ebon ingot
#

I cannot seem to get my dbl webhook working, It's autoposting, it's just not getting the votes

ebon ingot
#

Ping me if anyone replies

thin forum
#

so considering bots are no longer being added to this server, will there be API methods for setting a bot's status? Or will status indicators be removed from DBL entirely?

opaque jetty
#

soon™️ @thin forum

ornate vapor
#

I setup on_dbl_vote and got someone to test vote for me and it didn't pop up on my print screen Think

sullen nymph
#

Use on_dbl_test and press the test button

ornate vapor
#

👍 will try that

sullen nymph
#

P.s. make sure your firewall isn't blocking requests and the port is open

ornate vapor
#

ah... that might be why then

#

using an Amazon EC2 server

#

and its security is beefy

sullen nymph
#

Mhm

merry stump
#

anyone who knows how to make a website widget for bots

#

pls DM me

solar apex
#

Hey can users vote using the bot or they still need to use the site?

#

Like a vote command that votes for the bot.

restive otter
#

şu apiyi bi gönderin artık

#

sıkıldım

#

beklemekten

solar apex
#

-faq

strange zephyr
#

how to build bot

true talon
#

@west patrol you need an API key, and the only way to get one is by having a approved bot

west patrol
#

Oh im so sorry about it. Wrong Server 😄

sullen nymph
#

what

true talon
#

what

west patrol
#

I have send my message to wrong guild.

restive otter
#

wut

placid peak
#

if you don't understand what Hasmetli.js meant:

I sent message into wrong guild.

olive marten
#

I have Groovy and Ryhtm

#

and Rover and mr.positivity and dyno and Genbot

sullen nymph
#

I have a channel intended to be used for top.gg API discussions, but oh wait... it's this channel

olive marten
#

im play among us in roblox Impostor [BETA]

sullen nymph
#

Read channel topics, for crying out loud

runic pawn
#

Anyone have a tutorial video for webhooks in python, or just a tutorial for DBL without webhooks?

sharp wigeon
#

here

solar apex
#
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});

Error:TypeError: Cannot read property 'on' of undefined
Is anyone else having this error with their vote command? or know a solution behind this??

#

Is there no other way to use the vote event do I need to go though the wehook method??

#

Ah I see

#
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
haughty basin
#

The page where you view your api key and all that isnt showing my bot for some reason, does your bot need to be approved in order for it to show, or is this some glitch

dense basalt
#

It needs to be approved first yes

haughty basin
#

ok thanks, I was just concerned this might've been some glitch

summer folio
#

how do i fix the N/a?

client.on("ready", () => {
    console.log(`Bot has started, with ${client.users.cache.size} users, in ${client.channels.cache.size} channels of ${client.guilds.cache.size} guilds.`);
    setInterval(() => {
        dbl.postStats(client.guilds.size, serverCount);
    }, 1800000);

});``` I have this  as my ready event
#

does it take a while to update?

#

please @ me

modest topaz
#

@summer folio

const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('Your top.gg token', client);

// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})
```This is in the documentation found here https://top.gg/api/docs if people could send a number then they would just enter any number to make it seem that they're bot is popular
summer folio
#

@summer folio

const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('Your top.gg token', client);

// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})
```This is in the documentation found here https://top.gg/api/docs if people could send a number then they would just enter any number to make it seem that they're bot is popular

@modest topaz I got it from the docs

#

That code line was from it

modest topaz
#

you must be using the outdated docs, idk

summer folio
#

I got it from there

#

That link

#

Oh does it take 30 mins as my intervel is 30

#

It’s been 20 mins

#

I’ll come back in 10

restive otter
#

how can i get shard count on top.gg api ?

#

i have "404 Unauthorized error"

#

ping me please

sterile zephyr
#

Will there ever be a server vote api endpoint?

rapid kettle
#

@sterile zephyr there’s the webhooks

sullen nymph
#

How reasonable would you consider adding a DBLClient.run_webhook() method?

spark flower
#

Hey, I got this code for my server

const server = http.createServer((req, res) => {
  let data=""
  req.on('data', chunk => {
  data+=chunk.toString();
  })
  req.on('end', () => {
    res.writeHead(200, {'Content-Type': 'text/html','connected':false});
      res.end(data)    ;
      sendMessage(data);
  })
  }).listen(8880);

To get the user id, I dot JSON.parse(data).user but that's not seems to work, someone know why ?

ornate abyss
#

does get_user_vote still work in the python wrapper? it keeps returning False for me

sullen nymph
#

It returns whatever the API returns, and the endpoint get_user_vote uses does have issues with delays

ornate abyss
#

ah

#

10 minutes later and still False GWaobloChildPepeShrug

sullen nymph
#

Yeah, webhooks are recommended for fetching votes

fresh surge
#

I've set up my webhook but it still show up as http://0.0.0.0:5000/dblwebhook

sullen nymph
#

0.0.0.0 is a placeholder, replace it with your actual IP address when entering it somewhere

knotty crown
#

Whoops

restive otter
#

how do i get my bots webhook url?

#

@thin umbra for support

restive otter
#

will dblapi.js throw an error if i pass the wrong token in the contructor or will it just silently return null

old nebula
#

Anyone I got hacked in Minecraft and I was level 11 and then when I logged in my account I so that it was not my normal account 😦

#

And know I am level 2

bright stump
#

levels in mc?

old nebula
#

yup

#

I got hacked

bright stump
#

thats bad

#

is it like levels in a server or what?

#

im rly confused abt the level part

old nebula
#

I got hacked then I am level 2 know I was 11 before hacked

bright stump
#

yeah i know that much but how do i know what minecraft level i am

#

was it on just hypixel or something or..

old nebula
#

oh....

rapid kettle
#

@restive otter its where the webhook is hosted

sullen nymph
#

@restive otter 401 Unauthorized error will be appearing

rapid kettle
#

Noticed errors: will be appearing
Fix: will appear

restive otter
#

@gaunt steeple off topic bois here

sullen nymph
#

@old nebula @bright stump next time use #general. This channel is for top.gg API discussions.

restive otter
#

mod on break

#

ok i swear this is the last message

old nebula
#

okay?

bright stump
#

@old nebula @bright stump next time use #general. This channel is for top.gg API discussions.
@sullen nymph yeah sry

distant flare
#

Question, is the retry-after header in seconds? Please ping me if you've got an answer 🙏

severe quartz
#

hello? is there a way to make images from api using any package (like canvas) and make them gif?

sullen nymph
#

@distant flare Yes

#

@severe quartz which images do you want to convert into gifs?

severe quartz
#

images from api

sullen nymph
#

Widgets?

severe quartz
#

am i allowed to send the link?

sullen nymph
#

Sure

severe quartz
#

like this

sullen nymph
#

See channel topic lol

severe quartz
#

oof

#

sorry

sullen nymph
stiff echo
#

How do I make a role reward webhook.

rapid kettle
#

do you know any programming languages?

stiff echo
#

Some Java and Lua

rapid kettle
#

java has basic webserver right?

stiff echo
#

Uhm, idk I ain't that interested in java so I only know a little.

#

I'm a roblox scripter.

rapid kettle
#

cuz all the DSL webhook does is send a POST request containing an object a bit like this

{
"user": "user ID",
"guild": "guild ID",
"type": "test or upvote",
"query": "test=48&test2=59"
}``` iirc
stiff echo
#

When I use it it says

#

The webhook setting does NOT post messages to Discord channels. It is designed for use with an external service only.

rapid kettle
#

but why would you need a role reward webhook?

#

yes, it doesn't post to Discord channels

stiff echo
#

Idk

rapid kettle
#

you can't use that for a webhook

#

you don't use discord webhooks

stiff echo
#

oh

rapid kettle
#

you need to setup a POST request receiver

#

and make sure its secure

#

just check the Authorization header iirc

digital mango
#

.

rapid kettle
#

ok

#

Do you know any programming languages?

stiff echo
#

well

#

I really am only in Lua

rapid kettle
#

yes i know

stiff echo
#

Java is me second

#

my*

rapid kettle
#

oh
@stiff echo an alternative to using a DSL webhook is using a bot

#

@digital mango Do you know any programming langs?

digital mango
#

Nope lol

scenic beacon
#

hi

digital mango
#

Med student

scenic beacon
#

im new

rapid kettle
#

ok, so I'd recommend using a bot to do that

scenic beacon
#

round to the nearest 10,000

rapid kettle
#

however i could guide you on setting one up in js

scenic beacon
#

hahahhah

digital mango
#

For the webhooks?

rapid kettle
#

@digital mango yes

scenic beacon
#

um ok

rapid kettle
#

there are many bots that receive POST requests and notify you of them for you

digital mango
#

Like I want uh msgs being sent from the webhook

rapid kettle
#

Yea, that requires a webserver listening for POST requests

#
{
"user": "user ID",
"guild": "guild ID",
"type": "test or upvote",
"query": "test=48&test2=59"
}``` this is what is sent along with the POST
#

and the auth is in the Authorization header

digital mango
#

Oh

#

So where do i put this

#

This code

rapid kettle
#

that isn't code

#

its just an example of what is sent

digital mango
#

Oh

#

Like I wanna redo a channel

rapid kettle
#

you wanna send a message to a channel?

#

or

digital mango
#

Yes

#

Instead of my name

#

I want that from a bot (which is webhook)

#

So it looks cleaner

rapid kettle
#

ooooh i see

#

thats not DSL

#

I thought you meant a DSL webhook

digital mango
#

Yea i just mean a webhook in general lol

#

No no

rapid kettle
#

but sure DM me the invite to the server and i can do it

digital mango
#

Ok r u 18+?

rapid kettle
#

nope

digital mango
#

Sheet

wide moon
#

which is easier

sullen nymph
whole marten
#

yes

rapid kettle
#

Ok

#

so do you have a web server setup?

whole marten
#

yea

rapid kettle
#

Is it listening for POST requests?

whole marten
#

uh i can make it

rapid kettle
#
{
"user": "user ID",
"guild": "guild ID",
"type": "test or upvote",
"query": "test=48&test2=59"
}``` this is what is sent along with the POST
and the auth is in the `Authorization` header
#

yea

whole marten
#

oh wait lemme see

rapid kettle
#

I recommend checking Authorization header to keep it secure

#

what web server you use?

whole marten
#

just req res is needed right

#

express

rapid kettle
#

express cool

#

I use express too

whole marten
#

how do i access the auth header

#

the json is body ig?

#

req.body?

rapid kettle
#

It’s req.header("Authorization") and you’re right

whole marten
#

alright

rapid kettle
#

do you have the json parser thing tho?

whole marten
#

hm wdym

rapid kettle
#

it’s app.use(express.json()) at the top of the file, it allows you to access the bodies (this is if it doesn’t work for you)

whole marten
#

i have body-parser

rapid kettle
#

ah so app.use(bodyParser.json())?

#

if so it should work

whole marten
#

yea

rapid kettle
#

perfect

whole marten
rapid kettle
#

know how json works?

whole marten
#

mhm

rapid kettle
#

I assume you do

whole marten
#

so i could just like

#

check if the header is that key

rapid kettle
#

Yep

whole marten
#

and then like emit an event with the json body

#

and work from there in normal node

rapid kettle
#

you can just use the app.post as your event

whole marten
#

oh yeah i prefer using my bots event collector so i can handle stuff back in the server.js file

#

instead of the dashboard

rapid kettle
#

Oh makes sense yea

foggy kelp
#

I don’t think the Python automated server count is working

#

Running a timer now to confirm this

old nebula
#

oh

umbral vector
#

oof

nova nacelle
#

Wanted to double check before I wasted my time; Do the request methods for getting the information of a bot/user now require an API token? I know it used to previously allow it without the token in the past, but I've been getting Unauthorized as of now.

bold fulcrum
#

not sure what im doing wrong here

bold fulcrum
#

my token i svalid as i literally just got it from the page

sullen nymph
#

@nova nacelle yeah, all requests require authentication

nova nacelle
#

got it, thanks

bold fulcrum
#

Ok I got it to work, turns out it doesn't like having a space between the : and the token in the header, feel like this is something that shouldn't be an issue and perhaps brought to the attention of the API devs? @burnt trellis

#

Sorry for the ping I just don't want this to be missed lol

burnt trellis
#

I'm not sure how curl is different vs say axios/node-fetch when doing headers.

bold fulcrum
#

Basically

#
Authorization: token here // fails
Authorization:token here //works
burnt trellis
#

No I get that.

#

I think that's a curl thing and how request are being received on the server side.

#

Not like it's some code that says string == " authhhcode"

bold fulcrum
#

I feel like me using curl shouldn't affect it, unless it's a http thing but that would be weird

junior tusk
#

Hey, does the bot.monthlyPoints reset directly after a month or will it stay the previous amount until someone votes? Please mention me when reacting

old nebula
#

// fails

restive otter
#

İ am turkish

#

I am turkish

restive otter
#

@bold fulcrum whitespace BEFORE the : in headers doesn't matter but the whitespace AFTER the colon causes an error

junior tusk
#

Hey, does the bot.monthlyPoints reset directly after a month or will it stay the previous amount until someone votes? Please mention me when reacting
anyone?

restive otter
#

@junior tusk it resets monthly

junior tusk
#

but let's say I have 100 votes on 30 September 23:59 UTC. A minute later, the vote amount on the page will still be 100 as nobody has voted then. Will the bot.monthlyPoints variable then also stay 100 until someone votes?

restive otter
#

@junior tusk nope it will instatly reset

junior tusk
#

that'd be really strange tho

sullen nymph
#

Well there's two options

#

Either a) the bot page itself asimply caches the votes from last month separately and votes are stored differently, meaning you will get 0 from monthlPoints, or b) you'll still get 100 as no one has voted and you'd have to perform checks yourself

#

And I wish I was certain about my answer, but I could probably test it in a bit

junior tusk
#

yeah same, thanks in advance

junior tusk
#

@sullen nymph sorry for bothering, have you already looked at it?

sullen nymph
#

Eh fuck it I'll do my dishes later

junior tusk
#

no take your time mate

sullen nymph
#

@junior tusk so with a little bit of testing and my very stale memory

#

My conclusion is it monthlyPoints will stay the same until the next vote

#

but you can rely on the /votes endpoint since that gets reset, as far as I understand

junior tusk
#

okay thanks for testing. I guess I don't need that endpoint, I only should force monthlyPoints to be 0 when I reset my leaderboard at 01-xx-xxxx 00:00:00 UTC

#

I appreciate it

jagged pine
#

This is not autoposting guild count, anyone knows why?

client.dbl = new DBL(apiKey, client);
calm zodiac
rapid kettle
#

yes @calm zodiac they are

sullen nymph
#

Discord will you load your shit for once

calm zodiac
#

lmao

sullen nymph
#

is it bot/server vote data

rapid kettle
#

at least for dsl

calm zodiac
#

its the data format

#

for bot

rapid kettle
#

ok yea

#

yea thats in the post request

sullen nymph
#

yeah it is

calm zodiac
#

cause i have to make my own test thing now AngeryDoge

rapid kettle
#

i know because i am dealt with it

#

/gramer/

frozen jolt
#

I was wondering how to set up the thing where they vote for your server and you give them a role

#

any helpful links would help me Dorime

sullen nymph
#

DSL bot can do that

frozen jolt
#

what is DSL

#

@sullen nymph

sullen nymph
#

Discord Server List, see your server's settings page

frozen jolt
#

ah okay

#

So it says Zelda Lewd Cafe (I am not sure what this server is could be the server I own but old name) and I don't see my current server called Waifu Station

#

The bot is in that server

sullen nymph
#

Try reinviting the bot

frozen jolt
#

okay

#

Okay it worked

#

not sure what's going on but I kicked, reinvited it, and it worked

#

thx

jade cargo
#

Api is Indonesian language?

#

Api is fire

limber dawn
#
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});

what we have to replace to webhook port and webhook auth ?

oak fern
#

no

#

u

hardy relic
limber dawn
#

please use #general ... this channel is only for api topics

hardy relic
#

oki! Thanks Your A good Mod

sullen nymph
#

keep webhookPort, webhookAuth is a password you create yourself and enter on top.gg and in your code

#

Auth is essentially a password to confirm that requests are coming from top.gg

limber dawn
#

ohh thanks

sullen nymph
limber dawn
#

mine vps where the bot is hosted right ?

sullen nymph
#

yeah

limber dawn
#

@sullen nymph i have to enter vps public ip or private ip ?

sullen nymph
#

public

old nebula
#

Hmm......

dry radish
#

👀

rapid jewel
#

ping

north yoke
#

pls discordgo

#

😔 pensive_wobble_slow fast_pensive_wobble emoji_9

robust remnant
#

كينجي كانيموتو

outer mica
#

How do I get a API for my bot?

tame kindle
#

how do you get an Application Programming Interface for your bot

#

good question

cobalt current
rapid kettle
#

yea it died

sullen nymph
#

Use reqbin or postman for now

#

cc @mighty shuttle is this a known issue?

mighty shuttle
#

I've reprted it

sullen nymph
#

ly

cobalt current
#

thanks :D ill try later

rocky basin
#

2 things:

  1. Is there anyway to make it so whenever somebody votes for a Server, my Bot runs an action using the top.gg npm package?
  2. How can I obtain a Token to use the API?
nova nacelle
#

for 2) You receive an API token once your bot is approved

sharp wigeon
#

no

#

you can generate one

merry stump
#

from where?

#

@sharp wigeon

sharp wigeon
#

from the dashboard

merry stump
#

oh

#

btw how to use the API

#

key

sharp wigeon
merry stump
#

k

limber dawn
dim cedar
#

This is for music it seems

#

Even i get that error

#

But the bot runs fine

placid peak
#

@limber dawn #development and you have 11 ready and vote listeners

merry stump
#

can we edit our top.gg's bot page?