#topgg-api

1 messages · Page 43 of 1

restive otter
#

like everything loads just gives that error everytime after 30 mins

#

like do i need to open something to let it not forbid the domain or something

#

@arctic arch is there anything i should change on my end or is it something on the website i need to change

arctic arch
#

so, what

#

it posts but you get an error anyway?

restive otter
#

yes everytime

arctic arch
#

do you have like two instances of it running then

#

one with incorrect details

restive otter
#

the bot or the dbl

#

ima go test

#

no i dont only one

#

wait lol i fixed it somehow#

#

my brain kicked in better

#

had to install dbl in to lib file in my bot not from the python3.5 site packages

timid parrot
#

why its stuck in 1 server¿

#

i used a test bot and and now its not changing

zinc lintel
#

Ok, I'm still pretty confused on how to use the DBL Python API. Can I be show like an example.

sullen nymph
#

Isn't there an example in dblpy docs?

#

Or on GitHub

plain timber
#

there is

sand hazel
#

oh yeah @arctic arch api/docs#golib is still pointing to the old one

shut ibex
#

Isn't the old one deleted

#

smh

sand hazel
#

it's archived under your user

#

and github creates temp redirects

shut ibex
#

I shall delet

restive otter
#

ive come back again about this error



Failed to post server count
Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}
Traceback (most recent call last):
  File "/home/uniquebot/cogs/discordapi.py", line 24, in update_stats
    await self.dblpy.post_server_count()
  File "/usr/local/lib/python3.5/site-packages/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 "/usr/local/lib/python3.5/site-packages/dbl/http.py", line 189, in post_server_count
    await self.request('POST', '{}/bots/{}/stats'.format(self.BASE, bot_id), json=payload)
  File "/usr/local/lib/python3.5/site-packages/dbl/http.py", line 160, in request
    raise Forbidden(resp, data)
dbl.errors.Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}

topaz wyvern
#

Isnt that incorrect/no token provided?

restive otter
#

the token is there it works but it shows that error when i load the bot and then every 30 mins it shows some other error

sand hazel
#

it'll be helpful if you print the payload and the url endpoint

restive otter
#

i dont get what you mean show what like

#

sorry kinda new to putting api stuff on a bot

#

and that error up there is the only error i see

sand hazel
#

then print debug info

restive otter
#

humm i dont see that weird

sand hazel
#

what

restive otter
#

i dont see the debug info

sand hazel
#

...

#

are you using the dbl python library

#

i'm assuming so

restive otter
#

yes for the api

#

i installed it in the python 3.5 folder

sand hazel
#

can you at least show the parameters passed

#

...

restive otter
#

thats the only thing i see

sand hazel
#

your code where you passed the parameters

