#topgg-api

1 messages Β· Page 29 of 1

hollow wraith
#

what is the Authorization field for in the webhook?

severe mist
#

That's your api token

junior goblet
#

if you want to supply authorization with your webhook request

hollow wraith
#

yeah, ive filled it in but i got all the parameters passed in the body ( im pretty sure) and that wasnt one of them

junior goblet
#

its included in the header of the request

hollow wraith
#

oh, so not passed with the info of the webhook

#

userid, botid, type, query

junior goblet
#

when the webhook is triggered it sends a request to the URL you set
inside of the request to the URL is those 4 things you mentioned above, and the Authorization value as a header (if you included it)

#

those 4 things are included in the body, not the header

hollow wraith
#

thank you

#

im a bad boy, ok to pm you?

junior goblet
#

@hollow wraith yeah no worries

calm torrent
#

im a bad boy

shut ibex
#

Sexual

tawny oxide
#

because getMeAsynce() returns IDblSelfBot and not iselfbot

#

I'm still a nub in programing so i could be saying something dumb πŸ˜›

idle haven
#

@tawny oxide Docs outdated, just use IDblSelfBot. You could also just use var. πŸ‘€

hollow wraith
#

who updates the libs?

idle haven
#

I made a pullrequest once lmao

#

Actually the libs are managed by the community. Not even the docs on the Repo of DBL-dotnet-library are up to date.

hollow wraith
#

wrote a page to send userid of who upvoted your bot to discord webhook via dbl webhook, if anyone would like to use it

uncut crystal
#

They are

#

they're not

severe mist
#

it's just a variable name

arctic arch
#

bad variable name

vagrant kayak
#

I'll recreate the library then ;)

timid osprey
#

Does dbots py library only work for rewrite?

#
Failed to post server count
AttributeError: '<class '__main__.Bot'>' object has no attribute 'guilds'
calm torrent
#

hmm it should work for async...

timid osprey
#

Hmm figured it out. Seems it was renamed in rewrite.

#

Changed it to servers rather then guilds.

calm torrent
#

changed what to servers..?

timid osprey
#

from ```py
logger.info('posted server count ({})'.format(len(self.bot.guilds)))

```py
logger.info('posted server count ({})'.format(len(self.bot.servers)))
#

In the example

#

I guess it was not really the library itself but the example code.

timid osprey
#

Hmm still getting this

Failed to post server count
AttributeError: '<class '__main__.Bot'>' object has no attribute 'guilds'
restive otter
#

Okay, so my bot had a Vote Webhook. I was hosting it on Glitch.com but I moved over to self hosting it on a Raspberry Pi 3. I need help setting it back up. I believe Tonkku helped me with this a while back

#

This was the code that i used on the Glitch Hosting Software:

const http = require('http');
const express = require('express');
const app = express();
app.get("/", (request, response) => {
  console.log(Date.now() + " Ping Received");
  response.sendStatus(200);
});
app.listen(process.env.PORT);
setInterval(() => {
  http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
}, 280000);
#

What do i change to make it work? πŸ˜›

#

Oh wait, no wrong code lol RIP

#

This is the code i got:

const DBL = require('dblapi.js');
const dbl = new DBL('Link to the Glitch Project followed by the /dblwebhook', { webhookPort: 5000, webhookAuth: 'My Auth Token' });
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 do I change as I have moved over from glitch to a Raspberry Pi 3

restive otter
#

@arctic arch Sorry if I should not have tagged.

#

Just gotta go soon lol

arctic arch
#

you need to have the public ip of your pi

restive otter
#

Along with the http://?

#

What about the port?

arctic arch
#

port can be whatever

#

but if you're on your home network you may also have to port forward it

restive otter
#

How do I find the Public IP?

#

Oh damn

arctic arch
#

you can type curl ipinfo.io/ip to get your public ip

calm torrent
#

@timid osprey im back

#

probably canr stay for long but lemme try help

#

remove the try/catch clause and remove the logger.exception

timid osprey
#

kk

calm torrent
#

show me the traceback

timid osprey
#

So like this?

           logger.info('attempting to post server count')
            await self.dblpy.post_server_count()
            await asyncio.sleep(1800)
#

Ignore the indents okay sec

calm torrent
#

yep

#

no wait

#

add logger.info('posted server count ({})'.format(len(self.bot.servers)))

timid osprey
#

okay sec

#
Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}
  File "asyncio\tasks.py", line 239, in _step
    result = coro.send(None)
  File "C:\software\discord\publicbot\cogs\dbots.py", line 24, in update_stats
    await self.dblpy.post_server_count()
  File "dbl\client.py", line 100, in post_server_count
    await self.http.post_server_count(self.bot_id, self.guild_count(), shard_count, shard_no)
  File "dbl\http.py", line 189, in post_server_count
    await self.request('POST', '{}/bots/{}/stats'.format(self.BASE, bot_id), json=payload)
  File "dbl\http.py", line 160, in request
    raise Forbidden(resp, data)
#

I did seem to be getting this without logger but lemme add that as well

calm torrent
#

check ur dbl token

#

it's probably wrong

timid osprey
#

That does seem to work I think

#

getting no errors

#

Thanks, I'ma tweak it now that I know it works.

#

I'ma increase it to more than 30 mins and I guess I do not really need it to warn me if it failed or not either.

calm torrent
#

try adding the try/except now

#

if it works then great

#

gn

restive otter
#

@arctic arch
So, is this correct? But the problem is that when I run the bot I get an error:

const DBL = require('dblapi.js');
const dbl = new DBL(`http://${config.raspberryPiPublicIP}`, { webhookPort: 5000, webhookAuth: `${config.discordBotListServerCountToken}` });
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!`);
});

Console Output:

arctic arch
#

update your node

restive otter
#

What do I type to do so?

#

apt-get upgrade or update?

arctic arch
#

update then upgrade

restive otter
#

Ight cheers

arctic arch
#

no wait

restive otter
#

Mhm?

arctic arch
#
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
restive otter
#

ow gosh. Problem is my right click dont work. Gonna have to type it all 😐 πŸ”«

arctic arch
#

try shift + insert or ctrl + shift + v to paste

also

const dbl = new DBL(`the url does not go here, this is the dbl api token`, { webhookPort: 5000, webhookAuth: `this is the authorization you provided on the website bot edit page` });
restive otter
#

Got it, don't worry lmao

#

Thank you for the help πŸ˜ƒ

#

Im such a dummy. I feel like I should go back to learning the basics but. πŸ˜‚ This is correct isn't it?

const DBL = require('dblapi.js');
const dbl = new DBL(`The token when revealed that says The Token for Your Bot`, { webhookPort: 5000, webhookAuth: `WebhookAuth Token`});
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 feel like such a retard

#

whoa

#

buddy

#

we don't use the R word in here

#

@arctic arch I am now confused as to what to put onto the Website Webhook URL...

#

I gotta stop tagging lol. No more tagging from now

arctic arch
restive otter
#

Does it have to be /:port or can it not just be publicip:port

vagrant kayak
#

I think you added a slash in that Tonkku

#

publicip:port is the proper

proud sphinx
#

@restive otter no

restive otter
#

I have gotten that, but still nothing

proud sphinx
#

Port is before the path

arctic arch
restive otter
#

I literally have that set as the URL but I test it and nothing happens

arctic arch
#

is the port open

restive otter
#

Wait, wtf. It is working now. And I tried it again. I am making it log to the Pi's Console but it doesnt seem to be logging to the console for me.

#

Hold up

proud sphinx
#

You use raspberry pi for hosting? Oh

restive otter
#

Yes

#

Wait I realised it was running from Glitch Still. RIP. But the Pi still will not let it work

proud sphinx
#

Umm try to debug this, try sending a demo post from another PC on the network

restive otter
#

Pretty sure everything is setup correctly

#

This is the code I copied down from Glitch.com of my project. Which I have now deleted:

const DBL = require('dblapi.js');
const dbl = new DBL(config.discordBotListServerCountToken, { webhookPort: 3000, webhookAuth: 'Webhook 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!`);
  client.channels.get(config.voteChannelID).send({embed: { color: green, title: `:arrow_up: | Upvote`, description: `**<@${vote.user}> Just upvoted Gamer! Thank you!** :tada:`}}).catch(console.error);
  client.users.get(vote.user).send({embed: {color: green, title: `:arrow_up: | Upvote`, description: `**Thank you so much for upvoting Gamer! It helps me out a lot!** :tada:`}}).catch(console.error);
});
#

