#topgg-api

1 messages Β· Page 67 of 1

worn quail
#

DBL doesn't update it in real time

#

It does it every hour

#

See that site to see when it does it and the count.

hollow rose
#

Aahh seems like the stats are not going through

arctic arch
#

@worn quail marco's site updates hourly

worn quail
#

I thought it went with when dbl updated

arctic arch
#

api should be always up to date

#

website can be cached for some time

worn quail
#

Ah ok

odd sleet
#

Hello I’ve been scammed and I have no idea how to book a ticket because I am new

#

Can you plz tell me what to do

arctic arch
worn quail
#

@odd sleet did you give out your email

#

If so that's why 2fa exists

winter spade
#

The website says my bot is offline even thought it isnt.

wanton trellis
#

you have to wait

#

i think

worn quail
#

-bots @winter spade noembed

abstract mothBOT
#

DieselJS#1689's bots:
@restive otter @indigo orchid

worn quail
#

It's going to take time to update

#

I'm guessing you are talking about the chatbot one?

#

Its here @abstract moth will update it soon.

winter spade
#

No the GiveawayBot one

#

@worn quail

#

Looks like it is offline in a shard then

worn quail
faint sleet
#

are there type definitions for dblapi.js πŸ€”

#

yep there is

flat condor
#

Hi

daring cove
gaunt steeple
#

is the top.gg api the only way to let the site know how many servers your bot's on?

sullen nymph
#

Yup

gaunt steeple
#

ok, added that πŸ™‚ update frequency of an hour should be more than enough.

#

and 60x less than the rate limit too, lol

#

thanks shivaco

#

i love simple APIs

sullen nymph
gaunt steeple
#

its strange that posting an update to /bots/:id/stats returns an empty payload

#

you'd think it would return a success boolean, at the very least?

sullen nymph
ornate abyss
#

try except should work iirc

halcyon zinc
#

Js (Discord.js)
dblapi.js has not a Vote Event ?

ornate abyss
shrewd rapids
#

wag1

restive otter
boreal bridge
#

@restive otter the external ip of your vps as a url

restive otter
#

@boreal bridge with no ports etc?

boreal bridge
#

Well yeah you need a port

restive otter
#

Ok!

boreal bridge
#

That depends on your configuration

restive otter
#

@boreal bridge If I set all to port 3000 but is not working?

#

when i test

#

it should send me an message

misty mica
#

A_dblcount 264811613708746752

sullen nymph
#

What makes you think this is a channel to execute commands

boreal bridge
#

@restive otter you need to open the port on your vps

restive otter
#

@boreal bridge how?

#

Sorry for disturbing if ^

boreal bridge
#

@restive otter it depends on your vps provider, os, etc

#

I think google is your friends for this one

restive otter
#

its ubuntu

#

ok ok

boreal bridge
#

It’s pretty simple on Ubuntu

restive otter
#

πŸ™‚

boreal bridge
#

Google should tell you in 2 seconds

sullen nymph
#

Shouldn't forget http:// before that

boreal bridge
#

^

sullen nymph
#

Also mind deleting it

restive otter
#

oh

#

why?

sullen nymph
#

That still shows your IP address

worn quail
#

I can ocr it

sullen nymph
#

Gucci

restive otter
#

and with /dblwebhook ?

sullen nymph
#

Nokia no, we be gucci

worn quail
#

Yea

restive otter
#

thanks worked!

silent nacelle
#

-bots

sullen nymph
#

What makes you people think this channel is for command usage

arctic arch
#

ikr

#

why this of all channels

obsidian tide
#

I'm confused how DBL API works...

#

can someone help me?

#

Idk how to webhooks

#
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!`);
});
#

that's what it says on docs

#

it's just doing it like that besides changing vars?

#

nvm i did it

frank laurel
#

When i do

const dbl = new DBL('i put my token', client);
dbl.on('posted', () => {
   console.log('Server count posted!');
})

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

It doesnt post
lost cargo
#

Do someone here know how to add a check for individual commands like on a regular non cog file check? Any help would be much appreciated.

frank laurel
#

Please ping me on response

restive otter
#

@frank laurel the dbl.on(posted...) is just a reminder for you that its posted, you still need to post. I would make a guildRemove event and a guildAdd event and in those you write: dbl.postStats(client.guilds.size)

ionic tulip
#

Hello

white lodge
#

Does dblAPI.HasVoted(user) Updates everytime the user can vote again?
.NET btw

sullen nymph
#

Should

restive otter
#

Is it possible to get the user who voted for the bot with api?

blissful lark
worn quail
#

@restive otter yes. You can either use the lib for your language or access the api directly.

#

I just access it directly

sullen nymph
#

Or use a webhook and process votes in real-time

blissful lark
#
String userId = ...; // ID of the user you're checking api.hasVoted(userId).whenComplete((hasVoted, e) -> { 	if(hasVoted) 		System.out.println("This person has voted!"); 	else 		System.out.println("This person has not voted!"); });
sullen nymph
#

which saves a lot of ratelimits and delays

worn quail
#

meh

restive otter
#

does anyone know a webhook port that is open (working)

boreal bridge
#

@restive otter you need to open the webhook port on your end

ionic urchin
#

Can anyone help me? I'm working on a website get request in .js to fetch the obtained json.
However, im constantly getting a 401 Unathorized error

cold ledge
#

What you trying to get

ionic urchin
#

user id from discord

#
    fetch('https://discordapp.com/api/users/@me', {
        method: 'get',
        headers: { 
          Authorization: request.session.discord.token_type + ' ' + request.session.discord.accesss_token,,
          "Content-Type": "application/x-www-form-urlencoded" ,
        },```
#

@cold ledge

river glacier
#

rip

ionic urchin
#

"He didnt respond for 30 seconds!"

cold ledge
#

Idk then

#

Never had that problem

#

Sorry for not responding I'm playing badminton atm

ionic urchin
#

Alright. Have fun πŸ™‚

#

Also. i'll shamelessly delete my post. Cause i found the error.

#

πŸ˜…

tawny heron
#

for some reason my dlb token doesnt work

#

nvm it just doesnt read it from the .env file

molten quail
#

Does the voting webhook address allow for specifying a port?

dawn fjord
#

yes

molten quail
#

Weird...
If I visit ||REDACTED|| myself, it works fine, but if I hit the test button it does nothing

#

Oh, I'm a derp...need to save first...

snow surge
#