restive otter
#

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

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

    async def update_stats(self): # error is from this line
        """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)

#

that ??

#

wait @sand hazel do i need to open a port

#

as i can do that

sand hazel
#

no

#

how are you calling that library

restive otter
#

the dbl or the discordapi file

#

if discordapi file that is in my cogs file

#

loaded in its own cog

plain timber
#

fyi 403 means wrong token

restive otter
#

no it dont lol

#

thats something else

sand hazel
#

403 is forbidden

restive otter
#

this is wrong token btw

raise UnauthorizedDetected('Unauthorized (status code: 401): No TOKEN provided')

#

mine is a different error

#

should i test the api on my pc and see if it works

sand hazel
#

lmao it might be the library's issue

#

can you goto L189 in http.py and print the endpoint and the payload

restive otter
#

wait

#

it works on my pc running my bot

#

no errors

#

and im using python on my pc

sand hazel
#

it's most likely malformed request, so you'll need to add debug lines

restive otter
#

wait one sec lol ant even loaded the api

#

im dumb

#

nope i was wrong i should ive looked before i typed lol

#

ok ima go to that line you said

#

@sand hazel here

await self.request('POST', '{}/bots/{}/stats'.format(self.BASE, bot_id), json=payload)

#

thats on line 189

sand hazel
#

alright print the formatted endpoint and the payload

restive otter
#

... lost could you be able to ring me and help me over call as im getting lost

sand hazel
#

man I don't even use python blobsweats

restive otter
#

oh i see you use .go my bad

sand hazel
#
print '{}/bots/{}/stats'.format(self.BASE, bot_id)
print payload
#

prob want to redact payload part when you show other people

restive otter
#

am i adding the
print '{}/bots/{}/stats'.format(self.BASE, bot_id)
print payload
in the discordapi file

sand hazel
#

yeah

#

prob before the await line

restive otter
sand hazel
#

looks good enough

restive otter
#

it did not like that lol

#

invalid syntax

topaz wyvern
#

what line

restive otter
#

24

topaz wyvern
#

and that line content is?

restive otter
#

print '{}/bots/{}/stats'.format(self.BASE, bot_id)

sand hazel
#

how do I print in python again

topaz wyvern
#

print()

sand hazel
#

i thought print alone also works Thonkang

topaz wyvern
#

print thing is 2.x syntax

restive otter
#

does it need "" not ''

sand hazel
#

o py 2

#

kek

#

then yeah use the parenthesis

topaz wyvern
#

"" and '' doesnt matter in py

#

Either works

restive otter
sand hazel
#

there's also an open issue regarding the forbidden error

#

use parenthesis with print

#

i forgot py3 is different

restive otter
#

this should work

#

print ('{}/bots/{}/stats').format(self.BASE, bot_id))

sand hazel
#

try

topaz wyvern
#

^

restive otter
#

print payload
^
SyntaxError: Missing parentheses in call to 'print'

sand hazel
#

the same thing

topaz wyvern
#

^

sand hazel
#

you need parenthesis

#

i only used py2 before

restive otter
#

ok it loaded

sand hazel
#

now wait for it to error again

restive otter
#

{}/bots/{}/stats
Failed to post server count
AttributeError: 'NoneType' object has no attribute 'format'
Traceback (most recent call last):
  File "/home/uniquebot/cogs/discordapi.py", line 24, in update_stats
    print ('{}/bots/{}/stats').format(self.BASE, bot_id)
AttributeError: 'NoneType' object has no attribute 'format'


topaz wyvern
#

ok we are

#

getting somewhere

#

@noble iron help idk py much

restive otter
#

yer sorry about this im still learning little things but il get there

sand hazel
#

print ('{}/bots/{}/stats').format(self.BASE, bot_id) suppose be print ('{}/bots/{}/stats'.format(self.BASE, bot_id))

topaz wyvern
#

is it?

sand hazel
#

print func does not have format to it

restive otter
#

ok this is only the error now

Failed to post server count
AttributeError: 'DiscordBotsOrgAPI' object has no attribute 'BASE'
Traceback (most recent call last):
  File "/home/uniquebot/cogs/discordapi.py", line 24, in update_stats
    print ('{}/bots/{}/stats'.format(self.BASE, bot_id))
AttributeError: 'DiscordBotsOrgAPI' object has no attribute 'BASE'
sand hazel
#

oh you are suppose to put that in the http.py

#

prior to await self.request

#

L188

#
async def post_server_count(self, bot_id, guild_count, shard_count, shard_no):
        if shard_count:
            payload = {
                'server_count': guild_count,
                'shard_count': shard_count,
                'shard_no': shard_no
            }
        else:
            payload = {
                'server_count': guild_count
            }

    '''Some debug stuff'''
    print('{}/bots/{}/stats'.format(self.BASE, bot_id))
    print(payload)

        await self.request('POST', '{}/bots/{}/stats'.format(self.BASE, bot_id), json=payload)
#

rip discord indentation

#

but you get the point

topaz wyvern
#

its fine for me

#

somewhat atleast

sand hazel
#

you have some small screen

topaz wyvern
#

yes

#

i need a new monitor soon

restive otter
#

welp

#

https://discordbots.org/api/bots/None/stats
{'server_count': 0}
Failed to post server count
Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}
Traceback (most recent call last):
  File "/home/uniquebot/cogs/discordapi.py", line 24, in update_stats
    await self.dblpy.post_server_count()
  File "/usr/local/lib/python3.5/site-packages/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 "/usr/local/lib/python3.5/site-packages/dbl/http.py", line 193, in post_server_count
    await self.request('POST', '{}/bots/{}/stats'.format(self.BASE, bot_id), json=payload)
  File "/usr/local/lib/python3.5/site-packages/dbl/http.py", line 160, in request
    raise Forbidden(resp, data)
dbl.errors.Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}


sand hazel
#

and there you go

plain timber
#

why is it /bots/None/stats tho

sand hazel
#

looks like the library's fault

restive otter
#

should i change something

sand hazel
#

looks like it's None when the user isn't logged in?

plain timber
#

looks like its posting to None

sand hazel
#

wow can't believe a library is lacking check for this

plain timber
#

make a pr and fix it

sand hazel
#

do I look like I know python

restive otter
#

is it ok to use or should i disable for now

plain timber
#

you could try manually POSTing stats with aiohttp

topaz wyvern
#

^

restive otter
#

ive never messed with this stuff lol

plain timber
sand hazel
#

it's prob easier to do it yourself

restive otter
#

isnt that for some other discord list thing

plain timber
#

it works with all lists including DBL

restive otter
#

so all i need to do is install and bam should work

plain timber
#

u would need to add the code

#

it has a d.py rewrite example

restive otter
#

ye

noble iron
#

^^ something like that

restive otter
#

im trash at adding this stuff lol

barren kelp
#

How do i tell that my bot can have a custom prefix on the website ?

humble bison
#

just set it as "custom"..?

#

nothing hard

#

just type

#

custom

sacred mango
#

-play sad

amber dune
#

@sacred mango dont run common prefixed music / help commands

#

you could get banned

shut ibex
#

could get banned

restive otter
#

how i can do if someone voting for the bot

#

he will get permission

little harbor
restive otter
#

to some commands?

little harbor
#

uh wait wrong page hold on

restive otter
#

yea

#

lol

little harbor
#

so you can use the /bots/{bot.id?}/votes endpoint if your bot has low upvotes, otherwise you have to use a webhook

restive otter
#

yea thats not working

little harbor
#

the endpoint?

restive otter
#

where i need to post that?

#

to write*

little harbor
#

you send an API GET request to https://discordbots.org/api/bots/012345/votes and it'll respond with some json, can't remember exactly what it is but it's some array (with 012345 obviously being your bot's ID)

sand hazel
#

i think it's an array of users

#

iirc

solid scarab
#

For some reason I can't post my guild count with the API using node.js. I copied the code from the docs

#

It won't even give me the error console log

topaz wyvern
#

did you wait 30 minutes?

storm shuttle
#

there might be instances where your bot isn't sharded and you also copied all the code including the code for shard size, try removing it if so

hexed glade
#

Where i can set my bot state to online with
dbl.on('posted', () => {
console.log('Server count posted!');
})
event ?

sand hazel
#

?

#

If your bot is in this server, it'll be shown as online

storm shuttle
#

^

restive otter
#

can someone help me with the api?

#

im getting a Failed to post server counterror

sand hazel
#

and the exception is?

restive otter
#
Failed to post server count
Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}
Traceback (most recent call last):
  File "C:\Users\hamza_000.HAMZA.000\Desktop\discord bot python\ChatManager\Chat Manager 5\DiscordBotsOrgAPI.py", line 25, in update_stats
    await self.dblpy.post_server_count()
  File "C:\Users\hamza_000.HAMZA.000\AppData\Local\Programs\Python\Python36-32\lib\site-packages\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 "C:\Users\hamza_000.HAMZA.000\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dbl\http.py", line 189, in post_server_count
    await self.request('POST', '{}/bots/{}/stats'.format(self.BASE, bot_id), json=payload)
  File "C:\Users\hamza_000.HAMZA.000\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dbl\http.py", line 160, in request
    raise Forbidden(resp, data)
dbl.errors.Forbidden: Forbidden (status code: 403): {"error":"Forbidden"}
#

got anything?

#
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, client):
        self.client = client
        self.token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjUxMTYwNDMzODI5Mjk0OTAxNCIsImJvdCI6dHJ1ZSwiaWF0IjoxNTQyNTYzODIxfQ.9Ttr7uFhY9-tBIjsbuscmERw2UNwy9O6gwkt7kpc8rQ'
        self.dblpy = dbl.Client(self.client, self.token)
        self.client.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(client.servers)}))
            except Exception as e:
                logger.exception('Failed to post server count\n{}: {}'.format(type(e).__name__, e))
            await asyncio.sleep(1800)


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

my code

sand hazel
#

uhm

#

remove token

#

-_-

restive otter
#

i regenerated it

sand hazel
#

alright

#

yeah i think that's a known bug in the py library

#

Giving the author time to fix it, before I dive into it myself

restive otter
#

how can i fix this?

sand hazel
#

Ensure the user state exist before trying to post

#

It's None when the client is not logged in yet

restive otter
#

how do i do that

sand hazel
#

Make checks in the library

#

open pr

restive otter
#

im not that good with coding so i dont understand 😅

sand hazel
#

just wait for the library dev to fix it

#

@opal zealot

restive otter
#

how long is that gonna take

sand hazel
#

¯_(ツ)_/¯

storm shuttle
#

try Node.js

sand hazel
#

lmao

restive otter
#

i use python

sand hazel
#

just wait or you can create the payload yourself

#

aiohttp to the endpoint

#

upon bot ready

#

then just set a timer

restive otter
#

!info-server

hexed glade
#

@sand hazel How i can invite it here if i just kick him (i want to test something 🤐)

sand hazel
#

ask a mod

#

to invite it

hexed glade
#

Okay ty

#

Specific channel?

#

@sand hazel

sand hazel
#

@amber dune get in here

hexed glade
#

Possible to reinvite my bot (sorry for pinging 😋)

sand hazel
#

o he went afk

#

let's see

#

@sudden rampart get in here

hexed glade
opal zealot
#

piiiiiiiing?

#

ah

#

i just now read

storm shuttle
#

you can create a server, then use that to test it, btw information about terrestrial objects, heavenly bodies, might be good feature for spacebots

#

nevermind, my discordapp lagged for a bit noticing that the problem was already solved

plain timber
hexed glade
#

In offtopic so?

plain timber
#

this channel is only for help with the dbl api

hexed glade
#

okay

placid mist
#

Hello some vote for my bot are not send on the webhook and it's all the time the same people who yet following a verification we vote well but it works for all other people I wonder where it can come

sand hazel
#

English

restive otter
#

tu es parle englis

#

lmao

plain timber
#

@restive otter english only

restive otter
#

non

#

just joshing kids

restive otter
#

can I send the weebhook to a channel?

dawn fjord
#

what do you mean?

restive otter
#

like

dbl.webhook.on('vote', vote => {
  bot.channels.get('id').send(`User with ID ${vote.user} just voted!`)
});
digital linden
#

How do I even make a webhook url and stuff

sand hazel
#

You deploy a http server

digital linden
#

like in glitch?

sand hazel
#

sure

digital linden
#

So i host on glitch

#

and

#

do I make another website that gets pinged if someone is on it?

#

then do somtin crazy

sand hazel
#

w h a t

digital linden
#

idk

plain timber
#

@digital linden do you use express

digital linden
#

yeahs

#

I use it for my bot

plain timber
#

you can either

  1. use dblapi.js and connect it to your express server, or
  2. just make a post route in express
digital linden
#

number uno

#

how would I connect it?

plain timber
#

use the webhookServer option in dblapi.js

digital linden
#

?????

plain timber
digital linden
#

ok

plain timber
#

for example

const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookServer: app, 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!`);
});

assuming your server is app

digital linden
#

o ok

#

thanks u

plain timber
#

yw

digital linden
#

@hexed glade so

#

do I put mu token in ''s?

#

or 's

plain timber
#

doesnt matter

digital linden
#

ok

plain timber
#

and dont mention random people

digital linden
#

ok

#

also

plain timber
#

actually its better to put your token in a different file

digital linden
#

ok

plain timber
#

like your .env file

digital linden
#

ok

#

um what does this mean

#

webhookPort: 5000, webhookAuth: 'password' }

plain timber
#

you dont need webhookPort

digital linden
#

what do I replace?

#

O

plain timber
#

you need webhookServer though

digital linden
#

how do I find what my webhook server is

#

or is it my support server

plain timber
#

i already said its your express server

digital linden
#

o

plain timber
#

if you have const app = express() then the webhookServer should be app

digital linden
#

ok

#

@plain timber what is the hook.hostname and port and path thing

sand hazel
#

Heyy, who maintains the py lib

digital linden
#
    if (server && !(server instanceof Server)) throw Error('The server is not an instance of http.Server');

                                               ^


Error: The server is not an instance of http.Server

    at new DBLWebhook (/rbd/pnpm-volume/0bf93457-01e6-4b5a-ab05-cd0ed5739e31/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/webhook.js:23:54)

at new DBLAPI (/rbd/pnpm-volume/0bf93457-01e6-4b5a-ab05-cd0ed5739e31/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/index.js:69:22)

at Object.<anonymous> (/app/discordbots.js:4:13)

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

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

    at Module.load (module.js:566:32)

    at tryModuleLoad (module.js:506:12)

    at Function.Module._load (module.js:498:3)

    at Module.require (module.js:597:17)

    at require (internal/module.js:11:18)

#

ummmmmmmmmm

#

@plain timber PLS HELP

#

also what the authorization thing

restive otter
#

goodbye children

sand hazel
#

@humble bison oh yeah I found some pseudocode for that permission check as well

#
def compute_base_permissions(member, guild):
    if guild.is_owner(member):
        return ALL

    role_everyone = guild.get_role(guild.id)  # get @everyone role
    permissions = role_everyone.permissions

    for role in member.roles:
        permissions |= role.permissions

    if permissions & ADMINISTRATOR == ADMINISTRATOR:
        return ALL

    return permissions

def compute_overwrites(base_permissions, member, channel):
    # ADMINISTRATOR overrides any potential permission overwrites, so there is nothing to do here.
    if base_permissions & ADMINISTRATOR == ADMINISTRATOR:
        return ALL

    permissions = base_permissions
    overwrite_everyone = overwrites.get(channel.guild_id)  # Find (@everyone) role overwrite and apply it.
    if overwrite_everyone:
        permissions &= ~overwrite_everyone.deny
        permissions |= overwrite_everyone.allow

    # Apply role specific overwrites.
    overwrites = channel.permission_overwrites
    allow = NONE
    deny = NONE
    for role_id in member.roles:
        overwrite_role = overwrites.get(role_id)
        if overwrite_role:
            allow |= overwrite_role.allow
            deny |= overwrite_role.deny

    permissions &= ~deny
    permissions |= allow

    # Apply member specific overwrite if it exist.
    overwrite_member = overwrites.get(member.user_id)
    if overwrite_member:
        permissions &= ~overwrite_member.deny
        permissions |= overwrite_member.allow

    return permissions

def compute_permissions(member, channel):
    base_permissions = compute_base_permissions(member, channel.guild)
    return compute_overwrites(base_permissions, member, channel)
plain timber
#

@digital linden hm, do you have an app.listen line?

digital linden
#

no

#

wait

#

@plain timber I have this in another js file
const express = require("express");
const app = express();

app.get("/", (request, response) => {
console.log("Ping received!");
response.sendStatus(200);
});

// listen for requests :)
const listener = app.listen(process.env.PORT, function() {
console.log('Your app is listening on port ' + listener.address().port);
});

plain timber
#

wait

#

what if you do console.log(app) before the dbl line

#

what does it log

digital linden
#

lemme see

#

still has an error tho

#

@plain timber what is the hook.hostname thing

plain timber
#

wdym

digital linden
#
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});```
#

that

plain timber
#

you don't really need that

digital linden
#

and the authorization code

#

ok

plain timber
#

that basically just says its running

#

did you try console.log(app)

digital linden
#

no it cant run

#

because of the error

#
/rbd/pnpm-volume/0bf93457-01e6-4b5a-ab05-cd0ed5739e31/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/webhook.js:23

    if (server && !(server instanceof Server)) throw Error('The server is not an instance of http.Server');

                                               ^


Error: The server is not an instance of http.Server

    at new DBLWebhook (/rbd/pnpm-volume/0bf93457-01e6-4b5a-ab05-cd0ed5739e31/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/webhook.js:23:54)

at new DBLAPI (/rbd/pnpm-volume/0bf93457-01e6-4b5a-ab05-cd0ed5739e31/node_modules/.registry.npmjs.org/dblapi.js/2.3.0/node_modules/dblapi.js/src/index.js:69:22)

at Object.<anonymous> (/app/discordbots.js:5:13)

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

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

    at Module.load (module.js:566:32)

    at tryModuleLoad (module.js:506:12)

    at Function.Module._load (module.js:498:3)

    at Module.require (module.js:597:17)

    at require (internal/module.js:11:18)```
plain timber
#

what error

digital linden
#

that

plain timber
#

did you put the console.log code before or after your dbl code

digital linden
#

ifk

#

idk

#

its not there anymore

#

wait

#

@plain timber it spams 🚘🌇 Your app is listening on port 3000

#

and Bot is online

#

and Ping Recived

plain timber
#

what

digital linden
#

idk

plain timber
#

what if you comment out the dbl code and put console.log(app)

#

so we can see what app is

digital linden
#

ok

plain timber
#

you said the express code was in a different file right

digital linden
#

yea

#

but I copy and pasted in const express = require("express");
const app = express();

plain timber
#

no dont do that

digital linden
#

Here just take my code

#

10x easier to read

plain timber
#

either put your dblapi.js code in the server file, or export app from the server file

digital linden
#

ok

plain timber
#

or just move the server code to the discordbots file and delete the server file

digital linden
#

o

#

it still has the same error

plain timber
#

delete the discordbots.js file

digital linden
#

ok

plain timber
#

got it

#

it should have been listener, not app

digital linden
#

ok

#

also what is an authorization

#

on the dbl

#

the Authorization
You can use this value to verify the requests are coming from us.

plain timber
#

just set webhookAuth to the same thing as Authorization in the edit page

digital linden
#

o

#

ok

plain timber
#

its to prevent someone else from pretending to be dbl and making fake votes

digital linden
#

I dont have a Authorization

plain timber
#

wdym

digital linden
#

like it just says abcdefghijklmnopqrstuv

plain timber
#

🤔

digital linden
#

as a pplace holder

#

see

#

and this

#

@plain timber

plain timber
#

Yes, you need to choose an authorization code

digital linden
#

how?

plain timber
#

Just pick something

#

It's like a password

digital linden
#

ok

#

thanks

plain timber
#

Just pick something and type it into both the edit page and your code

digital linden
#

ok

plain timber
sand hazel
#

jeez this is still going Thonkang

digital linden
#

ok

#

who is rumble frog

sand hazel
#

me

digital linden
#

o ok

#

WHY R U IN MY ENV

#

can u see my env>

sand hazel
#

yeah

digital linden
#

WHAT

#

um dont look ok?

sand hazel
#

tis some quality code

digital linden
#

XD

sand hazel
#

how do yall read this

digital linden
#

ctrl + f the command name

sand hazel
#

yeah it's a post request

#

not a get request

digital linden
#

o

#

so do I have to fix it

sand hazel
#

no?

digital linden
#

ok

sand hazel
#

DBL fires post requests

digital linden
#

ok

heavy palm
#

can i have help making a bot

#

im new to it

topaz wyvern
restive otter
#

Is there any resources on how to work with the webhooks here?

#

I'm new to webhooks and I'm not sure how I'll make them work

#

and it doesn't seem to be any webhook features in the python lib hmmm

sand hazel
#

yeah I don't think there's

#

I don't even know who maintains the py lib

restive otter
#

Yeah, things don't even run in the right order when posting in that lib, so I had to change some stuff

#

don't have anything to check the status if a member has voted within 24h by sending the user_id

#

so I had to add that too

sand hazel
#

maybe @arctic arch knows who maintains it

restive otter
#

I've read some history in this chat, and I assume one way to do it could be creating a webhook URL in discord, for a channel in my support server, and have all the votes go to that channel, and then my bot just picks up and checks / rewards the user

plain timber
#

For webhooks, DBL will send a post request to the specified url with the vote data

restive otter
#

or maybe I'm wrong

plain timber
#

So you just need to receive the post request

arctic arch
#

it was maintained by francis

sand hazel
#

is he in here

arctic arch
#

tho I think they left the server

sand hazel
#

o

#

shame

#

i think he died on github

restive otter
#

Yeah I know is sends a post request with data

sand hazel
restive otter
#

but how my bot recieves that information

#

there seems to be multiple solutions

arctic arch
#

@cobalt ruin wanna contact francis?

#

if he's leaving it unmaintained the position is open

sand hazel
#

There were several people in here that had this

restive otter
#

Yeah, I explained the solution to that problem some week ago

#

in this chat

sand hazel
#

phew, make a pr

restive otter
#

the thing is, there is only 1 line of code that fixes it

#

the example used on the github should be correct and working

sand hazel
#

do tell

restive otter
#

but the example on the website is not

sand hazel
#

o

restive otter
#

let me see if it's still the same

sand hazel
#

yeah it's different

restive otter
#

await self.bot.is_ready()

#

this line

#

should make the difference

#

By adding this line in the update_stats, it will work

#

the other differences doesn't have any impact

sand hazel
#

perhaps an internal check would be nice as well

restive otter
#

I did check around in the library when I was troubleshooting my issue

#

let me see what I wrote earlier

#

I tested it myself. When the first request was made, the bot_id didn't exist in the dbl client
because the bot wasn't done setting up
so if you try to post the server count before it is done setting up, there will be issues
aka the ainit method

class Client:
    def __init__(self, bot, token, **kwargs):
        self.bot = bot
        self.bot_id = None
        self.loop = kwargs.get('loop') or bot.loop
        self.http = HTTPClient(token, loop=self.loop, session=kwargs.get('session'))
        self._is_closed = False
        self.loop.create_task(self.__ainit__())

    async def __ainit__(self):
        await self.bot.wait_until_ready()
        self.bot_id = self.bot.user.id

So here when you initialize the client, it will create a task (ainit) which won't finish until the bot is done registering all the guilds, members etc

plain timber
#

BTW if you added some stuff you should make a pr

sand hazel
#

Yeah, so a propose an internal check for that attribute would be nice

restive otter
#

so it gets a 403 forbidden error, because the bot_id it was using in the request was None

#

Yeah maybe I should

#

do a pr

#

BUT. for the webhook question. Since discordbots will post a request to a specified url, what would be the best way for my bot to obtain that information in your opinion?

#

Can't say I've worked with endpoints, unless we're talking about a web server

sand hazel
#

Store it in a database perhaps

#

It depends what your bot's reward is

restive otter
#

Well, I do store if a person have voted or not in a database

#

so the users can claim a reward

plain timber
#

Yeah use a web server

sand hazel
#

basically just treat the payload as a client hitting your web server

#

nothing special

restive otter
#

I do run my website currently, using python backend, with Flask

plain timber
#

Yeah then add a post route

restive otter
#

so I guess I could create a endpoint and dump that data into my database

#

that my bot then grabs the data from

sand hazel
#

yeah

restive otter
#

Alright, thanks for the advice

#

@hearty lintel

sand hazel
#

yall mating or something

#

dm him

plain timber
#

@autumn falcon this channel is only for the DBL api -.- read the channel topic

autumn falcon
#

oh my bad i delete my msg

jolly sonnet
#

Is it just me or does sometimes the dblapi.js node module take forever to check if someone voted.

loud gulch
#

u

jolly sonnet
restive otter
#

it's node, so being slow is probably normal

placid mist
topaz wyvern
#

nani

#

link

placid mist
#

reload many time

#

And see

#

👀

topaz wyvern
#

oh damn

#

it is

#

uh

#

oh this is happening to multiple bots

#

@arctic arch ?

arctic arch
#

because caching

placid mist
#

That's what I think cassi

#

But it was weird

pale topaz
#

I started using the hasVoted function

#

It takes more than 2 mins for new votes to register

#

Is this normal?

sand hazel
#

perhaps, use the webhook

pale topaz
#

Don’t wanna store extra data...

shut ibex
#

If you store into a db it won't have a major effect

pale topaz
#

I don’t really understand why it takes time tho

sand hazel
#

cache perhaps?

pale topaz
#

That’s a pretty long time tho

#

I hope the mods see this if it is possible to solve it

sand hazel
#

2 minutes is that long?

pale topaz
#

it depends on the usage ye

sand hazel
#

well, shit, I have news for you HappyThonk

pale topaz
#

I have a command that I’ve blocked unless the user votes

shut ibex
#

I'm pretty sure it is Cache

sand hazel
#

webh00k

pale topaz
#

Webhook gaye

sand hazel
#

ur gaye

shut ibex
#

Webhook is better than hasVoted

#

@arctic arch hello yes why does hasVoted takes years

sand hazel
#

well hello

pale topaz
#

Tfw countless data stored from webhook for one command

sand hazel
shut ibex
#

I do that

#

I store their info

pale topaz
#

I have over a thousand votes so uhhhh

#

F

shut ibex
#

Then if they vote I update it

sand hazel
#

boi that's like 1kb right there

#

chill

shut ibex
#

And my bot uses that collection

#

^^^

pale topaz
#

Ye but not really efficient

#

Also wait

shut ibex
#

Not efficient

#

Wut

sand hazel
#

you can also create unique record for each user

pale topaz
#

How do I delete them after

sand hazel
#

then just update the count

shut ibex
#

Are you sure you're not high

sand hazel
#

delete them SWEATSTINY ?

pale topaz
#

Like what do I use to check for the next vote

#

Is daily right

shut ibex
#

rm -rf / --no-preserve-root

pale topaz
#

Oh wait I haven’t explained how it is

sand hazel
#

for daily votes, it's kinda trivial

shut ibex
#

You can vote twice a day

pale topaz
#

My webhook is only in one shard file

#

Shard ID 0

#

Cause I’m dumb and don’t know how to code properly

shut ibex
#

Ok wait

sand hazel
#

you'll prob need to restore the timestamp of last voted, then just compare if the person voted today

pale topaz
#

Okay that’s a better idea

shut ibex
#

Webhook and Bot in one file is a nono

pale topaz
#

Ye...

#

Kinda has to tbh

#

*had

shut ibex
#

I use the timer in golang to reset

pale topaz
#

I award some tokens also

shut ibex
#

you don't have to

pale topaz
#

Long story short

#

All my code have the big gaye

sand hazel
#

yeah there's no need for a task, you can just do simple comparison with last vote

pale topaz
#

Well I’m lazy rn so people can wait 2 mins for now

#

Lmao

sand hazel
#

if lastVote.difference() <= 24 hrs { user voted }

pale topaz
#

Ye I’ll just store the dates

#

Done that before

shut ibex
#

Fishy

#

is using a timer fine

sand hazel
#

yeah it's fine, but it's unnecessary db operation

shut ibex
#

wdym

pale topaz
#

But still

shut ibex
#

I don't set the timer on the db

pale topaz
#

Don’t you agree hasVoted should much quicker

sand hazel
#

no

shut ibex
#

I make a timer for 24 hours and then after that I update the doc

sand hazel
#

seeing how rest of the site is cached, no

pale topaz
#

Ahhh

#

I didn’t know that

#

Nvm then

sand hazel
#

yeah, you are doing updates on the db

#

a db operation

shut ibex
#

But every 24 hours

#

/tableflip

sand hazel
#

no cost > cost

shut ibex
#

Doesn't seem like a lot of stress on the db

sand hazel
#

hey if you are using golang, you might as well consider the cost

shut ibex
#

So then how would I update the doc automatically after 24 hours

sand hazel
#

wot u tryna update

#

are we still talking about checking daily votes

shut ibex
#

So when I receive a new vote I create a doc with the field hasVoted

#

it gets automatically set to true on the first vote

#

Then after 24 hours I set hasVoted to false

sand hazel
#

yeah I don't do that

#

I just update the lastVoted timestamp

#

no need to update docs every 24 hrs

shut ibex
#

It only gets updated after the vote ends or if they vote again

#

I would use timestamp but I want to dbl api to send timestamp

sand hazel
#

Thonkang ?

sudden rampart
#

just save current local time

sand hazel
#

yeah

#

is hook that delayed too

shut ibex
#

It can be delayed

sudden rampart
#

on my experience, no

shut ibex
#

Not all the time tho

sand hazel
#

yeah it wouldn't make much difference

restive harness
#

with postStats() in js, the discord.js master branch features internal sharding meaning that the shardId can't be posted since only one instance of the bot is being created rather than one for each shard

#

so when i'm posting my bot's stats would i use .postStats(serverCount, null, shardCount) ?

arctic arch
#

@restive harness yes

restive harness
#

oh yeah i see that it's optional

#

okay thanks

sand hazel
#

websocketshard still have id?

restive harness
sand hazel
#

client.ws.shards

#

multiple ws connection under one client

restive otter
#

Okay..

#

The API does not send the Upvote POST request to my server

#

But when I use check?userId it shows Voted : 1

sand hazel
#

does not or you can't process it

restive otter
humble bison
#

@restive otter try it and see

restive otter
#

Hmm okay

restive otter
#

Hey

#

I need some help with the DBL Api for my site

#

The goal is this

keen saddle
#

JS

restive otter
#

How do I get the numbers there (I never really worked with an API)?

#

Well no shit

keen saddle
#

xD

restive otter
#

I was actually thinking about a brainfuck api

#

cause that makes sense

#

seriously tho

keen saddle
#

em

#

what are you using to host website?

restive otter
#

netlify

keen saddle
#

runs node?

restive otter
#

no

keen saddle
#

oh oof

restive otter
#

so.....

#

what do I do

#

I'm sure there's a way to get it without node

keen saddle
#

php

restive otter
#

I don't see a PHP Api on the site

keen saddle
#

Because it doesnt exist

#

php is the language used to get data from the api

restive otter
#

ok

#

so.......

keen saddle
#

so the api i supported by all languages

restive otter
#

How do I get the numbers

keen saddle
#

thats what i am trying to figure out

restive otter
#

ok, thanks

cobalt ruin
restive otter
#

hold up wtf I have no idea what to do help

cobalt ruin
restive otter
#

10q

restive otter
#

wait so do I just make a php file orrrr....

#

I'm confused

#

I'm a noob at Apis if you can't tell already

keen saddle
#

Yes

#

make a string variable = http_get ...

restive otter
#

huh

#

@keen saddle I don't know PHP

keen saddle
#

Yeah, ive not done it in a while either

restive otter
#

I never have done it

#

Would doing the PHP thing require node?

#

cause my host is netlify (static site host)

sand hazel
#

Lmao wot

#

Why you pinging Oliy for that HappyThonk

restive otter
#

cuz he messaged above

#

oh shit I forgot he was the admin

#

oops

#

uh

sand hazel
#

PHP is PHP, it has no affiliation with node

restive otter
#

there

#

sorry

#

I have no idea what to do

sand hazel
#

Google search would've saved a ping

restive otter
#

true

#

sorry oily

#

But how do I get the user and guild count on my site

#

Guild and user count are not in the JSON....

#

actually guilds are

#

but they are severely outdated wtf

#

User count is not on there, so I guess I'll just do upvote count

#

Since it is on there

#

How do I parse the JSON and put it into the html doc

sand hazel
#

idk what you are talking about

keen saddle
#

lol

#

He means how to get the data from json and put onto html

restive otter
#

Okay so I got that part

#

But I just get undefined

#
var test = document.getElementById('test')

fetch('https://discordbots.org/api/bots/490852867171942410')
  .then(function(response) {
    console.log(response)
    test.innerHTML = response.server_count
  });```
#

@keen saddle

keen saddle
#

ok

restive otter
#

I just get undefined

#

Any idea what is going wrong?

keen saddle
#

em

#

what do you get in console.log(response)

restive otter
#

nothing since it is a static site

#

wait

#

idk

keen saddle
#

Use console on browser to test

sand hazel
#

Just saying, that'll be broken in the future

#

@restive otter

restive otter
#

uh

#

So

#

I already have this working

#

And it's past november 5th

sand hazel
#

Yeah he delayed it

restive otter
#

how should I get the token then

sand hazel
#

on your bot page

#

then again that'll be exposing your token to people

#

Which means this can only be processed from server-side

restive otter
#

well

#

uh

#

When is it gonna be broken

sand hazel
#

¯_(ツ)_/¯

#

I have already updated my libs for that update

restive otter
#

Is there any way that I can do it on the site

#

What if I use my bot's VPS to generate a JSON

#

And then post it to some dummy domain

#

And then use my actual site to grab the data from the dummy domain JSON

#

Since the VPS server thing wouldn't expose the token

#

Would that work in theory

sand hazel
#

honestly just proxy the request

#

Run a proxy server, in which it will call to the endpoint with the token

#

Then users can call to the proxy server

restive otter
#

how would I do that

sand hazel
#

unauthenticated and authenticated

restive otter
#

sorry dude I'm a noob at this

#

I'm only good with frontend

keen saddle
#

could just do

#

in html script tag

restive otter
#

that's what I did

#

But it's gonna be broken soon

#

so that's a problemo

keen saddle
#
let res = await fetch('https://discordbots.org/api/bots/490852867171942410');
let out = await res.json();
out.tags;
sand hazel
#

Will be broken

keen saddle
#

?

sand hazel
#

It got delayed, but it will happen

restive otter
#

hm

keen saddle
#

How come yours has server_count?

#

Mines doesnt seem to have that

sand hazel
restive otter
#

It was delayed

daring garnet
#
PostBotStats { server_count: Single(0), shard_id: None, shard_count: None }
thread 'serenity client' panicked at 'called `Result::unwrap()` on an `Err` value: StatusError(400)

testing pls don ban jus using dev version, max iz 1 the server count and i get 400 when updating to zero

daring garnet
#

i mean i guess its in this server welp

humble bison
#

do webhook posts come in the req body or res body?

sand hazel
#

huh

#

rq

humble bison
#

ok

#

so like

#
    app.post('/vote', async (req, res) => {
        const obj = req.body;
#

right

sand hazel
#

yeah

#

res is never the client's payload in http server

#

you always write to res

#

cause you are the responder

humble bison
#

okay

sand hazel
karmic latch
#

Can someone help me how to add the bot status thing to my website?

#

i dont understand that

#

the docs

plain timber
#

@karmic latch are you talking about the widget?

karmic latch
#

yes

#

@plain timber

plain timber
#

@karmic latch it's just an image you can embed on your website; you can get code on your bot's edit page

karmic latch
#

yea but how would i embed that to my website thonkku

plain timber
#

I said, you can get the code from your bot page, put that in your website code

#

It's just a simple image

karmic latch
#

k

restive otter
#

Hello, I’m wanting to list who voted into a command, I’m using Discord.JS, and be able to post each time a vote has come through into a channel, but most importantly I need help posting my server count to DBL, can some please help me, thanks 😃

sand hazel
#

Which language

#

And there's prob a lib for that language

restive otter
#

Discord.js

sand hazel
#

yeah look at the api js lib

#

it has everything you need

normal berry
#

is this a place where i can suggest stuff for the API because I have one suggestion

#

I want rich presense in discord.js

sand hazel
#

suggest blurryeyes

#

lmao

#

out

#

this api channel is for dbl, and nor will djs ever support rich presence on bot, because discord doesn't expose that to bot users

plain timber
#

Lmao

sand hazel
#

in other word, impossible

normal berry
#

i could maybe work around it...

sand hazel
#

work around discord api

plain timber
#

Discord doesn't support rich presence for bots simple

sand hazel
#

work around something that doesn't exist

#

yes

plain timber
#

Also as fishy said this is for the DBL API not discord.js

normal berry
#

I could just packet analyze rich presence for my user, then change the variables for my bot and boom, rich presence

plain timber
#

Dude it won't work

sand hazel
#

wow, what a cool kid, sending payload that discord won't take

arctic arch
#

except discord will reject that

indigo shoal
#

What don't you understand in the fact that it isn't supported

arctic arch
plain timber
#

We've told him

sand hazel
#

packet analyze

#

this is some csi shit

arctic arch
plain timber
#

Fishy and I already told him lol

normal berry
#

ok

#

nevermind

sand hazel
#

kek

#

you ever seen a bot with rich presence yet?

#

I don't think so blurryeyes

arctic arch
#

stop

normal berry
#

i have actually

#

they got their API running a user account tho

arctic arch
ocean patrol
arctic arch
#

@inner venture

restive otter
#

Spotify Api?

copper iron
#

ok

#

so i'm trying to post the guilds amount while sharding

#

but i can only pass the client

#

anyway i can pass the guilds manually

normal berry
#

How do you get the discordbots API token for a bot?

#

I think i should jump ahead and add support for it

arctic arch
#

your bot needs to be approved first

normal berry
#

welp, that puts a hitch in future proofing

restive otter
#

Who İs Know Delete Message 100 Uper

#

200 300

#

Maybe 1000

sand hazel
#

understandable

chrome canyon
#

{"code": 0, "message": "401: Unauthorized"} :c

plain timber
#

@copper iron what discord and DBL lib?

copper iron
#

d.js

#

?

#

dblapi.js

plain timber
#

Internal or external sharding

#

It is supposed to get the data from the client 🤔

#

So there shouldn't be an issue

copper iron
#

external

#

running 8 shards on 105 servers

#

lol

chrome canyon
#

why.

copper iron
#

nvm 4

#

cuz i have the resources GWmythicalThonkCool

chrome canyon
#

oof

copper iron
#

and i just got more cores so yeah

plain timber
#

Well what's the issue

#

Is it not posting correctly?

copper iron
#

doesn't do anything

#

Nut doesn't stop asking me so i have to help

plain timber
#

Any error?

proven lichen
#

How do I check if someone has voted for my bot?

copper iron
#

It literally doesn't print anything

loud gulch
#

@proven lichen what language

proven lichen
#

Py

loud gulch
#

there has to be like a has_voted function

#

check the docs

proven lichen
#

Wait one moment

#

Here are all of em

#

['ainit', 'class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'weakref', '_is_closed', 'bot', 'bot_id', 'close', 'generate_widget_large', 'generate_widget_small', 'get_bot_info', 'get_bots', 'get_server_count', 'get_upvote_info', 'get_user_info', 'get_widget_large', 'get_widget_small', 'guild_count', 'http', 'loop', 'post_server_count']

loud gulch
proven lichen
#

Upvote info doesn't give me when they voted

#

Ehh

loud gulch
#

i dont think it does

#

the api doesnt

proven lichen
#

O

#

Okay then

#

Thanks

loud gulch
#

np

zealous arch
#

k+bus @zealous arch

#

k+conf

#

k+help

loud gulch
#

wrong channel

glad bolt
#

@plain timber yes, I'm aware of this channel lolz

sand hazel
#

@proven lichen your best bet is to setup webhook if you want to know when

topaz wyvern
#

err so what do u need help with lol

glad bolt
#

Essentially, I'm having issues setting up the webhook, using the example code on the docs as a basis for things. There's simply not enough data to go off of, on response object data, etc.

#

In addition, I have to wait until I can vote for my own bot again, in order to change any code issues...

topaz wyvern
#

o I've never done webhook

plain timber
#

There's a test button you can use

#

To send a fake vote

topaz wyvern
#

yea ^

glad bolt
#

Oh, there is?

plain timber
#

Also the json body is in the docs

topaz wyvern
#

mhm

glad bolt
#

Where might I find that test button? I didn't see it.

plain timber
#

Bot edit page

#

Under the webhook settings

glad bolt
#

Oh, awesome. Okay, I'll def be using that. I might be able to get that working then.

plain timber
#

serverhound or alertbot

glad bolt
#

alertbot

#

Once I get this working in AB I'll see if they want me to add it to SH as well ofc

sand hazel
#

There's also doc for the response object

glad bolt
#

Okay so I do actually need help here

#

I'm using the code from the docs:

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

and it starts 'listening' supposedly as I get this in the console:

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

And I have the port forwarded properly to the server, and it has the URL in the webhook setup on the bot settings: https://alertbot.services:5000

What am I doing wrong? lolz

#

(obv with my token in the place where it goes)

#

When I press the test button, I get nothing in the console window

sand hazel
#

i can't even reach that site

glad bolt
#

hmm

plain timber
#

Iirc you might need to press save then test

glad bolt
#

I did

plain timber
#

Oh

#

Does it work with postman

glad bolt
#

...postman?

sand hazel
#

can't reach it

plain timber
#
#

Try making a post request to the webhook endpoint with the correct json

restive otter
#

nvm

#

forget it

blazing badge
#

lmao lol

median cairn
#

The client option is for when an event is fired, it'll execute the webhook?

#

const dbl = new DBL('Your discordbots.org token', client);

plain timber
#

@median cairn no, client is for automatic server count posting

median cairn
#

oh

plain timber
#

For webhooks you'll need to add the object with the webhook settings

blazing badge
#

umm @plain timber why did u mention me?

plain timber
#

Sorry wrong person

median cairn
#

o k

copper iron
#

Will it automatically work with sharding?

restive otter
#
const dbl = require("dblapi.js");
dbl.hasVoted(message.author.id).then(voted => {if(voted == 1) {var hasVoted = "true"} else {var hasVoted = "false"}});
console.log(hasVoted)

Seems to return dbl.hasVoted is not a function, anyone know?

topaz wyvern
#

Are you actually accessing the API?

restive otter
#

Yea

topaz wyvern
#

It seems to me you are just requiring the lib

restive otter
#

wait wut?

topaz wyvern
#

sigh

restive otter
#

oh yeah

#

ahaha

shut ibex
#

making a webserver is easy 👀

urban pawn
#

how do i make it using the webhook function send to a discord webhook url?

#

(ping)

sand hazel
#

what

reef apex
#

make a webserver that parses dbl votehook then post a webhook message/embed to discord?

still lotus
#

nani?

#

whats up

loud gulch
#

wrong place

still lotus
#

okie

formal rune
#

hi guys I'm new and I'm coding my first bot. I used repl and python but after a while the bot goes offline. I just knew that repl is temporary. I have to use a different host? witch one? can you help me? I'm not an expert

calm torrent
primal pecan
#

hello i think i need help for webhooks

#

but i never see the webhook console log

#

i don't realy enderstand how i must use this feature

sand hazel
#

Yeah you need to fill the url portion with the address

quiet egret
#

docs for the python lib are gone

#

also, is there a not cogs version

#

cogs are just

#

hhh

mystic wing
#

@quiet egret irrc the person who made the python module left - I think they are trying to take over it though

primal pecan
#

Witch adress ?

#

can i choose it ? how ?

#

@sand hazel

sudden rampart
#

the address of your server

#

the http server listening for webhooks