When clicking the test button on the dbl edit page, nothing still comes up

#

Even with the port still at 5000 or 3000

proud sphinx
#

No errors?

restive otter
#

Nope

proud sphinx
#

Can you send output?

restive otter
#

Nothing gets output to the console at all

proud sphinx
#

Oh

restive otter
#

ik

#

Will I need to port forward then?

proud sphinx
#

First try on local network

restive otter
#

How lmao. I am not good with networks

proud sphinx
#

Use on PC net view

#

From cmd

#

Get local IP address of the pi, and send post request with snekfetch or smth

proud sphinx
#

do I need to save the webhook in bot edit in order to test it?

arctic arch
#

yes

proud sphinx
#

so that's the reason the test didn't arrive thonkku

#

gonna close the issue real quick

#

nvm still waiting for the test after saving

restive otter
#

Hello

#

I have no idea on how to use this

proud sphinx
#

this?

restive otter
#

The webhook I mean

proud sphinx
#

I am making a tutorial and I really hope to publish it asap

restive otter
#

Alright, thanks.

proud sphinx
#

basically a webhook is a server that when a vote happens DBL server forwards info about the vote to the server

restive otter
#

Yeah I understand

#

I just never used JS before

proud sphinx
restive otter
proud sphinx
#

it's not api related though

restive otter
#

Yeah

#

I'm lost, I'll wait for your tutorial.

timid osprey
#

I get unclosed client session.

#
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 
#
import dbl
import discord
from discord.ext import commands

import aiohttp
import asyncio
import logging


class DiscordBotsOrgAPI:
    """Handles interactions with the discordbots.org API"""

    def __init__(self, bot):
        self.bot = bot
        self.token = ''
        self.dblpy = dbl.Client(self.bot, self.token)
        self.bot.loop.create_task(self.update_stats())

    async def update_stats(self):
        """This function runs every 30 minutes to automatically update your server count"""

        while True:
            logger.info('attempting to post server count')
            await self.dblpy.post_server_count()
            print("Attempting to post server count")
            await asyncio.sleep(1800)


def setup(bot):
    global logger
    logger = logging.getLogger('bot')
    bot.add_cog(DiscordBotsOrgAPI(bot))
tawny oxide
#

just a quick question but i dont get this line.

// Update stats sharded   indexShard shardCount shards
await me.UpdateStatsAsync(24,        50,        new[] { 12, 421, 62, 241, 524, 534 });

Is there anyone that would explain this a bit to me :?

short forge
#

ok so... indexShard is the shard you are posting from, shardCount is how many shards, and shards is a array of numbers that says how many servers are on each shard

#

@tawny oxide did this help ^?

proud sphinx
#

Also please next time send full error message, it's easier to debug that way

sullen nymph
remote bramble
#

have you tried turning it off and on again

edgy nexus
#

@sullen nymph reinstall dblpy

calm torrent
#

is any of ur files called dbl?

short forge
#

^ also

vast junco
#

whats the recommended interval for updating s. count?

calm torrent
#

30mins i think, honestly there isn't really any reason to do it often unless your growth is huge

#

i myself do it hourly

sullen nymph
#

@calm torrent Yep.
@edgy nexus Well, fixed that by manually using aiohttp. Thanks for advice, though. :p

calm torrent
#

if your file is called dbl, it'll be used instead of the dbl you imported.. which will cause issues

weary ember
#

if your bot grows pretty fast then around 10 mins should be good but normal bots 30 mins is nice

calm torrent
#

whats the use even

versed ice
#

I am getting this error: Unhandled promise rejection (rejection id: 4): Error: 403 This host is not accessible. When attempting to retrieve upvotes for my bot. I have no idea why this is happening or how to fix this.

hollow wraith
#

What method are you using.. i think the getvote methods are both depreciated, getvoterids works, but not as advertised

versed ice
#

I'm using snekfetch.

let { body } = await snekfetch.get(`https://discordbots.org/api/bots/${bot.user.id}/`);
uncut crystal
#

looks like it's an issue with your host/machine

abstract jacinth
#

(DIscordGo) Hi, I need help. Can someone tell me how do I check response time for my bot?
DM me

calm torrent
abstract jacinth
#

ok thanks

#

@calm torrent

severe mist
#

Okay, in the API documentation it references a shard_id with the following text.
"The zero-indexed id of the shard posting. Makes server_count set the shard specific server count"

I'm using the semi-experimental internal-sharding branch of discord.js and in the #312614469819826177, it showed you could get the shard id by doing bot.shard.id.

#

That method in the example is impossible for the internal-sharding, as the guilds have the shard id's assigned to them, not the client client.shard returns null, so my question is... is shard_id required if you're posting shard stats?

arctic arch
#

no, it's not required. You can set the total server count with the shard count
shard_id is used if you run posting on each shard separately and want the website to sum them up for you

severe mist
#

ah blobthumbsup

#

Hmm, it appears my stats posting might not be correct πŸ˜’

#
      await post(`https://discordbots.org/api/bots/${this.client.user.id}/stats`)
        .set("Authorization", process.env.DBLTOKEN)
        .send({ server_count: this.client.guilds.size, shard_count: this.client.ws.shards.length });
sullen nymph
#

@calm torrent Ah. I got your question wrong. Nope, none of my files were called... oh wait... GWchadThinkeyes

#

My bad. πŸ˜‚

restive otter
#

someone help

#
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::5000
    at Server.setupListenHandle [as _listen2] (net.js:1346:14)
    at listenInCluster (net.js:1387:12)
    at Server.listen (net.js:1475:7)
    at DBLWebhook._startWebhook (/home/pi/Desktop/jb2/node_modules/dblapi.js/src/webhook.js:25:18)
    at new DBLWebhook (/home/pi/Desktop/jb2/node_modules/dblapi.js/src/webhook.js:20:10)
    at new DBLAPI (/home/pi/Desktop/jb2/node_modules/dblapi.js/src/index.js:51:22)
    at exports.run (/home/pi/Desktop/jb2/events/ready.js:10:13)
    at Client.emit (events.js:185:15)
    at WebSocketConnection.triggerReady (/home/pi/Desktop/jb2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:114:17)
    at WebSocketConnection.checkIfReady (/home/pi/Desktop/jb2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:130:61)