I have 1 problem: My computer screen is small, and I can't copy and paste API Key, due just one part of this is out of my screen. (in https://top.gg/api/docs#mybots)

spiral steeple
#

although that should be fixed you can inspect element and get it that way

#

I actually havent added a bot in forever and dont have one so idk if there is a copy button

sullen nymph
#

As Steven said, your best bet is inspect element

tawdry spindle
#

what happens if you click on it 3 times

real frost
#

Java API down?
https://top.gg/bot/621182362008551444
sending my server count and it stopped working a couple days ago?

#

Im up to near 800 but the page only shows 622?

sullen nymph
#

Looks like cache issues

arctic arch
#

not a cache issue

#

don't excuse everything with cache without being clear that its a cache issue

#

@real frost are you able to get logs to see what is going wrong

real frost
#

Nothing is being returned in my console

#

has even tried assigning the api call to a command to force some sort of log

#

Is there an argument I need to call to force debugging?

arctic arch
#

idk about java

real frost
#

Who wrote the library?

spiral steeple
#

I think it's nikki

restive otter
#

So i was reading in doc and i copied

const dbl = new DBL(DBLtoken, { webhookAuth: DBLauth, statsInterval: 1800000 }, client);
    dbl.webhook.on('ready', hook => {
        console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
    });

this is the error is it normal? or i need to change something

worn quail
#

Webhook isnt defined

grizzled gulch
#

Hello, do you have MAL API?

runic grove
#

@grizzled gulch what

grizzled gulch
#

MyAnimeList Api

#

?

sullen nymph
#

Does anyone read this channel's topic

boreal bridge
#

@sullen nymph reading is overrated

restive otter
#

^

dawn coyote
#

Hi

sullen nymph
worn quail
misty mica
#

hey guys what did dbl.isWeekend() do?

sullen nymph
#

Returns true if it's weekend on top.gg

#

Which starts at Friday 00:00 UTC iirc

strange swallow
#

Is Friday really considered a weekend? Thonk

sullen nymph
#

DBL says it is

formal sparrow
#

Well, I get this error when I try to do something when someone votes

#
Error: 401 Unauthorized
    at IncomingMessage.res.on (/rbd/pnpm-volume/5639bec1-3b08-4925-9ce4-7a48960a6c42/node_modules/dblapi.js/src/index.js:118:25)
    at IncomingMessage.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1125:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  raw: '{"error":"Unauthorized"}',
  body: { error: 'Unauthorized' },
  status: 401,
  headers:
   { date: 'Fri, 18 Oct 2019 08:48:50 GMT',
     'content-type': 'application/json; charset=utf-8',
     'content-length': '24',
     connection: 'close',
     'set-cookie':
      [ '__cfduid=df0ee34cab1621d0f1444eed25b722a601571388530; expires=Sat, 17-Oct-20 08:48:50 GMT; path=/; domain=.discordbots.org; HttpOnly; Secure' ],
     'x-powered-by': 'Express',
     'access-control-allow-origin': '*',
     'access-control-allow-headers': 'Authorization',
     etag: 'W/"18-XPDV80vbMk4yY1/PADG4jYM4rSI"',
     'cf-cache-status': 'DYNAMIC',
     'strict-transport-security': 'max-age=15552000; includeSubDomains; preload',
     'x-content-type-options': 'nosniff',
     'expect-ct':
      'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
     server: 'cloudflare',
     'cf-ray': '5279416c3fbbc1c0-IAD' },
  ok: false,
  statusText: 'Unauthorized' }
#

I think problem with this line only

#
const dbl = new DBL('token', { webhookServer: server, webhookAuth: 'pass' }, client);
sullen nymph
#

Token might be incorrect

formal sparrow
sullen nymph
#

Yeah if the password is actually 'pass' but I meam the token, not the password

formal sparrow
#

Oh the token

#

Let me check once

#

I tried with regen token option

#

And still same error

sullen nymph
formal sparrow
#

Is it needed?

sullen nymph
#

What is?

formal sparrow
#

That URL

sullen nymph
#

I mean how else is it going to send the requests

formal sparrow
#

So I have to fill it

#

Can you help me with that?

sullen nymph
#

oh uhh

formal sparrow
#

So should it be like this http://name.glitch.me/idkwhatcomeshere

sullen nymph
#

name being the project name

formal sparrow
#

Yea I know

sullen nymph
#

And if you don't use webhookPath, it'll default to 'dblwebhook'

formal sparrow
#

http://name.glitch.me:3000/dblwebhook ?

sullen nymph
#

Yeah

#

Nah

formal sparrow
#

Oh yea I got it

sullen nymph
#

I don't think the port goes for Glitch URLs

formal sparrow
#

Now?

sullen nymph
#

worth a try

formal sparrow
#

I see

#

Same error

#

Tried this too http://name.glitch.me/dblwebhook

restive otter
#

@formal sparrow On the token, replace token with the actual dbl token and the pass with the password

#

and you have to like host a webserver on the url you enter

#

and if someone requests something there with the pass you entered you let it thru

formal sparrow
#

Yea I know and I replaced it with original one only

#

So in glitch, I can't use webhook?

restive otter
#

i dont think so

#

Is there a way to get bots with a prefix in the api?

#

(javascript / node.js)

#

Like to get all bots with a specific prefix

sharp juniper
#

no error, no logs

restive otter
#

for the webhooks

#

i found it

sharp juniper
#
const dbl = new DBL('token', { webhookPort: 3000, webhookAuth: 'authpasshere' });```

```events.js:183

      throw er; // Unhandled 'error' event

      ^

Error: listen EADDRINUSE :::3000

    at Server.setupListenHandle [as _listen2] (net.js:1360:14)

    at listenInCluster (net.js:1401:12)

    at Server.listen (net.js:1485:7)

    at DBLWebhook._startWebhook (/rbd/pnpm-volume/b8b6183b-9298-4f5f-8951-dee24b437c0c/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/webhook.js:45:18)

    at new DBLWebhook (/rbd/pnpm-volume/b8b6183b-9298-4f5f-8951-dee24b437c0c/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/webhook.js:27:12)

    at new DBLAPI (/rbd/pnpm-volume/b8b6183b-9298-4f5f-8951-dee24b437c0c/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/index.js:69:22)