Emitted 'error' event at:
    at emitErrorNT (net.js:1366:8)
    at process._tickCallback (internal/process/next_tick.js:178:19)
#

i switched command handlers and this happend

shut ibex
#

The port 5000 is in use by something

restive otter
#

oh wait

#

its used by my main bot

#

ohhhhhhh

#

ok thx xD

remote bramble
timid osprey
#

It seems my script only runs once and does not update after 30 mins

#
import dbl
import discord
from discord.ext import commands

import aiohttp
import asyncio
import logging


class DiscordBotsOrgAPI:
    """Handles interactions with the discordbots.org API"""

    def __init__(self, bot):
        self.bot = bot
        self.token = ''
        self.dblpy = dbl.Client(self.bot, self.token)
        self.bot.loop.create_task(self.update_stats())

    async def update_stats(self):
        """This function runs every 30 minutes to automatically update your server count"""

        while True:
            logger.info('attempting to post server count')
            await self.dblpy.post_server_count()
            print("Attempting to post server count")
            await asyncio.sleep(1800)


def setup(bot):
    global logger
    logger = logging.getLogger('bot')
    bot.add_cog(DiscordBotsOrgAPI(bot))
remote bramble
#

You aren't exactly making it re run anywhere as far as I can see

#

I don't python so what do I know

vagrant kayak
#

there's a while loop

remote bramble
#

Blind btw

#

Blame samsung

timid osprey
#

It works the first time, I think it errors out as I had to remove the try catches hmm. Gonna copy the example again.

idle haven
#

Ah, the while loop might cause a problem

#

You never exit it

timid osprey
#

This is the original example

import dbl
import discord
from discord.ext import commands

import aiohttp
import asyncio
import logging


class DiscordBotsOrgAPI:
    """Handles interactions with the discordbots.org API"""

    def __init__(self, bot):
        self.bot = bot
        self.token = 'dbl_token'  #  set this to your DBL token
        self.dblpy = dbl.Client(self.bot, self.token)
        self.bot.loop.create_task(self.update_stats())

    async def update_stats(self):
        """This function runs every 30 minutes to automatically update your server count"""

        while True:
            logger.info('attempting to post server count')
            try:
                await self.dblpy.post_server_count()
                logger.info('posted server count ({})'.format(len(self.bot.guilds)))
            except Exception as e:
                logger.exception('Failed to post server count\n{}: {}'.format(type(e).__name__, e))
            await asyncio.sleep(1800)


def setup(bot):
    global logger
    logger = logging.getLogger('bot')
    bot.add_cog(DiscordBotsOrgAPI(bot))
#

But that one gave me an error

vagrant kayak
#

... what error? seems like you just removed the try except

timid osprey
#

logger.info('posted server count ({})'.format(len(self.bot.guilds)))

#

logger.exception('Failed to post server count\n{}: {}'.format(type(e).name, e))

#

I tried changing it into server cause I am in async branch

#

Okay fixed it, just had to change some stuff around but yeah servers do work.

distant dove
proud sphinx
#

thx for that token shot

#

πŸ‘Œ

distant dove
#

πŸ˜‰

#

BTW, I hope they're safer than Discord ones
which are generated from ID and password

sudden rampart
#

discord tokens are safe

short forge
#

they're not generated from password

#

iirc they're generated from id, number (which can be added to discord's epoch to show creation time) and hmac-256 data

uncut crystal
charred portal
#

wtf

#

thats scaryy

#

scary*

shut ibex
#

is guilds in the endpoint /api/bots

#

not used?

#

nvm

mental oak
#

v!server

harsh nest
#

Where the hell is the long description?

#

Oh and why the hell does it keep saying Bot requires code grant

proud sphinx
#

You did oauth wrong

#

Oh wait

#

You're talking about how to add a bot?

terse trellis
#

Can someone who knows node.js to help me please?
I tried to make the webhook. I got an error: require is not defined
I searched on google, I tried to install node.js the modules, but I couldn't make it to work using node.js
my webserver is running on apache2 on a vps ubuntu 16.04.4 x64
I'm new on html, javascript and creating a webserver

arctic arch
#

what's your node version

#

wait are you running that with client side (browser) javascript?

terse trellis
#

node version 10
and ummm
I think no on the client side (browser)
How I do that?

arctic arch
#

what's your current setup

austere swallow
#

How are you running the code?

short forge
#

@terse trellis are you <script>ing

terse trellis
#

I kinda figured out how to run node.js and apache2

short forge
#

node.js webhook has it's own server, and you can configure apache2 to reverse proxy to the webhook

terse trellis
#

I'm still trying to configure apache2 to redirect to some ports like 8080 or for the webhook 5000

dawn kernel
#

What is the latest version ?

#

compile 'com.github.DiscordBotList:DBL-Java-Wrapper:1.0' doesn't work

sudden rampart
#

use latest commit hash

#

and make sure you added the jitpack repo

dawn kernel
#

ok thx

shut ibex
#

is it ok to send the shard id and shard count as 0 if you dont have it?

vagrant kayak
#

I don't think shard count is required to be sent

shut ibex
#

when i try to do the check endpoint it always returns 0 for the people who have and havent voted

shut ibex
#

yeah i just tested it and it says false to every vote

#

o wait soz

zealous bay
#

how do i get the api?

weary ember
#

submit a bot read the docs

shut ibex
#

@weary ember sumbit

weary ember
#

@shut ibex mistakes were made mmLol

fast hollow
#

@bleak phoenix

#

f.

#

f.help

edgy nexus
strange jasper
#

tokens generated from id and password lmfao

sudden rampart
#

they are from id

restive otter
#

Right so im sending a POST request to the stats endpoint but getting a 400:

{
"error": "Required parameter server_count or shards missing"
}``` However the body of my request **does** include the server_count: ```json
{"server_count": "17"}```
#

ah

#

needed to specify content-type header

gilded breach
#

@restive otter

tidal burrow
#

beaned

shut ibex
#

is it me or is the webhook not arriving at all

hollow wraith
#

Havent tried any testing today.. but no upvotes came through either

hot oxide
#

omg what a pure shit of api

#

purest shit

arctic arch
#

ok?

dapper finch
#

@dapper finch

#

@dapper finch

#

Β―_(ツ)_/Β―

snow fiber
#

Webhonkkkk

robust olive
#

honk? blobairhorn

restive otter
#

What do I put here for a vote system If I am hosting my bot from a Raspberry Pi 3?

#

apparently i need my pi's public ip, how do I get that?

#

I dont want to have to port forward either

sudden rampart
#

you'll have to port forward

#

or use something like cloudflare argo tunnels

#

but they're paid

restive otter
#

how to i create a feature where bots can check if you voted

#

@sudden rampart Okay, I almost done it, What Type am I going for?
TCP, UDC, both

and what do I put in Start Port:
and what do I put in Finish Port:
?

sudden rampart
#

tcp

restive otter
#

nvm I got round that. What do i do here?

sudden rampart
#

set both to the port you want

restive otter
sudden rampart
#

not ssh

restive otter
#

What then

sudden rampart
#

idk, what options are there?

restive otter
#

HTTPS?

hollow wraith
shut ibex
#

ads

hollow wraith
#

Lies

restive otter
#

@sudden rampart

#

Do I use HTTPS?

hollow wraith
#

Webhook system if u cant get portforwarding figured out

mystic wing
#

yeah

sudden rampart
#

show me the options @restive otter

restive otter
#

I cant, it is a dropdown box and closes when I snip it

#

o wait

#

@sudden rampart

#

?

shut ibex
#

so i have this weird question, if the webhook doesnt send to http how is dblapi.js webhook working

restive otter
#

?

#

@sudden rampart You there?

loud gulch
#

why are webhooks like this

mystic wing
#

cause that is how they were coded β„’

terse trellis
#

why I have this?
Webhook running at http://0.0.0.0:5000/dblwebhook
shouldn't be my ip there?
I can't make the webhook to work
but the post on the url is working

vagrant kayak
#

Just Google what's my ip

shut ibex
#

ive tested it and afaik it doesnt work on http

vagrant kayak
#

tf?

shut ibex
#

ye

#

ive tried it like 6 different times with diff ports and with my public and ipv4 address

#

i never get request

#

but when i use my website url thats https i get the response

vagrant kayak
#

Why would they hard-require HTTPS

shut ibex
#

idk

#

@vagrant kayak ask tonky

terse trellis
#

I have https and ipv4

shut ibex
#

im talking about http

#

also if you have https and ipv4 its better to make your own server for webhooks

dawn kernel
#

List<String> voterIds = api.getVoterIds("bot id");
This will just return all userIds who've voted once or more right ?

#

So it's not bound to time

#

Because i would like to do like a giveaway each month for people who've the biggest voting streak

proud sphinx
#

use a webhook please

dawn kernel
#

oke

proud sphinx
#

this is what webhooks are for

dawn kernel
#

oh

#

Soo

#

Do I need to write a webpage for using a webhook or can I use it in java ?

#

example url: https://domain.com/webhook

proud sphinx
#

as long your port is forwarded and your server is up

#

webhook is basically a server that listens for changes

dawn kernel
#

port 80 and 433 right ?

#

or 443 idk the ssl port anymore

proud sphinx
#

it doesn't have to be http or https port

pseudo patrol
#

User votes => dbl sends a POST request to your url with the userid of who voted => you receive the data and store it in whatever database you want

dawn kernel
#

Oh

#

So I need a php page ?

sudden rampart
#

no

#

doesn't have to be php

#

can be anything that handles http requests

restive otter
#

hi can i get some help on how to get bots

#

?

pseudo patrol
#

wew

lament moon
#

Hello, if esque send the request for my bot's certification, how long is the response time?

remote bramble
#

How is this API related

severe mist
#

@lament moon "It's done when it's done", only one person handles certification, and he's extremely busy, so you just have to wait

weary ember
#

its exam time so yea......

lament moon
#

York#0001 ty

#

Does anyone know any way for the bot to get information about how many users are on a server and the server logo of the invitation?

proud sphinx
lament moon
#

okay

royal oak
#

hi

restive otter
#

How am I able to detect when someone votes for my bot? I'm using discord.py rewrite

proud sphinx
#

have a webhook damn I should really work harder on the tutorial

restive otter
#

yeah I've never used webhooks for my bot before, so it'd be a first for me

#

do you have a tutorial for it?

proud sphinx
#

I am making one

restive otter
#

..o

#

@proud sphinx is there any docs I can read to explain how to do it?

proud sphinx
hollow wraith
#

@restive otter until you get it figured out, you can use this system i made a week or so ago.. okd by the admin to share it. Https://pokecord.net/webhooks/

#

It will give you a link to put into the DBL webhook url for your bot. That will go straight to your discord channel you created a webhook for.

uncut crystal
#

@hollow wraith that's not what he was asking at all

#

unless someone explicitly asks for what your service does, you don't need to mention it

hollow wraith
#

How they explicitly supposed ask for something that only a few people knows exists? People like to get their stuff going asap, this is a nice bandaid for people who struggle to get webhooks working. I never got it working, so i set up public service. I have seen tons of people get zero help other than learn to set up webhooks. Which is why i talked to a different moderator and the Website Administrator who gave me the ok to share this.

uncut crystal
#

from what I understand

#

your service posts webhook data to a Discord channel

#

that is not what he asked for nor does it solve his issue

hollow wraith
#

How am i able to detect upvotes....

#

Solved until he has time to figure out how to do it properly

uncut crystal
#

who told you it was okay to share this

shut ibex
#

ok so the api is not hardcoded. But how come it doesnt work on ipv4 on my desktop but on my vps

hollow wraith
#

Tonkku and blake

#

No ads, no bullshit lol just an easy way to get people set up for webhooks when its not something they thought about before getting their bot accepted. Ive seen tons of people come in here and ask how to get upvote notifications.. the only response they get is learn to do webhooks. Then they say thanks and most dont come back. My harmless service isnt hurting anyone, doesnt really require people to get upset that i made it for a free service that doesnt even have a sign up πŸ˜‚

shut ibex
#

I dont think its hurting anyone but why not tell people how to do it before giving them a link

hollow wraith
#

Because ive asked for help in here quite a few times and got zero help. Im fairly inclined, but i couldnt get something to work, from listening for webhooks to port forwarding.

shut ibex
#

because the three times ive seen you do it, you didnt explain a different way

#

not everyone wants something handed to them

hollow wraith
#

They dont have to use it, but atleast they know its an option. Instead of waiting hours for a response or get the same thing repeated to them, when they have already tried it

shut ibex
#

it seems like your doing this because of something that happened to you

hollow wraith
#

Sharing something that anyone can use at their leisure?

#

I just shared a webhook option for people. You are mainly the only person bothered by it

#

Which is why when i brought it up again. I said its a system he could use until he gets it figured out properly.. because i realized u had become upset over a different webhook option

shut ibex
#

would you like to explain to me this "different webhook option"

hollow wraith
#

They can use the discord webhook option created by discord to recieve webhooks. Under server settings if you have permissions in a guild, you can create them for certain channels

shut ibex
#

im not upset because of that

#

im upset because you dont show them a different way first

#

before giving the link

hollow wraith
#

Instead of opening ports and having their own server

#

Ohh.. so there is like a thing.. they have to learn how to have their own webhook server before they can do anything else

#

Gottt it

shut ibex
#

im not saying that they have to learn how to do it before they can do anything else

#

also theres no consequence for learning

hollow wraith
#

But you assume everyone has time to learn it, and im out of line for offering a faster way

#

πŸ‘

shut ibex
#

so like the easy way out

uncut crystal
#

@hollow wraith For now I'd like you to only mention the service unless someone asks for instructions regarding embedding votes into a Discord channel

shut ibex
#

i see

hollow wraith
#

Ok timmy

uncut crystal
#

I'll get back to you on it, but it looks like it was just a misunderstanding

#

set an Authorization header with your token

shut ibex
#

why do certain things give Not accessible while others give forbidden zoomeyes

uncut crystal
#

http 401 vs 403

#

check whether your key is valid

calm zodiac
#

im getting the same

#

and my key is valid

#

i just regened my token and it still doesnt work

fathom mortar
#

same

calm zodiac
#

unless something their side is broken

dawn kernel
#

I manually did a post request and it worked but when I vote with dbl it doesn't do anything

proud sphinx
#

Try authorization

#

Without caps

calm zodiac
#

tried that

#

didnt work

proud sphinx
#

Umm

calm zodiac
#

honstly i think its their side

proud sphinx
#

It works for me GWnekomakiPats

calm zodiac
#

snekfetch?

proud sphinx
#

Okhttp

calm zodiac
#

can you show the code?

#

if you want

dawn kernel
#

soo

#

$_POST["bot"] is not gonna work ?

dawn kernel
shut ibex
#

why are you posting to the api again?

dawn kernel
shut ibex
#

what are you trying to do with the api

dawn kernel
#

Make a webhook so that I can put that in a database when someone votes

shut ibex
#

you dont post to the api for the webhook

dawn kernel
#

oh

shut ibex
#

you make a webserver for it

restive otter
#

how do I add servercount to the site unsing api (discord.js)

shut ibex
#

you could either use snekfetch and post with that or use dblapi.js

restive otter
#

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

#

so this is servercount

#

?

shut ibex
#

thats for auto posting with dblapi.js

#

yes

restive otter
#

Thanks @hollow wraith πŸ˜ƒ

#

still says n/a

shut ibex
#

the dblapijs lib posts every 30 minutes

hollow wraith
#

@restive otter you're welcome? :)

restive otter
#

for the webhook thing

#

const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('asdasdasddtokehere', client);
so this is a;ll i ad

#

*all I add

hollow wraith
#

Oh no problem. People helpin people

shut ibex
#

@restive otter yes

restive otter
#

k

restive otter
hollow wraith
#

I believe 403 is an authentication issue.. double check tokens

distant flare
#

Has the POST stats api changed?

#

but then dblapi.js uses /api/bots/stats

#

without an id

arctic arch
#

it's a marker for optional

vale sleet
#

i installed pydbl, and it broke my bot! asyncio issues

calm torrent
#

?

#

show traceback and stuff

#

and code

vale sleet
#

there was no errorlogs, i uninstalled dbl and rolled back asynchio and it works again

distant flare
#

oh, didn't see that ? actually, thanks for that

hot oxide
#
const Eris = require("eris");
const dbl = new DBL(token,Eris);```
#