at Object.<anonymous> (

:13)

    at Module._compile (module.js:653:30)

    at Object.Module._extensions..js (module.js:664:10)

    at Module.load (module.js:566:32)```
restive otter
#

@sharp juniper With your token part we can literally figure out your real token

#

change pls

sharp juniper
#

i will regen

#

after

restive otter
#

ok

dawn coyote
#

help me

sharp juniper
#

It seems like I get that error when the port is 3K

#

But I got told the port needed to be 3k because I host it on glitch

dawn coyote
worn quail
#

Force a restart by editing your bot.

restive otter
#

@dawn coyote you have to update servers manually

worn quail
#

^

dawn coyote
#

how?

worn quail
#

HTTP requests will work.

#

What language do you use

dawn coyote
#

js

worn quail
dawn coyote
#
 setInterval(() => {
        dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
    }, 1800000);```
worn quail
#

I think

dawn coyote
#

I tried this

worn quail
#

You can use raw http requests

#

I think XMLHttpRequest (would work but is depreciated) will work if you supply headers

#

whatever other http request you use GWhurpyShrug

restive otter
#

do it like me, everytime your bot joins / leaves a server send stats or if the bot emitted ready

worn quail
tame kindle
#

@sharp juniper it's saying that port 3000 is already being used

sharp juniper
#

What can I write then?

tame kindle
#

You must edit the webhook port

#

To a port that is available on the machine

sharp juniper
#

how is that even possible

#

i use glitch

tame kindle
#

is glitch using port 3000?

sharp juniper
#

yes

tame kindle
#

That's why

sharp juniper
#

?

dense basalt
#

@sharp juniper do you even know how ports work

#

Port 3000 is taken so use another port

#

e.g. 8080

sharp juniper
restive otter
#

oof

dense basalt
#

Oi

#

What else are you running on port 3000?

worn quail
#

a bot

dense basalt
#

Then the easiest way to solve that it to create a separate glitch project for your voting stuff

restive otter
#

whats this voting thingy

dense basalt
#

You can "upvote" a bot, this can be used by developers to give users rewards for voting. Bots with more upvotes appear higher in the list

latent trench
#

is the position in the list only dependent on how many votes your bot has or does it include the creation date?

restive otter
#

does anyone a piece of code that would allow my bot to delete a specific channel?

sullen nymph
#

Have you ever read this channel's topic?

#

and the rules at this point?

sharp juniper
#

Why does my bot list page say N/A where it shows how many servers it's in?

restive otter
#

because you didnt transfer your stats

tardy badger
#

So i think im doing everything right.
Server count is posted correctly, works fine.
So basically i just want to log when a user votes. It returns http://0.0.0.0:5000/dblwebhook (0.0.0.0 means this machine)
For the url in the webhooks section on edit i put http://(public ip beginning with 86.):5000/dblwebhook
Because my public ip begins with 86. I also tried the public ip address that begins with 192.

Code:

const DBL = require("dblapi.js");
const dbl = new DBL('(iremovedtheapitoken)', { webhookPort: 5000, webhookAuth: '(iremovedthepassword)' }, bot);

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 never logs when a user votes though. I've voted and my friends have.
I don't get any error messages. Bot is my "client" object.
tardy badger
#

Anyone got any ideas?

sullen nymph
#

Are you sure port 5000 is open?

tardy badger
#

yep

boreal bridge
#

@tardy badger does the ready event get fired

#

And are you sure that is your public ip

tardy badger
#

ready event is fired

#

the bot starts up properly

#

and yeah, it is my public ip

#

i tried the local and the public ip as well

boreal bridge
#

I’m not really sure what to say at that point

#

I would try manually doing it with postman to see if you can debug the problem of you are sure you have done everything else you needed to do such as open the port

tardy badger
#

ok, just in case i did it wrong, how do you open the port?

gaunt steeple
#

192.x isn't generally a public ip

tardy badger
#

i also used 82.x

gaunt steeple
#

You'll need to open the port using port forwarding in your router

#

And the webhook will then be the 82.x address externally

tardy badger
#

oh ok, thanks

gaunt steeple
#

Make sure also your pc has a static ip

#

Otherwise the port forwarding will only work until your next reboot

#

You might want to look into something like cloudflare too to hide your public IP

#

It will be important if you put a web dashboard on there or anything

#

And also if your public IP changes

subtle agate
#

Anyone know what is going on with checking vote. Appears that some users have voted with proper screenshots with the same account, but it's not returning true that they voted.

spiral steeple
#

that's why it's recommended you use webhooks

fair pier
#

@gaunt steeple using cloudflare with your public IP is against their policy so /shrug

gaunt steeple
#

Where does it say that?

#

For most sites that use a webhook, their public IP is their only IP

fair pier
#

Well I've seen someone report a site for using cloudflare on their own IP

gaunt steeple
#

That would be stupid. Cloudflare isn't something illegal. I'm guessing discord would just disregard such a report

#

Cloudflare or similar is essential for ddos protection

#

I can't find any policy that says it's against any terms

blissful lark
#

what do i have to put in there?

#

the client id of my bot from discord developers?

gaunt steeple
#

Your bot token from the discord developer portal

runic grove
#

no, your dbl token

gaunt steeple
#

Ah wait

#

What he said

runic grove
#

you can get it on the edit page of your bot (on top.gg)

blissful lark
runic grove
#

yes, that token

blissful lark
#

that waht ive putted in there on .token("")

#

but what on .botId("botId")

#

πŸ˜…

runic grove
#

oh

#

your bots id

#

its the same as client id iirc

blissful lark
#

ihave made it blue cause no as etc πŸ˜…

runic grove
#

you can share your client id, its public anyways

blissful lark
#

okay, thank you for help ^-^

gaunt steeple
#

Just don't share the bot token 😁

restive otter
#

or the bot secret

#

Things to share: Client id
Things to NEVER share:
everything else

restive otter
#

Thats

#

Nicc

inner venture
#

@runic grove not always but generally yes

runic grove
#

wdym not always

inner venture
#

older bots have different user ids and client ids @runic grove

#

for example, my first bot has
client id: 172799048015675403
user id: 172799284968816640

runic grove
#

oh

spiral steeple
#

uh

#

ok?

rich ore
#

Oh ok...

#

Thanks

#

._.

harsh stream
#

I think you can ask questions about the discord api in #development

restive otter
#

Hey, can I create an command that is only unlocked for servers that voted for the bot 20 times?

runic grove
#

yes

opaque pike
#