is this ok?

#

I'm not sure about that second parameter, its "client". But not sure what is client in Eris.

arctic arch
#

its probably your bot variable

#

its whatever holds the new Eris('token')

vast junco
#

@hot oxide

// Initiate client and lib
const Eris = require('eris');
const client = new Eris('bot_token');

// Do DBL posting stuff
const DBL = require('dblapi.js');
const dbl = new DBL('dbl_token', client);
fervent estuary
#

Anyone any idea?

austere swallow
#

They are different endpoints lol

#

hasVoted checks last 24hrs

#

getVotes fetches all for the past month

#

Correct me if wrong.

little crown
#

alright, so i want to make a user recieve "coins" when voting. but im not sure how i can go about doing this. My bot is written in java and im using the java library provided. however the only way to see who voted is by getting a list of all the voters. If i want to create an event based system, to see who voted, would i have to have a cached list, and every so oftern compare it with the new list, and run the event function for each new voter?

#

Or should i just use a webhook instead, because i already have a web api setup, so i can easiliy add a webhook to that.

uncut crystal
#

yes, if you can, use webhooks

little crown
#

actually, webhooks look like the best bet

#

and the easiest to setup with wat ive got

fervent estuary
#

@austere swallow I voted myself within the past 24 hours, it should return true

austere swallow
#

yeah it should

#

does it

#

?

fervent estuary
#

It does not, unfortunately

little crown
#

is there a test webhook thing anywhere, so i can see what kind of message the site will send, and so i can test on pseudo users?

dull sundial
little crown
#

o right lol

snow fiber
#

does the webhook still return "unvotes"

#

Or is it not possible to remove your vote anymore

#