Anyone know why it's sending this back to me ?```
dbl.webhook.on('ready', hook => {
console.log(Webhook running at http://${hook.hostname}:${hook.port}${hook.path});
});

`Webhook running at http://0.0.0.0:5000/dblwebhook`
dense basalt
#

Uh

#

You literally

#

Log it

opaque pike
#

To check if he receives the votes

restive otter
#

Create a listener for the vote event @opaque pike

#

Look at the documentation

opaque pike
#

like this ?

const express = require('express');
const http = require('http');

const app = express();
const server = http.createServer(app);
const dbl = new DBL(yourDBLTokenHere, { webhookAuth: 'password', webhookServer: server });

dbl.webhook.on('ready', hook => {
  console.log(`Webhook running with path ${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});

app.get('/', (req, res) => {
  // ...
});

server.listen(5000, () => {
  console.log('Listening');
});
frosty sparrow
#

Hi

#

My boy has a "say " command and works but don't delete the message of the command

#

How could my bit delete the message?

hearty lintel
#

Do <Message>.delete() if you need more help go to #development

frosty sparrow
#

Thanks ^^

modest nova
#

How to get servercount in my bot top.gg page

spiral steeple
worn quail
#

Make a GET request to the API @modest nova

sullen nymph
#

they probably meant to post it

worn quail
#

How to get servercount in my bot top.gg page

#

I'm going by what they said

sullen nymph
#

k3llyShrug Phrasing matters too much honestly

worn quail
#

It does

sullen nymph
#

That doesn't explicitly say GET from the top.gg page

#

And their bot doesn't have server count posted on the bot page so /shrug

worn quail
spiral steeple
#

I take that as "How to get servercount on my bot top.gg page" the one character can make a lot of difference tho

worn quail
#

Yep

#

If it was "on a bot top.gg page" then it would be impossible without web scraping

fast comet
#

Is there an event for when someone votes? .net

restive otter
fast comet
#

that don't look like an event

spiral steeple
#

that's because it isnt..

worn quail
#

Just make a loop that checks every x seconds

spiral steeple
#

sounds like some good api abuse

harsh stream
#

checking if someone voted every x seconds wont really work if the bot is running on big servers

#

and like steven said it's kinda abuse of the api

fast comet
#

You'd also have to check if the vote was an added one and did not already exist. That would be terrible

modest nova
#

@worn quail How yo make a req can u help me

fair pier
#

@modest nova i can help

#

what programming language

modest nova
#

discord js only dude

#

java script @fair pier

calm zodiac
#

@modest nova??

#

Why ping?

scarlet cobalt
#

One message removed from a suspended account.

modest nova
#

For help dude

#

You mention you can help

#

thats why i pinged you so can you help me @fair pier

scarlet cobalt
#

One message removed from a suspended account.

worn quail
#

XMLHttpRequest

#

Just use that since its basic

orchid sundial
#

Just looked into the updated dblpy API and I'm noticing an on_dbl_vote event. Does this mean my old system of having a separate webserver process the votes is obsolete and they can be sent straight to the bot now?

worn quail
#

It has been there.

#

It's something using a webhook you make.

orchid sundial
#

By using the webhook_path kwarg right?

worn quail
#

Yeah

sullen nymph
#

only port must be set, the rest is optional

worn quail
#

Ooh

#

oh yeah

#

it now has the ability to create a webhook

#

doesnt it

sullen nymph
#

Yes

worn quail
#

I never used the lib

#

I never understood how to make it work with async

sullen nymph
#

Change a few stuff here and there and all good really special_think

#

Like anything related to guilds

orchid sundial
#

Ah cool if I get this to work it'll be so much more convenient

icy monolith
#

@tepid garden @arctic arch

tepid garden
#

yes

gusty moth
#

I'm confused with how to show the server count on a bot, can anyone help me please?

restive otter
#

what language and library

#

unless you mean on the website

#

which

#

actually you probably do

#

which either way id need to know language

restive otter
harsh stream
#

you're welcome i guess

#

I think most libraries have a way to get all servers the bot is connected to, just count that

gusty moth
#

i didnt read what you put correctly πŸ˜‚

orchid sundial
#

I don't think this is normal behavior but I'm getting the HTTP request in my console without the print(data) from the code in on_dbl_test

sullen nymph
#

Huh?

orchid sundial
#

I get [2019-10-23 23:08:52,705] x.x.x.x [23/Oct/2019:21:08:52 +0000] "POST /webhook HTTP/1.1" 401 178 "-" "DBL" in the console

#

but not the actual vote data

sullen nymph
#

Your webhook_auth and the authorization string sent from DBL don't match

orchid sundial
#

woops you're right

#

no clue why I thought the keyword was password PiccoloFacepalm

sullen nymph
fair pier
#

@modest nova sorry im late (i was sleeping)

#

but just use dbljs

orchid sundial
#

Same behavior unfortunately

#

I even tried removing the auth completely on both sides, no change

sullen nymph
#

Save, restart still doesn't work?

fair pier
#

isnt [2019-10-23 23:08:52,705] x.x.x.x [23/Oct/2019:21:08:52 +0000] "POST /webhook HTTP/1.1" 401 178 "-" "DBL" the request data

orchid sundial
#

Bot needs to restart? 😳

#

I've been reloading the cog

sullen nymph
#

Eh that's good enough

#

Looks like certain someone didn't think of getting None returned

#

Try setting webhok_auth to None and try again please 🀣

orchid sundial
#

Good it works thank you

sullen nymph
#

This is kinda ridiculous

orchid sundial
#

I agree, the docs are too bare bones

sullen nymph
#

I should probably work on those a bit

orchid sundial
#

Yeah I really try searching around before bugging people but there's not too much to go on when it comes to the api, probably why it took me this long to realize there was an easier way to do things

sullen nymph
#

Some precise feedback could help :^)

orchid sundial
#

Well where I went wrong was thinking I could remove the webhook_auth kwarg since it's "optional" instead of setting it to None cause I figured it'd go to None by default

sullen nymph
#

That'll need a fix for sure since I'm comparing NoneType to an empty string under that condition 02lul

sullen nymph
#

dblpy has on_dbl_vote and on_dbl_test events if you use the built-in webhook

#

Specifying at least webhook_port should be enough though reading the above messages you can see that setting webhook_auth to empty string while having Authorization field sent can cause a few issues with processing requests from DBL

#

yep

restive otter
#

Someone can help me please

#

I want to get new votes and send it to a chat

#

But i create webhook etc

#

I linked it to my application's server

#

With right password

#

and port

#

But nothing happened

spiral steeple
#

that looks like dbm

restive otter
#

It is

#

and windows -something

harsh stream
#

I don't think you can add the DBL api to dbm

sick cape
#

:v

obsidian tide
#

I have a friend who uses dbm and I saw something exactly like that

restive otter
#

How setup Webhook

#

Why this library

#

(in JS)

restive otter
#

ok

restive otter
#

12:32 germany

#

= same time

#

lol

prisma dawn
#

so are we no longer able to post server counts to top.gg for a discord.py bot without using the dbl library

sullen nymph
#

You can always use aiohttp/requests to send your server count, though? thonkku

prisma dawn
#

oh

#

i wasn't sure because it said in there that all those examples are old

#

so I thought it meant that they no longer worked

sullen nymph
#

Well yeah they're old so you shouldn't rely too much om 'em

dense compass
#

I can at least say with confidence that the C# method I posted in #312614469819826177 still works πŸ‘Œ

restive otter
#

Ree

mellow spear
#

@618633293121847317

worn quail
#

@dense compass py examples work fine

bold edge
#

Too many requests when trying to post server count waitwhat

gilded dawn
#

lul how many requests are you making?

restive otter
#

@sullen nymph How track votes with dbl api ?

sullen nymph
#

Webhooks

restive otter
#

How that works

#

I setup my webhook and i linked it to my application's server

#

But nothing seems to work

#

It's maybe because i use glitch

#

idk

sullen nymph
#

Did you make sure your URL is correct

restive otter
sullen nymph
#

Replace 0.0.0.0 with the project's name

restive otter
#

How i do

#

Because there is no way to change this

sullen nymph
#

What

restive otter
#

wait

#

"http://${hook.hostname}:${hook.port}${hook.path}"

#

How i can change the webhook's hostname

sullen nymph
#

Literally put your project name followed by ".glitch.him" in the URL instead of the 0.0.0.0 it outputs

restive otter
sullen nymph
#

fckin keyboard

#

Nvm I'm not too smart

restive otter
#

Look it's when i log the hook

#

@sullen nymph

sullen nymph
#

Yes

#

So remove IP and port and replace them with your project name

restive otter
#

I think i've found the solution

lament mauve
#

Can some1 tell me why i get the response {"shards":[]} if i try to see the stats?

arctic arch
#

the bot has no stats

lament mauve
#

how do i give him stats?

arctic arch
#

by posting them

lament mauve
#

How do i post them do i need to add something the the code?

#

nvm gona search it a bit ty

restive otter
#

Is the .hasVoted method based on 24 hours vote or just in overall?

restive otter
#

nvm i got my answer

polar mortar
#

This sounds like a stupid question, but was there a change within the Python API surrounding the status things?

#
@bot.event
async def on_ready():
    print("Connected to Discord Servers.")
    print("Ready for start up.")

    print("Running on v" + str(version) + " on the account " + bot.user.name)
    status = ["Tetradon Gen", ".help"] # Change the status here!

# Changes the status messages on the bot
    await bot.wait_until_ready()
    msgs = cycle(status)

    while not bot.is_closed:
        current_status = next(msgs)
        await bot.change_presence(game = discord.Game(name = current_status, type = 2))
        await asyncio.sleep(60)```
sullen nymph
polar mortar
#

this is my code for it and Idk if there is something wrong with it because my bot won't start

#

but it is surrounds API

sullen nymph
#

Read this channel's topic

polar mortar
#

fine

coral musk
#

fine?

#

xD

heady cradle
#

cough

coral musk
#

cough

#

its dusty in here

heady cradle
#

mhm

#
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}`);
})
#

put token there

#

this is in your index.js file btw

#

main file

coral musk
#

yep

#

ok

#

got it

heady cradle
#

client is what client is defined as

#

and uh

coral musk
#

uhhhh

heady cradle
#

thats litterally all i definitely know

#

because i havent done this

coral musk
#

ok

heady cradle
#

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

dbl.on('error', e => {
console.log(Oops! ${e});
})

#

idk how the events work lol

coral musk
#

ill put the code at the top of index.js

heady cradle
#

mhm

coral musk
#

or something

heady cradle
#

cough

coral musk
#

ok i did it

#

uh

#

now?

#

help

#

what

restive otter
#

hey

#

can someone help me

worn quail
#

with?

restive otter
#

webhooks

#

webhook votes

worn quail
#

I mean

#

we need codd

#

code

restive otter
#

i wanna do that it sends a message when someone votes (by webhook)

neat sierra
#

guys

#

the Token generate on top.gg is so big that it does not fit in one line

tardy badger
#

Inspect element and get it

neat sierra
#

?

tardy badger
#

Right click on the text, inspect element, and find it in the code it should be highlighted

neat sierra
#

nah i can't find it

#

can u send me ss

runic grove
#

right click on it and inspect element

neat sierra
#

next

tardy badger
#

Idk what to suggest, try selecting it and dragging your cursor to the end continues

neat sierra
#

there is like 3 dots in token

runic grove
#

isnt that correct tho

neat sierra
#

can i show the token

tardy badger
#

No

neat sierra
#

so better understand

tardy badger
#

Never

neat sierra
#

so how use the dblapi.js

tardy badger
#

You read the documentation

neat sierra
#

yes

runic grove
#

get your token with inspect element jeez

#

or just zoom out on the page

#

yeah just zoom out

neat sierra
#

done worked

#

thank you

#

now server's shows on website

restive otter
#

xd

restive otter
#

!p aleyna tilki

amber dune
#

-nicetry @restive otter

abstract mothBOT
#

@restive otter

Hey, any bots that have common prefixes are now blocked from reading any channel. Nice try spamming your dms though.

restive otter
#

@amber dune can u unmute my bot and change prefix

amber dune
#

@restive otter no, you can do it yourself through an eval or editing the database yourself

restive otter
#

ok

sullen nymph
#

(Do people realize this channel is for stuff related to DBL API?)

restive otter
#

yes

worn quail
#

no

pallid canyon
#

Is it possible to find out when a specific user last voted?

spiral steeple
#

Webhooks + databases

pallid canyon
#

What do you mean with that

#

Wait do you mean that when someone upvote i should save that time into the database

#

and then check according to that

spiral steeple
#

If you use a webhook you can
On vote -> save id and timestamp to database -> query database for timestamp when needed

#

So basically yeah.

pallid canyon
#

Ok ty

tender crater
#

I don't know how to create a webhook so I can send when someone votes for the bot in a channel

pallid canyon
#

You can use the dbl api for this

sullen nymph
pallid canyon
#

Of course

tender crater
#

i use discord.js

pallid canyon
#

There is an example on the bottom of that page

tender crater
#

thanks

pallid canyon
#

No worries

tender crater
#

What is webhookAuth :?

#

i'm new :c

boreal bridge
#

@tender crater you set it yourself. It acts as a password

tender crater
#

@boreal bridge Do I need anything else besides that?
I'm new and I get Webhook running at http://0.0.0.0:5000/dblwebhook

#

hi?

boreal bridge
#

@tender crater calm down i have a life too πŸ™‚

#

enter the details into the settings page of your bot

tender crater
#

xD

tender crater
#

i don't understand

restive otter
#

https://top.gg/api/users/${user.id} @restive otter

#

API => https://top.gg/api/
Endpoint => /users/{user.id}

karmic veldt
#

The API is

#

submitting false info for my bot

#

and I dont wanna get banned for that

#
  bot.shard.fetchClientValues('guilds.size')
    .then(results => {
      bot.user.setActivity(`-help | ${results.reduce((prev, val) => prev + val, 0)} guilds`);
      data.postStats(`${results.reduce((prev, val) => prev + val, 0)}`, bot.shard.id, bot.shard.count)
    })```
#

It's posting 13k guilds instead of 5050

#

Anyone got any ideas? :/

#

data is defined as js const data = new DBL('my key here'); if that helps

#

Number of shards is right 'nd everything

#

Just server count

#

Β―_(ツ)_/Β―

#

As you can see status is setting just fine

#

Yet its posting wrong guild count

#

:/

restive otter
#

@karmic veldt you can repost this informations :)

karmic veldt
#

wdym?

restive otter
#

wdym?

karmic veldt
#

it’s setting the activity right

#

but not posting right

restive otter
#

I am French please type your answers without abbreviation

karmic veldt
#

Ok

restive otter
#

You can eval js ${results.reduce((prev, val) => prev + val, 0)}

karmic veldt
#

When you use postStats, does that not overwrite the past information given to the API?

#

I have done that

restive otter
#

And repost with a command your stats

karmic veldt
#

It returns the proper guild amount

restive otter
#

You can repost

karmic veldt
restive otter
#

If you're not in the rate you can

#

Yes i know

karmic veldt
#

I have reposted

#

It reposts every time a guild joins or leaves

#

But it’s always wrong

restive otter
#

Oh this is bad

karmic veldt
#

Yes

#

It doesn’t just post once

restive otter
#

"It reposts every time a guild joins or leaves"

#

Don't make this lol

karmic veldt
#

πŸ˜‚

#

Should it not be up to date tho

#

Though ^^

restive otter
#

Nope

karmic veldt
#

I guess it’s a lot of API requests

#

πŸ˜‚

restive otter
#

Wait

#

Yes

karmic veldt
#

How often should I update it?

#

Every 30m?

restive otter
#

I use 35m ^^

karmic veldt
#

πŸ‘Œ

#

You think that will fix my problem?

restive otter
#

You will already solicit the API less

karmic veldt
#

Ok

#

I’ll test it tomorrow at it’s 3:00am right now

#

πŸ˜‚

#

Thanks for your help

restive otter
#

Yes

#

Np

restive otter
#

Can we vote throw api ?

sullen nymph
#

User has to directly vote

restive otter
#

@sullen nymph ? You mean can't with api ?

sullen nymph
#

The user has to visit the Vote page and upvote a bot themselves

#

You cannot vote on behalf of another user

restive otter
#

Okay
thank you

smoky breach
#

Imagine sudo-voting.

smoky breach
#

Trying to set up a DBL voting webhook but nothing shows in console when someone votes.

Code:

const dblapi = require('dblapi.js')
const express = require('express')
const app = express()
const http = require('http')
const server = http.createServer(app)
const get = require('superagent')

module.exports = (client) => {
  const dbl = new dblapi(process.env.DBL_TOKEN, { webhookPort: 80, webhookAuth: process.env.DBL_AUTH })

  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!`);
  });
}
spiral steeple
#

Did you actually set up the webhook on top.gg?

vale sonnet
#

Anyone got an example of posting stats to api (js)

tardy badger
#

That’s all on docs

#

Loads of examples there

vale sonnet
#

docs arent great tbh

tardy badger
#

They are good, they have examples you can copy paste

marsh panther
#

Does anyone here have a good DBL bot I could selfhost with at least logs, and a points system if possible? Would be great if it's in js btw

vale sonnet
#

Getting error 401 unauthorized when trying to post stats..

const DBL = require("dblapi.js");
const dbl = new DBL('TOKEN', client);

setInterval(() => {
      dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
  }, 1800000);

dbl.on('posted', () => {
    console.log('Server count posted!');
  })
dbl.on('error', e => {
   console.log(`Oops! ${e}`);
  })````
narrow zenith
#

you need your bot's authorization token

vale sonnet
#

bruh i legit used it

#

lmfao

#

'TOKEN'

#

line 2

marsh panther
#

Ping me when responding please

smoky breach
#

@spiral steeple yeah I did set the webhook up on top.gg

#

Not to advertise but I have an open-source bot with those features @marsh panther

marsh panther
#

Can you dm me the link please

smoky breach
#

Sure.

fallen basin
#

@smoky breach can you send it me too? XD

heady cradle
fierce grotto
#

Hi

potent roost
#

hi

restive otter
#

@smoky breach send it in dm pls

heady cradle
#

i feel like i wanna see this

floral edge
#

I have a problem, my bot sends 2 messages at once, seems it's an API bug, how do I fix that?

#

Should I use client.once('ready') instead of client.on('ready')?

drifting wren
#

This has nothing to do with the top.gg API, and I don't think that is the issue. If it's sending twice then you have two separate instances running your bot's token

floral edge
#

I have only one

fair pier
#

@floral edge on is just a alias for once

#

in eventListener

#

so that wont fix anything

surreal shale
#

I need a bot setup link

narrow zenith
#

wdym

fallen cypress
#

how do you get top.gg to show that a bot is online? I currently have had a bot running for a few hours and it still shows "???" on the website

drifting wren
#

is the bot in the server? @fallen cypress
I believe if it's in the server it should show automatically? - Just checked and it seems like it's not in the server

fallen cypress
#

how do i add it to the server lmao

#

sorry im still learning

#

okay thank you

worn quail
#

@drifting wren you would ping a single mod with the bot ID

#

ik

#

but it's relevant.

rustic burrow
#

I think im close? idk what to do next tho

#
const dblWeb = new DBL(package.DBLToken, { webhookPort: 5000, webhookAuth: 'nunya' });
  dblWeb.webhook.on('ready', hook => {
    console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
  });
  dblWeb.webhook.on('test', vote => {
    console.log(`User with ID ${vote.user} just voted!`);
  });```
#

Ya not much clue after that, i host on heroku, i think i set up it properly on the site under the API options thing, and ya

#

ping me or dm me

ornate burrow
#

How often does the top.gg widget update?

worn quail
#

Any time the bot updates, and whenever the DBL cache resets

restive otter
#

can someone tell me how i put the dbl upvotes in my bot status

spiral steeple
#

I would use a webhook and a counter, you'll need to reset the counter monthly though.

late crater
#

hi, so
Yknow how they're now the custom status feature
when will that be a thing in the discord API?
or is it already there?

runic grove
#
  1. wrong channel
  2. not really known
late crater
#

ok I thought since it pertains to the API and this is #topgg-api

#

my bad

runic grove
#

read the channel topics next time :p

late crater
#

yeah oops

restive otter
#

can someone tell me how i put the dbl upvotes in my bot status

jaunty steppe
#

how is it that you get the on_vote hook thingy?

#

on_dbl_vote

restive otter
#

@restive otter

jaunty steppe
#

ah right, you need webhooks

#

so

#

how to i do that

sullen nymph
#

Specify webhook_port and the webhook will run
The other webhook args have default values

jaunty steppe
#

ah k

#

whats the default port

sullen nymph
#

We use 5000 usually

rustic burrow
#
const dblWeb = new DBL(package.DBLToken, { webhookPort: 5000, webhookAuth: 'nunya' });
  dblWeb.webhook.on('ready', hook => {
    console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
  });
  dblWeb.webhook.on('test', vote => {
    console.log(`User with ID ${vote.user} just voted!`);
  });```
#

Idk what to do next

restive otter
#
const DBL = require("dblapi.js");
const dbl = new DBL(process.env.DBL_KEY, {
    webhookPort: 5000,webhookAuth: process.env.DBL_WEBHOOK_AUTH}, bot);
dbl.on('posted', () => {
  //bot.channels.get(botlogchannel).send('Server count posted!');
})
 
dbl.on('error', e => {
 bot.channels.get(boterrorchannel).send(`Oops! dbl error: ${e}`);
})

dbl.webhook.on('ready', hook => {
    console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
  });
  dbl.webhook.on('vote', vote => {
    if (vote.type == "test") {
      console.log("Test successful!")
    } else {
      if (vote.type == "upvote") {
        bot.channels.get(botdblvotechannel).send(`${vote.user} just upvoted <@${vote.bot}>!`)
      }
    }
  });
#

when im testing nothing show in console

#

@dense grail

dense grail
#

does your webhook work

restive otter
#

@dense grail idk im just using

#

I found this in a example

dense grail
#

it needs to be a valid host, port and path uhm

restive otter
#

Port is 5000 but how set path

dense grail
restive otter
#

Im not understand how to do this

restive otter
#

I guess your path & hostname is process.env.DBL_KEY

rustic burrow
#

Ya how do you link up a webhook

misty cobalt
#

Hello, I just integrated the server posting into my bot, which seems to work correctly. However, it has changed the number of votes my bot has from 17 to 2, which coincidentally is the same number of votes as my other bot. I checked to ensure the API keys were correct and they are so I am not sure where the issue is coming from.

sullen nymph
#

Monthly votes were reset

misty cobalt
#

thats a thing? my other bot is the same level as it has been for ages. It reset to 2 as soon as I started the bot and the server count came up on the website

sullen nymph
#

Eh yeah, monthly votes are shown on the vote page while you can fetch the total votes with API

#

DBL won't reset the votes until someone votes, however

restive otter
#

on the top.gg website when i go under my bots it has an API Key. What is it?

sullen nymph
#

Long articles short, you use your bot's API key to confirm that it's your bot so you get access to the API directly (as DBL requires authorization for all endpoints)

restive otter
#

ok

misty cobalt
#

Thanks @sullen nymph

sullen nymph
ebon mist
#

Im making an image api with reactions and stuff

#

anyone wanna be a user once im finished with it :/

sullen nymph
#

What makes you think this is the appropriate channel for that

ebon mist
sullen nymph
#

What does the topic say

ebon mist
#

ok then what IS the appropriate channel?

sullen nymph
heady cradle
#

testing the webhook doesnt work for me lol

fading badger
#

How do I make the DBL Website display the server count of the bot?

blissful notch
#

Post to the endpoint for stats

#

either one of the libraries or /bots/{bot.id?}/stats

restive otter
#

wait is it possible to count members in all servers with discord.js

amber dune
#

it sure is

hardy acorn
#

any ideas of how to get the bot total upvotes as clear text so that i can put it on a website

spiral steeple
hardy acorn
#

I already looked at it

#

I do not get the vote counts

spiral steeple
#

Are you sure about that

#

Cuz I see points Number The amount of upvotes the bot has

hardy acorn
#

I cannot get access to it via HTML

#

Neither PHP

heady cradle
#

my webhook isnt working

hardy acorn
#

sad

heady cradle
#

ok

#

the "example" is just not helping lol

sullen nymph
#

Make sure webhook is running and your port is forwarded

heady cradle
#

im 99% sure im doing the right thing, but votes arent hooked

#

so

leaden wasp
#

npm install google-translate --save

scarlet cobalt
#

One message removed from a suspended account.

spiral dawn
#

how would i find if a user upvoted the bot?

scarlet cobalt
#

One message removed from a suspended account.

spiral dawn
#

thsnkd

hardy acorn
#

any ideas of how to get the bot total upvotes as clear text so that i can put it on a website (HTML, PHP)

#

I tried with api but still don't get it to work

sullen nymph
#

total upvotes as text what

hardy acorn
#

yes, as plain text

sullen nymph
#

Not entirely sure how else you can get it

#

fetch your bot page, get points field, you have an integer

spiral steeple
#

I already gave him the docs...

sullen nymph
#

This is DBL, we need to repeat ourselves and abstract everything

hardy acorn
#

As i said, I tried and did not sork

#

wotk*

#

anyways

sullen nymph
#

What exactly have you tried
How have you tried it

hardy acorn
#

ill figure it out one day

#

using the api and bot token (of dbl)

sullen nymph
#

/bots/{bot_id} being the endpoint

#

I just got it and it's working alright

hardy acorn
#

i know

sullen nymph
#

So what's the exact issue

hardy acorn
#

wait

#

what

#

i had

#

before

#

a json

#

with error

#

tf

#

same link tho

sullen nymph
#

Let's combine our messages instead of spamming like that

restive otter
#

Is there a reference documentation to better unerstand discord api other than its orginal api page

sullen nymph
#

For anything not related to top.gg API, use other channels

hardy acorn
restive otter
#

Alright

restive otter
#

Stop tagging me

amber dune
#

-m @jaunty owl spam pinging members and just spamming nonesense | 1 week

abstract mothBOT
#

🀐 Muted MQ DT.| Adrien Agreste#8031 (@jaunty owl)

heady cradle
#

what url do you put in the webhook url

heady cradle
#

because whatever i put doesnt work

spiral steeple
heady cradle
#

do i have to personally fetch the requests?

#

or will the dblwebhook api get it for me?

arctic arch
#

you set up your own webserver and we will send requests to you

heady cradle
#

oh

#

hm

#

then i have to fetch the requests from the webserver to get the votes?

arctic arch
#

you don't fetch webhooks, you listen to them

heady cradle
#

cough

#

just forgot how else to phrase it

#

anhway

#

wait then whats the webhook on vote event for?

sullen nymph
#

For times when someone eventually upvotes your bot

#

You add a custom listener and upon successfully getting a request from DBL, your code will handle that

heady cradle
#

wait im stupid lol

#

wait no

#

so the ready event logs its listening at a port

#

or whatever

#

then should i out that in the webhook url on the website

hardy acorn
runic grove
#

those are outdated

#

read the docs

scarlet cobalt
#

One message removed from a suspended account.

restive otter
#

Guys, when I tried to set a bot on my server, i found out that the site didnt use my account, but another account that i made long time ago. How can I change account to put Bots?

#

Or maybe, Am I saying this to the wrong Channel?

#

If yes, sorry

arctic arch
#
  1. yes, wrong channel
#

-faq 4

abstract mothBOT
wraith flax
#

is there any way to listen to the votes

runic grove
#

use webhooks

wraith flax
#

yes but wheres the webhooks information

#

nvm i found it

hardy acorn
#

@runic grove That's why there is a message at the bottom in the channel

#

and that's also why i sent the channel as answer

runic grove
#

??

runic grove
#

fair enough

#

but whats the point of directing someone to old examples that gives them a link to the new ones

tender crater
#

I want an event to happen when someone votes for my bot, but I see that I need a webhook but I have no idea what that is or how to do it. How do you do it from 0?

spiral steeple
#

@tender crater what language are you using

heady cradle
#

js

#

bet

tender crater
#

@spiral steeple js

spiral steeple
#

sorry it took so long

tender crater
#

What do I have to put here?

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

@spiral steeple

hearty lintel
#

What it says to put there

hardy acorn
#

^^

#

Your DBL token

tender crater
#

@hardy acorn just that?

placid comet
#

k!avatar

scarlet cobalt
#

One message removed from a suspended account.

placid comet
#

oke

willow spindle
restive otter
#

y i am getting this error ```Error: listen EADDRINUSE :::3000
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at Server.setupListenHandle [as _listen2] (net.js:1367:14)
at listenInCluster (net.js:1408:12)
at Server.listen (net.js:1492:7)
at Function.listen (/home/ubuntu/Fantasy-Music-Bot-Devlopment/node_modules/express/lib/application.js:618:24)
at Object.<anonymous> (/home/ubuntu/Fantasy-Music-Bot-Devlopment/MusicBot.js:8:5)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)

arctic arch
#

another program is already using port 3000

restive otter
#

how i change the port in my vps

spiral steeple
#

Change the port number when you set it up MegaThonk

restive otter
#

@spiral steeple how I do that I haven't code any port in my bot file

#

Or i need to change through vps

spiral steeple
#

Show me the code where you makethe webhook.

restive otter
#

:/ I haven't make a webhook till now

spiral steeple
#

It's being created so you made it somewhere...

#

I just want to see the code you have to create it.

spiral steeple
#

Seems like a cache issue. Also wrong vhannel

karmic veldt
#

Is it not relating to the API?

#

Considering I have been editing the code to push stats

#

It's not a cache issue either

#

I have tried multiple browsers

spiral steeple
#

The status is just its status in this server, you don't need to send it yourself. And yeah it's a cache issue it's online for me.

karmic veldt
#

rlly?

#

I have tried multiple browsers, weird

#

Like I downloaded firefox just to test it

#

lmao

spiral steeple
#

/shrug idk then sounds like a cache issue

karmic veldt
#

Yeah its offline on all browsers for me

#

and my friends

#

So its not a cache issue

#

@arctic arch Is the API having any problems rn?

#

Or is it just taking time to sync between the search page and the bot page

arctic arch
#

not api related

#

steven is right, it's cache

karmic veldt
#

cache across devices?

#

its happening to my laptop, my pc, my friend in the UK's laptop

#

And across different browsers

#

cleared cache

#

etc etc

hollow talon
#

OK Β―_(ツ)_/Β―

karmic veldt
#

Ok it finally synced up @arctic arch lmao but there are now different server counts between search menu and actual bot page

#

the bot page now says online tho

arctic arch
#

the caching's on our side, clearing them from your own browser will not affect the results

heady cradle
tame kindle
#

cache issues and not the apporiate channel

hardy acorn
#

^^

heady cradle
#

those were from the images that sam sent

#

but yeah

hollow talon
#

Hey can i have my api token?

topaz wyvern
#

your bots are not yet accepted

hollow talon
#

How much day left?

#

Its been 12hours lol

scarlet cobalt
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

hollow talon
#

.

scarlet cobalt
#

One message removed from a suspended account.

hollow talon
#

I cant wait

scarlet cobalt
#

One message removed from a suspended account.

topaz wyvern
#

-faq 2 -c @hollow talon

abstract mothBOT
hollow talon
#

oh yee

#

ty

#

Cant this bot send u stuff in Dm

#

lol?

amber dune
#

no

restive otter
#

@amber dune ur best mod herebloblul

amber dune
#

why did you ping me in this channel

still coral
#

HI AGAIN

dense basalt
#

-api @still coral

abstract mothBOT
restive otter
rotund dune
#

could any body help me how to create webhook to this work

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

You want a webhook to send this to a channel correct?