The type of the vote (should always be "upvote" except when using the test button it's "test")

vagrant kayak
#

You can't remove a vote

snow fiber
#

Ah

#

Used to be possible

vale sleet
#

Hi there, i've generated my token and entered it, however when i try using it i just get back dbl.errors.Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}

stone depot
#

Yep same here

#

trying to use the post_server_count() in the Python library

calm zodiac
#

Just going to tell people now

i had issues using snekfetch to post/get stuff from DBL

i moved to okhttp (https://www.npmjs.com/package/okhttp) and that fixed the error of 403

not sure there is a python version.

reef apex
#

well (only thing and) the thing that works is aiohttp

restive otter
#
if (message.content.startsWith(prefix + "testtt")){
  const { body } = await snekfetch.get(`https://discordbots.org/api/bots/430775188448083988/check?userId=${message.author.id}`)
    .query({ userId: message.author.id })
    .set({ Authorization: "theTken"})
  console.log(body);
}```

I have voted for the bot, however, it's telling me I haven't...
#

What could I possibly be doing wrong?

proud sphinx
#

Don't use query

#

You already did it in the url

#

And I don't think authorization is needed for check

arctic arch
#

yes it is

proud sphinx
#

So NVM that

restive otter
#

Oh ok

shut ibex
#

That endpoint sees if the user votes in the last 24 hours

vale sleet
#

anyone had any luck with post_server_count() yet?

mystic wing
#

What lib are you using?

vale sleet
#

the python library

#

dblpy

#

Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}

humble magnet
#

@vestal cloud

#

@vestal cloud help

#

-botinfo @vestal cloud

abstract mothBOT
#

That bot wasn't found

vestal cloud
#

Are you retarded ?

arctic arch
humble magnet
#

Oh s**t

#

Sorry

#

I am so sorry

vestal cloud
#

Here is the help command list :
/help
/iamrytard

arctic arch
#

lol

humble magnet
#

You don't have to be an asshole about it

#

Jesus

restive otter
#

-botinfo @ibot

abstract mothBOT
#

Please include a bot mention

restive otter
#

-botinfo @twilit hound

abstract mothBOT
#
Bot info
ID

383658506060038144

Username

iBot

Discriminator

9000

Short Description

A simple multi-purpose discord bot.

Library

discord.js

Prefix

! (customisable)

Upvotes

7

Server Count

27 Servers

Owner(s)

@open garden
@crimson shell

pseudo patrol
#

what is shard_id for

vagrant kayak
#

Wut

loud gulch
#

current shard...?

restive otter
#

Everytime I reset my TOKEN for the server number thing on dbl I get this error and I have reseted it 4 times ```[dblapi.js autopost] Failed to post stats: {"error":"Unauthorized"}

sudden rampart
#

did you update the token in the bot

restive otter
#

Yes.

vale sleet
#

im getting the same error @restive otter

loud gulch
#

how to post server count

#

what is the link to post stats to

vale sleet
restive otter
#

The endpoint is /bots/id/stats

swift ice
#

-botinfo @swift ice

abstract mothBOT
#

That bot wasn't found

swift ice
#

-botinfo @Delano Tatsumi#8248

abstract mothBOT
#

Please include a bot mention

swift ice
#

-help

restive otter
#

@swift ice Luca in #testing channels please

remote bramble
#

Why has everyone been using it here recently lmao

abstract mothBOT
#
Bot info <:dblCertified:392249976639455232>
ID

413728456942288896

Username

BoxBot

Discriminator

7194

Short Description

A fun Discord bot where you can open random boxes to get random items - and then use those items to attack your friends!

Library
Prefix

b!, b1

Upvotes

99873

Server Count

21348 Servers

Owner(s)

@charred ocean dblCertifiedDev

severe mist
pseudo patrol
#

What is posting the shard_id for hyperthink ik it's the current shard but why would you post it

robust olive
#

so lUcA can add the individual shard guild amounts together ablobcatattention

pseudo patrol
#

Oof it does that notLikeMiyaButFast

elfin solstice
#

yea

#

you can just post each shard and dbl will show the full amount of all

#

with shard_id and the other thingy

pseudo patrol
#

notLikeMiyaButFast I had to manually make a server to post each shard and count then send total to dbl angeryBOYE

elfin solstice
#

why πŸ‘€

pseudo patrol
surreal junco
#

πŸ˜‚

#

I mean can't you just post each shard to dbl and they handle it for you? πŸ€”

remote bramble
#

^ ???

reef apex
#

@pseudo patrol

swift bough
#

.

restive otter
#

-botinfo @split zephyr

abstract mothBOT
#
Bot info
ID

444229792221495328

Username

SpaceX Launch Director

Discriminator

7954

Short Description

A bot that keep track of SpaceX's launch activities

Library

discord.js

Prefix

LD!

Upvotes

2

Server Count

No server count

Owner(s)

@zinc belfry

proud sphinx
restive otter
#

oh ok

restive otter
#

<@&304313580025544704>

elfin solstice
#

why did you ping all mods?

#

πŸ‘€

tardy crater
restive otter
#

@elfin solstice Why did they mute my bot?

tardy crater
#

Idk man

#

Look it up

elfin solstice
#

for the next time please only ping one mod

#

woops

#

typo

restive otter
#

okay

elfin solstice
#

@restive otter you can see the reason in #mod-logs

#

search by your bots name or ID

restive otter
#

@restive otter

elfin solstice
rancid scarab
#

Why aren't there any bots in the My Bots section? I added one

tidal burrow
#

it has to be approved first, plus this isn't the place for this question

rancid scarab
#

ah, ok

sullen raptor
#

@junior goblet I need some help with my DiscordBots webhook

#

@elfin solstice I need some help with my DiscordBots webhook

elfin solstice
sullen raptor
#

how do I get it to work? lmao

elfin solstice
#

you shouldn't ping mods for that but while im here what you need

#

well

sullen raptor
#

ok I won't ping mods

elfin solstice
#

you use a small http server and then put all the information (ip and auth header) in the webhook part of your bots profile πŸ‘€

#

it should accept post requests

sullen raptor
#

could I use Uptime Robot?

elfin solstice
#

and if you use JS there is an integration in the Official DBL lib btw

#

no

#

you cant

#

Uptime Robot is something different

sullen raptor
#

ah ok

shut ibex
#

Your not supposed to ping anyone at all for help

arctic arch
#

what's uptime robot?

severe mist
#

It's what people use to ping glitch projects to "keep them alive"

junior goblet
#

i use it for my website

#

and yeah it just pings my website every 10 mins or so

elfin snow
#

Hello

#

Im a new Bot developer

small pier
#

Hi @elfin snow

elfin snow
#

May i get help

#

Like suggestions?

restive otter
#

This is for the discord bot list api, if you are looking for help with making bots, try #development or the DISCORD api server.

hollow wraith
#

@sullen raptor did you get webhooks figured out?

novel cape
#
const dbl = new DBL("TOKENNNNNN", { webhookPort: 5000, webhookAuth: 'password' });
module.exports = async (client) => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
    console.log(`I am ready in ${client.guilds.size} Servers & Spying on ${client.users.size} Users`)
    client.user.setActivity(`-help | ${client.guilds.size} Servers | ${client.users.size} Members`)
    const games = ["Version 1.2.0", "Try -serverinfo", `-help | ${client.guilds.size} Servers | ${client.users.size} Members`]

    setInterval(function(){
    client.user.setActivity(`${games[~~(Math.random() * games.length)]}`, {type: "STREAMING", url: "https://www.twitch.tv/snowflake_2018"})
    }, 15000 );
    client.channels.get('444332803572891649').setName(`${client.guilds.size} Servers | ${client.users.size} Users`);
};```
#

I know hook isnt defined, but how would I add it into this?

sullen raptor
#

@hollow wraith eh, not really

rancid scarab
#

My bot's stats aren't showing up on its info page

#

Like, how many servers it's in

#

Here's my code:

  const dbl = new DBL(client.config.dblToken, client);
  setInterval(() => {
    dbl.postStats(client.guilds.size, client.shard.id, client.shard.count);
  }, 1800000);
#

Could it be because my bot doesn't have any shards yet?

mystic wing
#

probably wrong token

#

sure that is right?

#

also if you don't have shards you don't have to post them

#

could cause errors

arctic arch
#

why do people keep giving the client for the autoposter and then manually doing the same thing

#

idk how to make that any clearer

sullen raptor
#

oof

glad siren
#

const dbl = new DBL('Your discordbots.org token', client); Why does it need our bot's client passed in?

proud sphinx
#

I think to get the stats to post

glad siren
#

But I imagine it's different for different bots; isn't DBL.postStats() used for that?

proud sphinx
#

Umm wait a sec I will check

glad siren
#

oh it is

proud sphinx
#

It's for automatically posting server count stats

rancid scarab
#

client.config.dblToken in my code references config.json

#

I swear I have the right token, and I've switched to just using const dbl = new DBL(client.config.dblToken, client);

#

So why isn't the server count showing on my bot's page?

rancid scarab
#

Could it be because I'm using the master branch of Discord.js?

rancid scarab
#

Finally got it to work, had to use dblposter instead

#

wait oops

noble iron
#

bots are muted here

rancid scarab
#

yeah, i knew that

#

wrong channel

#

lol

noble iron
#

oof

arctic arch
#

is your client variable even the discord.js instance

slim cradle
#

How can i make cogs on a python bot?

noble iron
#

ez

slim cradle
#

=)))

noble iron
#

make a cogs folder

slim cradle
#

I'm so noob ))

#

Okay, folder done

noble iron
#

place cogs in and make sure they work

slim cradle
#

And

#

Not need a code?

#

?

noble iron
#

put the cogs in the cog folder first

slim cradle
#

I have 2 commands

#

Need to delete?

noble iron
#

then after that in your main bot file add this

import os #required

for file in os.listdir("cogs"):
    if file.endswith(".py"):
        name = file[:-3]
        client.load_extension("cogs.{}".format(name))
slim cradle
#

Or..

#

Go dm =))

noble iron
#

minimal spoonfeeding πŸ‘Œ

weary ember
noble iron
#

k

kindred verge
#

How would I send my bot server count to an embed or somehow store it on my website?

shut ibex
#

Make an api

kindred verge
#

*effort

shut ibex
#

Send data to that

#

Then store data in a local

kindred verge
#

is there a way to easily make an api

shut ibex
#

What lang

restive otter
#

JS has like 100000 libaraies for that

#

also Python

#

If you use C#

#

Well they probably have that too

shut ibex
#

If ur using js use express

restive otter
#

just search ofr

#

^

shut ibex
#

Or koa

restive otter
#

Well it depends

#

I personally use express

#

I know that

#

SpaceX API is made with KOA

#

and some other stuff too

fervent yacht
#

do you get the api key after the bot is accepted or am i just missing something?

restive otter
#

Yep, only bots that are approved appear in your "My Bots" list

fervent yacht
#

ok thanks

restive otter
#

Is there a thing that’ll trigger the code on an upvote in JavaScript?
Like
Client.on(upvote) type stuff

#

Nvm

#

Just found it

#

I copy pasted the web hook thing exactly

#

The hook.on”ready” works but the β€œvote” won’t

#

No errors show up

hollow wraith
#

U have to set up portforwarding

proud sphinx
#

You need to set up a webhook which as any servers requires an open port

slim cradle
#

Hi there

#

How can i add BOT PREFIX= prefix

#

In python

#

And at commands to set {prefix} or idk

severe mist
slim cradle
#

Oh sorry

undone jolt
#

how can i get channel id automacilly with my bot through this command:

!SAY-CHANNEL #general HELLO!
severe mist
#

@undone jolt this channel is for the DBL API, all discord api questions belong in #development

shut ibex
#

Lmfao

valid rain
#

!help

restive otter
#

<@&265158261945270273>

azure pollen
#

<@&265158261945270273> hi, this guy needs help and he needs everyones help all at once (he obviously needs us all to answer since he tagged us all)

#

@arctic arch ??????????

arctic arch
#

yes

restive otter
#

help

azure pollen
restive otter
#

vote??

tardy crater
#

yes??

restive otter
#

Votehook

snow fiber
#

Haha

#

Yes

restive otter
#

@restive otter SpaceX API?

#

Does it work with Node?

short forge
#

that isn't the dbl api, so you should go to #development fyi :p

restive otter
#

u right

#

but i've already mentioned him now so 2 late

restive otter
#

YEs it wirks wth node, you have to know How to use it though

elfin solstice
#

Its never to late to switch channels

#

:)

restive otter
#

XD

restive otter
#
const dbl = require(`discord-bot-list`)
 
const client = new dbl({
    token: "Your API token",
    id: "411995912781561866"
})

client.postStats("Your bot's server count, MUST be a number, not a string", (err, res) => {
    if(err) {
        console.error(err)
    } else {
        console.log(res)
    }
})
#

Where do I put this in my bot??

#

@spring kiln

#

In the bot main file?

#

bot.js??

restive otter
#

Hello???

weary ember
restive otter
#

Already on that.

#

But I can seem to copy the whole api token.

#

Nvm

#

Just had to regenerate it.

#

Umm

#

Where do I put the code??

azure pollen
#

where do you think?

restive otter
#

Bot.js

azure pollen
restive otter
#

Wait so which api should I use?

junior goblet
#

waitwhat what

azure pollen
restive otter
#
const dbl = require(`discord-bot-list`)

const client = new dbl({
 token: "Your API Token"
    id: "411995912781561866"
})

client.postStats("Your bot's server count, MUST be a number, not a string", (err, res) => {
    if(err) {
        console.error(err)
    } else {
        console.log(res)
    }
})
#

This right?

weary ember
#

no....

#

why are u using discord-bot-list

#

if u wanna go legit use snekfetch use dblapi.js

restive otter
#

Ok.

tidal burrow
restive otter
#
const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('Your discordbots.org token', client);
#

Something like this??

weary ember
#

yea

#

check the docs lmao

restive otter
#

Can't read docs.

#

I am too dumb to do it.

azure pollen
#

then don't bother us about it, we're not here to spoonfeed you

restive otter
#

Ik

azure pollen
#

read it and understand it or learn to understand it

restive otter
#

That's like asking someone who speaks a language to translate everything for you, it may work for a bit, but eventually you're gonna need to learn it yourself

long spade
#

How to post the shard count? I am already posting the server count to the API

proud sphinx
#

how do you post the server count?

mystic wing
#

if you are using js

#

there are some others on there

long spade
#

I am using python and I only need the payload key

pseudo patrol
#

payload key think

long spade
#

Found out my own, thanks anyways

proud sphinx
#

it's not dbl api related

formal nebula
#

@pseudo patrol nice meme

raw night
#

Why is my server count N/A

junior goblet
#

you need to manually post your server count to our api

raw night
#

How?

junior goblet
#

it doesn't automatically update

#

one sec

raw night
junior goblet
#

"Servers this bot is in" is for Discord Server List

#

not related to your server count

glossy linden
#

How do i give my bot commands i am a noob at this πŸ˜„

proud sphinx
#

Learn the library you work with

waxen bolt
#

Lmao what a question @glossy linden

raw night
#
        dbl.postStats(bot.guilds.size, bot.shards.Id, bot.shards.total);
                                                  ^

TypeError: Cannot read property 'Id' of undefined
    at Timeout.setInterval [as _onTimeout] (C:\Users\jacks\Desktop\Projects\X-Tron\index.js:43:51)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:267:5)``` That is actually the error
steel hawk
#

Code: js setInterval(() => { dbl.postStats(bot.guilds.size, bot.shards.Id, bot.shards.total); }, 1);

sullen nymph
#

Could it be shards.id I am not familiar with d.js.

raw night
#
        dbl.postStats(bot.guilds.size, bot.shards.Id, bot.shards.total);
    }, 1);``` Tetra is right
#

Yeah but I have everything installed

steel hawk
#

we tried id

#

Still didn't work

raw night
#

And ID

#

Can anyone help me?

arctic arch
#

oh no

#

not like this

#

you're about to post starts once every freaking millisecond

#

that's gonna get you temp banned from the api real quick

proud sphinx
#

Tonkku read all the chat lol

arctic arch
#

yes I saw the meme

loud gulch
#

how to see who upvoted my bot

proud sphinx
#

use a webhook

restive otter
#

^^

restive otter
loud gulch
#

post server count

#

duh

restive otter
#

My bot is in 40 servers or more How should I prove this to you?

proud sphinx
#

You need 100+

loud gulch
#

^

proud sphinx
#

And you should post server count

#

Look at the api

restive otter
#

And how am I supposed to prove it to them?

vagrant kayak
#

They'll know you fake

#

Proving == just posting

hoary timber
#

Is there a way to let the site perform some sort of action on vote, or do I need to let my bot listen to the Votes in a regular interval?

austere swallow
#

Webhooks

hoary timber
#

ok... But tbh. I don't know how I would actually check those... Maybe with a MessageRecieveEvent on the channel with the webhook?

#

Also is the output a normal String, or something like an embed?

#

I get no response in the Discord from the webhook...

austere swallow
hoary timber
#

I just need to make a webhook and use the link of it in the Webhook-section of the edit-page right?

#

Or do I need to edit something?

austere swallow
#

idk xD

arctic arch
#

it's not a discord webhook
you make a webserver to listen to POST requests

hoary timber
#

....

arctic arch
hoary timber
#

I already read it and it doesn't help me at all

#

Because I still don't know:
1.) How to setup a page/system that reads on the votes and
2.) How my bot can read the votes

#

because as far as I understand it, needs my bot still to read to something, to notice the changes...

arctic arch
#

what's your language

hoary timber
#

You mean of the bot or...?

arctic arch
#

yes

hoary timber
#

Java (JDA-library)

#

And yes I read the pages in the API-section

spiral isle
#

Use unirest

hoary timber
#

<--- Noob right here

hollow wraith
shut ibex
#

Im pretty sure this is what aeth said not to do

proud sphinx
#

It's a nice idea but there are security flaws

hollow wraith
#

@shut ibex u talking to someone else right?

restive otter
#

Style don't work

proud sphinx
#

hook a weeb to anime

#

bham

restive otter
#

but dont work

shut ibex
#

@hollow wraith talking to u

hollow wraith
#

@shut ibex why?

shut ibex
#

Aeth said not to bring it up unless they ask about your service

hollow wraith
#

we go through this every time.. timmy asked me not to mention it unless someone asks about discord webhooks

#

aeth never said that, and a mod and the administrator said its ok

#

so no one needs u to say something every time when it gets mentioned once a week lol

shut ibex
#

Whenever u bring it up it looks like your shamelessly advertising ur service

hollow wraith
#

everytime i bring it up, someone gets helped out.. lol nothing in it for me

#

doesnt really matter what your opinion on it is

shut ibex
#

If u see there it says embedding a webhook in a channel

#

I don't think that person wanted a webhook in a channel

hollow wraith
#

well if u knew how to read properly, u would

#

πŸ‘

shut ibex
#

Someone's triggered

hollow wraith
#

yes u are, everytime i offer a free service for people until they figure out webhook servers πŸ˜‚

restive otter
#

Style don't work in the webpage.

shut ibex
#

Did they ask for your free service

#

They didn't

hollow wraith
#

did they ask how to get webhook for upvote into discord

#

yes they did

#

ez mad boi

shut ibex
#

Whrre

#

Where

#

They didn't ask for it did they

hollow wraith
#

just move along u dont need to comment on everything that makes u feel upset

#

they were asking who to get the webhook for discord to work

#

viola.. uncle to the rescue.. and here you are going off about the same nonsense u were on about last week

#

@restive otter what do u mean?

shut ibex
#

It's not no sense, its you being incapable to understand

hollow wraith
#

youre being incapable to mind your own business lol.. i understand perfectly.. dont mention my services unless someone is asking about discord webhooks

#

now the guy has working discord webhooks for upvotes and no one is hurt

restive otter
#

@hollow wraith

hollow wraith
#

ah, someone had an issue like this a while ago do u have the site live right now?

restive otter
#

Directly before it worked and now no longer and I do not know why

hollow wraith
#

does the picture still exist on discord? u could try uploading it somewhere else, more permanent

restive otter
#

to change the link?

hollow wraith
#

yeah, there are lots of free image hosting sites, or if you have your own web host, id recommend putting it there

restive otter
#

oh

#

imgur?

hollow wraith
#

sure

restive otter
#

oke

#

thank you

hollow wraith
#

may not resolve the issue, but it could. if not, try single quote around the url.

hollow wraith
#

im not sure what that is:)

restive otter
hollow wraith
#

what do u need help with?

formal nebula
#

how i can change the background of my bot on discord bot list?

surreal junco
#

I guess the colours don't fit well with the background?

restive otter
#

What I want is that from previous captures I want it to go blank but I do not get it right @surreal junco

#

@formal nebula easy

formal nebula
#

How? ;-;

surreal junco
restive otter
#

o, yea

fervent lotus
light crag
#

14 total

#

13 this month

#

Probs

fervent lotus
#

weird, bot hasnt been on the site for a month yet

#

its only been a week or two

light crag
#

What does it say on your profile

fervent lotus
#

14

light crag
#

Then idk

fervent lotus
#

🀷

light crag
#

You might have added it before month reset

fervent lotus
#

is the reset in the middle of the month?

light crag
#

Idk

#

You probs should ask DBL mod

fervent lotus
#

its weird but not really a big deal i guess 🀷

weary ember
#
  1. votes reset at the beginning of each month doesnt matter how long ur bot has been on the list
  2. the widget and ur profile page shows total votes not monthly votes
restive otter
#

API returns total votes and monthly votes

radiant summit
#

const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere
What is my DBL token and how can i find it

golden field
radiant summit
#

I don't find

golden field
#

@radiant summit ^

radiant summit
#

I found thanks

#

find*

radiant summit
#

and now, how i know url ? Documentation says :
Start by setting up your webhook URL in the edit form of your bot on this site, it can be found at https://discordbots.org/bot/:ID/edit once you have entered the URL you want the webhook to be sent to, you're all set! If you need help setting up webhooks inside of your bot don't be afraid to ask in our discord server in our #topgg-api channel.

hollow wraith
#

Check the pinned message by Tonkku

#

@radiant summit you have to set up portforwarding in your router most likely.

restive otter
#

yo guys

#

i has a question

#

for the little upvote thingie

#

can i send webhooks to a discord webhook url

shut ibex
#

nope

#

they are not compatible

restive otter
#

okay

#

what should i use

#

i have no idea

shut ibex
#

you would have to make your own

restive otter
#

how would that work

shut ibex
#

what lang

restive otter
#

discord.js

plucky jewel
#

you could integrate it right? in the dbl.webhook.on(vote) or whatever, just add the webhook code for discord there?

restive otter
#

it requires me to insert a webhook url

#

hold up, what would my webhook port be?

light crag
#

any free port

restive otter
#

no clue how this works

#

but ill try it

#

then come back

shut ibex
#

@restive otter you could use express.js to set up your webserver, then assign a domain if you want using nginx

plucky jewel
#

my vps has the ip of 172.xxx.xx.xx:1228 so i could use that as the webhook url right?

shut ibex
#

yes

plucky jewel
#

and set the api to use that ip/port

#

okay

restive otter
#

do i have to assign to a domain?

shut ibex
#

no

restive otter
#

mm, cant install express on my bot

#

well, more like a bunch o errors

#

but it still added packagaes

#

packages*

shut ibex
#

show the error

restive otter
#

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

shut ibex
#

npm i express

restive otter
#

o

#

whats the difference between the i and the install

shut ibex
#

i = install

#

its just a shortcut

restive otter
#

tis weird

#

okay

#

yo do you know much about this site

shut ibex
#

wdym

restive otter
#

can you point me where i need to go

shut ibex
#

for express?

restive otter
#

ye

shut ibex
restive otter
#

ty

vast junco
#

there’s an example webserver in pins

arctic arch
#

relax, take a load off, connect your bot to dbl webhooks with dblapi.js, relax, take a load off, take a load off

storm shore
#

hey guys, i have a question about discordbots.

#

many bots that i see online have their stats as online or idle. while mine keeps at ???. anyone knows what the reason for this is?