#topgg-api
1 messages · Page 78 of 1
ok
it dont say nothing in console
and all are good
it says server count posted
is this 50004?
yep
not 5004?
looks a bit short to be 50004 but I cant tell
50004
ok
your host is titanservices.co right?
Tim what do you use to host?
i talk to the owner of the site
titanservices is not a VPS
its a managed microservice, like glitch/heroku
its likely that they have a reverse proxy behind, where 50004 is the public external port, but not the internal port
like with glitch, the external port is 80, but internal is 3000
and what i do?
you need to ask the owner
and he need to give me the external port?
the external port should be the one in your panel, 50004
ok
you need to ask him if the internal port is the same, or a different one
ok
@pale fulcrum currently using galaxygate and google compute engine
ok
and i cant do it like a message.channel.send?
hello
dm me your ip address
ok
if you go to the page that you put in the top.gg, you should get an error saying no webpage or something
so if the connection is okay that would show it
finally got it to work, top.gg being wonky i guess
now you need to find a channel to send it in
do you have the channel's id?
yep
and do you want the voter's mention or do you want to use an ID?
ok so you need to fetch the user
yep
ping 👀
ghost ping
ok
@restive otter first you need to get the channel from your bot
which version of discord.js are you using?
v11.6.3
then its client.channels.get(channelID)
where client is your bot's client
in your case would be bot
i want to do that send it to a channela and dm the users, its possible dm?
in index all of this?
yes, if they dont have your bot blocked
everything inside the vote event
correct me if I'm incorrect but in order to dm, you would need to either get the user or fetch the user, right?
idk
channel id must be a string, not a number
ok Grayald you need to use .send on the channel
and as i said, client should be your bot's client instance
no...
are you even trying
do you know what a string is?
thats just a variable
27364927489 this is a number
"27364927489" this is a tring
i use ``
that works as well
change client to bot
done
and now i do a message.channel.get?
there is no message in votes
you can either just .send(x) on the channel or you can define a variable as the channel and do variable.send(x)
but you would want to catch it because if the bot is blocked, you would error
so EVERYTIME you see someone mention client.something you have to do bot.something instead
i know it
so to get a channel from the client, its client.channels.get("ID")
so for you: bot.channels.get("ID")
ok
ok
the same way you would do on a message.channel.send()
do bot.channels.get("ID").send("something")
yes
because message.channel is an instance of a discord channel
ok
now you can restart and test
so now you have a working vote in your channel
what would the message be?
so who is it dming?
dming?
who will it dm?
to the user that vote
ok you would need to fetch the user
you can do that if you get for example 5 votes in favor the bot gives you something (this is for later)
lets get one problem solved at a time
ok
so how you would fetch a user in d.js v11 is client.fetchUser() or for you, bot.fetchUser()
the function is async so you need to await it
bot.fetchUser
and make the vote event async
not exactly
how?
im not sure about this part but you should be able to use .then on bot.fetchUser()
so
it would be bot.fetchUser(vote.user).then(u => { u.send(message ) }
bot.fetchUser().then(
no need for await on a .then
where?
there is no author
it would be
bot.fetchUser(vote.user).then(u => { u.send(message ) }
@pale fulcrum
so its wrong
.then(u => ) means u contains the result of the fetchUser function
the result is a user
so u is a user
so what we can do?
wrong version, thats for v12
anyway, we already told you all you need, you just need to use your brain
you can send messages to a user when you do user.send()
properties of users in d.js 11
and u is a user
ok
therefore you can do u.send()
I'm already messing around, one says one thing and the other another, this is messy xdd
you need to change message to what you want to tell the user
yes
you didnt close the .then()
I think that since vote.user is a number, you need to turn it into a string
what does it do to check if the user has so many votes, if so, that the command continue
sorry, I havnt gotten that far yet
Ok
@vapid cape
you know ?
what does it do to check if the user has so many votes, if so, that the command continue
you need to store votes in a database
that only gives you a boolean
you can use that, but from what people have said here, it is slow to update
and what i use?
could take a few minutes after the vote to start working
most people use a DB for that
the only accurate way is to store votes in a database
DB?
but that requires knowledge of databases
database
well
yes but first you need a DB and since you arent doing anything with the API rn, move to #development
ok
Is there any docs for the JSON version of the API? I use Elixir so nothing on the webapge helps. I'd in the end make my own implementation and post it as a resource.
@rotund magnet which api?
wait
sorry im being dumb
DBL sends a JSON response for most libs iirc
which lib are you trying to use it with?
My language is Elixir and there is no library for the API. That's why I'd like to make my own library, but I don't see any official docs for the JSON api.
look for the Topics bit
that has the tables for what is what type in respones
auth is just done with headers like normal
That's... not what I need. Or rather is a part of what I need. Webhooks post to an url I want, it by no means is similar to the general API. I can't see how many votes a bot currently has. I can use webhooks to keep count but that means if mu bot is offline for even one vote, I'd lose the correct count.
use the Resources part then
Nvm, I just didn't find it, this is the resource I need https://top.gg/api/docs#bots
I can't seem to get it right
I get an Unauthorized error when trying to use the API via postman
Should I put the token in the header and if so under which key?
Forgetting auth header?
Ah, I missed that part (I literally just found out the name by myself)
Oh and if I create a library for Elixir, is there any chance for it to be accepted as a official for that language?
I doubt there would be a necessity, though you can DM Tonkku and ask the question for yourself. :p
I mean I'm asking because I'd publish it on GitHub either way when I make it. I'll DM him when I actually do make a working version ahaha
Hello
Веди себя адекватнее. И читай правила в #rules-and-info.
I'm from Russia my name is Kirill
Also please read channel topics.
Почему я должен перефразировать правила...
Все иностранные языки идут в #memes-and-media.
Ок
i already have dbl and DBL token defined but i get this error
dbl.webhook.on('vote', vote => {
heres the error i get
dbl.webhook.on('vote', vote => {
^
TypeError: Cannot read property 'on' of undefined
yeah
sec
i have 2 dbl variables
idk why
but
in the api website
it had it
like that
lol
what do you defined dbl as?
const DBL = require('dblapi.js');
const dbl = new DBL(config.topggtoken, client);
i hid the token in the config
ye you didnt configure the webhook
no thats not the problem
you did not define the webhook
const dbl = new DBL(config.topggtoken, { webhookAuth: 'password', webhookPort: 5000},client);
that is a default one
then configure the port to an open port to your system and go to the bottom of top.gg/yourBotIDHere/edit and set webhook url to the IP:port/dblwebhook and passowrd to what you put as webhookAuth
dbl.webhook only exists if webhookPort or webhookServer are present in the DBL constructor
and they only work if the port is open and you have configured the password and url on your bot's edit page
not your bot port, your open external port
you define it yourself
oh
yeah
because you can put whatever you want in authorization
as long as its the same as webhookAuth
so its possibly like a password
ye
ok
the URL depends on where your bot is hosted
heroku?
if using a vps, it will be your vps's ip address
for heroku its PROJECTNAME.herokuapp.com/dblwebhook
and webhookPort should be process.env.PORT
okay
help?
dbl.webhook.on('vote', vote => {
^
TypeError: Cannot read property 'on' of undefined
please show what you defined dbl as
const dbl = new DBL(config.topggtoken, { webhookAuth: config.topggauth, webhookPort: process.env.PORT},client);
i inserted the auth and token in the config file
im not sure
hm
show your full code
ok
const Discord = require('discord.js')
const config = require('./config.json')
const si1 = 1000
rannum = Math.floor(Math.random() * 500)
const DBL = require('dblapi.js');
wfm=0
min=2
max=20 // +1 because nodejs screws something up lol
console.log(rannum)
// const ffmpeg = require('ffmpeg')
// const opus = require('opusscript')
const client = new Discord.Client()
const dbl = new DBL(config.topggtoken, { webhookAuth: config.topggauth, webhookPort: process.env.PORT},client);
const server = require('./server.js')
const express = require("express")
const app = express()
const pngmemes = './memes/png'
const gifmemes = './memes/gif'
const jpgmemes = './memes/jpg'
const pngcusmemes = './memes/png/custom'
const { Users, CurrencyShop, SpecialShop} = require('./dbObjects')
const { Op } = require('sequelize')
const currency = new Discord.Collection()
const PREFIX = 'goose '
const fs = require('fs')
its a lot of things
but yeah
Is the posting api JSON only or can you post it as a form too?
Worth a shot
I never wrote a code that is 400 lines long
(because i wrote longer with useless spaces)
How i catch the webhook password ?
ip?
Port
port
im sorry
I'm sorry, I'm Brazilian, I don't speak English very well
okay
PORT*
const dbl = new DBL(dblToken, { webhookPort: process.env.PORT, webhookAuth: dblPass });
?
I put the token, and the password in the config
TypeError: Cannot read property 'on' of undefined
nop
okay
Don't have to define the process?
Hello! Any person know how to do a premium command? Like for example if you have 5 upvotes you can run the command
It will require a db
If anyone has voted before the db was setup they wont be stored, you will have to check if the person has voted, and if yes then you add 1 to the total votes
Get this from the api /bots/yourbotid/check
It uses the userid field, and either outputs {voted: 1} or {voted: 0}
If its voted 1, add 1 to the total votes for the specific user, then query if they have 5+ on the command you want to have premium for, If yes, let them use it, if no give them an error and a link to vote then try again once they have 5 votes
ne has voted before the db was setup they wont be stored, you will have to check if the person has voted, and if yes then you add 1 to the total votes
Get this from the api /bots/yourbotid/check
It uses the userid field, and either outputs {voted: 1} or {voted: 0}
If its voted 1, add 1 to the total votes for the specific user, then query if they have 5+ on the command you want to have premium for, If yes, let them use it, if no give them an error and a link to vote then try again once they have 5 votes
I legit just said that @restive otter, you legit just stole my answer
bot ayam
??? got
Selfbots are against discord ToS dude
Anyway, Hope my solution helps you @restive otter, that's what I am using for mine and it works without fail in my testing
Ok
@restive otter can you give me the code in dm?
I am Spanish and I do not understand you much
What code do you use?
I use handlers
Discord.js v11.6.3
What language?*
Discord.js
The one I have a query for is in discord.py, sorry
Ok
Hello! Any person know how to do a premium command? Like for example if you have 5 upvotes you can run the command
Someone? I use discord.js v11.6.3
🥄
pls help my member count bot doesnt work
This is Not the write Channel for that, read the channel topic please ty, also this is not member count support server @primal sigil
oh they left
/weekend
I can’t find a bot help server how do I get it? <@&304313580025544704>
-atmods
Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.
Here are some examples of emergencies:
- Raids / Multiple members mass spamming.
- Severe disruption of Discord's ToS (NSFW content, etc)
- Anything that requires more than 2 moderators to handle.
also check the channel topic
You can find the help server by going to the page and then clicking "Join Support Server", you do not click "Join Discord" at the top of the bar
also this chat is not for asking that :')

in the api channel too, please take note of the channel you are in before sending
oh my god please @stone sierra read the channel topic
Sorry. I already noticed it
read docs
french here ??
ouii
puis je te parler en pv stp
oui stv
fait ^^
Would you mind elaborating?
its probably something i havent updated, but i have made no changes to my bot's environment and now my webhook wont connect anymore
it never emits the 'ready' event
ive tried fiddling with my firewall rules and theyre all correct
How are u posting your servercount?
I did not understand
What's ur current code to post the servercount?
You need to post your servercount using the top.gg api wrapper
What's ur coding language?
Is your bot approved for a start?
Ok
https://top.gg/api/docs#jslib @blazing kraken
ty titan 🙂
😀
It's kinda slow at times
better to use webhooks if you want speed and reliablity in the long run
I am using this endpoint as a fallback because when my website is down webhooks obviously can't work
so user can still get their reward with a bot command
in a way, yeah
how can i get when someone upvotes my bot and the user that upvotes it.
Webhooks ( https://top.gg/api/docs )
Someone can help me plz ( preference brazilian or spanish )
what do i put in here, and where do i use it in the vote listener
@devout iris You have to say what you want help with, if you need help...
you put the link to your bot's webhook
normally, IP:PORT/dblwebhook
the vote listener can be anywhere you want but its normally in the same file that you use to start the bot
where can i find my bots webhook
you need to create one
like using a host? @pale fulcrum
in your code, when you create dbl, you can create a webhook
How do i connect api so when someone vote it the bot give him credits
const DBL = require("dblapi.js");
const dbl = new DBL(dblToken, { webhookPort: 5000, webhookAuth: webhookAuthPass });
Thats what i have right now @pale fulcrum but im not sure how exactly i would go about creating the webhook
unless that is the webhook
well, you just need to know what you set webhoolAuthPass as and make sure that the port 5000 is open
then you can put the IP:5000/dblwebhook
and authorization is webhookAuthPass
yes
0.0.0.0 is refering to the machine it's running on not it's real IP. If you're running something on heroku you'll need to use it's actual address.
how can I make the webhook post the information to my website and then from my js code receive it
Have your website accept post requests for some route like /vote & then somehow pass that info to your bot (how you do that depends on how you've got things setup).
I accept webhooks on https://api.dueutil.tech/vote in my bot
In JS you could host a little express server somewhere (maybe from within your bot) & have a route like /vote that process vote webhooks.
https://expressjs.com/en/starter/basic-routing.html you'd want to handle a POST request
im using heliohost so i think apache
so you'd need to make a php script to receive vote events
but if you want those events to be received by your bot, its better to receive them directly by your bot, not through your website
Looks like that host allows you to use a few langs
heroku uses its project url
^
oh
and port is process.env.PORT
const {TOKEN, MongoUrl, IMGUR_API_KEY, GOOGLE_API_KEY, dblToken, webhookAuthPass, HEROKUPORT} = require('./config')
const DBL = require("dblapi.js");
const dbl = new DBL(dblToken, { webhookPort: HEROKUPORT, webhookAuth: webhookAuthPass });
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!`);
});
So it would look like this?
if config is a js file, yes
yep
if config is a json file, no
no it should work fine from js
ye
ok well it doesnt work and when I use the test button it does nothing
const {TOKEN, MongoUrl, IMGUR_API_KEY, GOOGLE_API_KEY, dblToken, webhookAuthPass, HEROKUPORT} = require('./config')
const DBL = require("dblapi.js");
const dbl = new DBL(dblToken, { webhookPort: HEROKUPORT, webhookAuth: webhookAuthPass });
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!`);
});
JS code ^
@vapid cape
{
"dblToken": "***",
"dblPass": "***",
"dblPort": "3000"
}
My config.json
The token, and the pass is correct defined.
The dblPort is the glitch port
@nimble fossil can you help me plz ? ^
Where is the :port in the url ?
@restive otter you need to add auth
how can i add auth
Authorization, you create you password
@devout iris you need to make sure it the port is forwarded, and you are putting the correct webhookURL in
if you are using glitch or heroku or a vps you need to check what ports they yse
A friend of mine who managed to use it did it this way, but mine doesn't work. @pale fulcrum
@restive otter what you put as config.webhookAuth needs to go in the box
@devout iris do you use glitch?
np
@restive otter Whats the heroku port ?
In heroku ?
are you using js
In glitch is it too
I didnt use glitch but tbh, I thought it was 80
But does't work
const DBL = require('dblapi.js');
const dbl = new DBL(dblToken, { webhookPort: dblPort, webhookAuth: dblPass });
dbl.webhook.on('vote', vote => {
console.log(`DBL - O usuário ${vote.user} votou em mim.`)
const canal = client.channels.get("694685092760649770");
canal.send(`DBL - O usuário ${vote.user} votou em mim.`);
});```
My code is correct ?
are the variables dblToken dblPort and dblPass defined?
do you module.exports or do you use a json?
are the variables
dblTokendblPortanddblPassdefined?
@restive otter yep
{
"dblToken": "***",
"dblPass": "***",
"dblPort": "3000"
}
My config.json
👍
const { dblToken, dblPass, dblPort } = require("./config.json")
const { token, dblToken, dblPass, dblPort } = require("./config.json");
Really ?
What i use
I don't speak english very well
i know you can do that with a config.js
you need to do js const x = require("./config.json") const dbl = new DBL(x.dblToken, { webhookPort: x.dblPort, webhookAuth: x.dblPass });
you can only use { x } = require when you use module.exports and export an object
ok
you need to do
js const x = require("./config.json") const dbl = new DBL(x.dblToken, { webhookPort: x.dblPort, webhookAuth: x.dblPass });
@pale fulcrum i will try this
Is the password the same on both?
Yes
const config = require("./config.json");
const DBL = require('dblapi.js');
const dbl = new DBL(config.dblToken, { webhookPort: config.dblPort, webhookAuth: config.dblPass });```
Console log config
Yes sorry
Add a line that logs config , try console.log(config)
Do you want to know if you logged in to the console ?
Ah
ok
It returned all information from the config correctly.
I think the problem is not there. :(
Ok what do you use to host?
glitch
Ok im not sure about glitch’s port
Ok then idk
that makes 3000
ok
But keep 3000 on the bot
Acho que ao invés do URL do bot, deveria ser o IP da VPS ou o IP da Glitch @devout iris
No seu caso, da Glitch
Yes?
carai, finalmente
Acho que ao invés do URL do bot, deveria ser o IP da VPS ou o IP da Glitch @devout iris
@restive otter voce sabe qual é o ip ?
@pale fulcrum Translation:
I think that instead of the bot URL, it should be the IP of the VPS or the IP of Glitch @ScopPH
Yes?
@pale fulcrum i pinged you to know, if my code is correct sorry
@devout iris sabe pingar um site usando CMD?
Sim
foi
Copia o id e coloca no lugar do link
Aí ficaria tipo
https://0.0.0.0:80/webhook
Dev, eu preciso mudar algo na index ?
So stay on topic
Support only on this channel, sorry
Did you set everything up correctly in the index?
i think ye
Now do the following in the URL of top.gg that you configured:
https://PROJECT_IP:PORT/webhook
@mighty shuttle He can help me in portuguese language ?
Dont need to be /dblwebhook ?
Now do the following in the URL of top.gg that you configured:
https://PROJECT_IP:PORT/webhook
@restive otter ja coloquei
i need to put this in the index too ?
Now try to test the webhook on the site and see if something appears on the console
Yes
No, nothing logged to me in console
Did you save before testing?
Hm
I only speak English and Dutch and if it's webhook related sorry but I'm not gonna be of much use as I've not used them myself
No, the @restive otter can help-me in portuguese ?
I'd personally recommend moving to DMs in that case. Don't entirely remember us having language rules about this channel but it would keep it more readable for the average user (for future reference it is actually allowed as long as it's ontopic)
@restive otter Podemos ir para dm somente para me ajudar ? após isso encerramos.
Ok
thank you
hey, is there a way to create embed but add fields after the declaration ?
let embed = new Discord.MessageEmbed();
embed.addField('name', 'value');
is that ok ?
yes
#development next time
ok
at=error code=H14 desc="No web processes running" When i test my webhook on heroku I keep getting this error when i use a worker instead of web (Because web shuts down if not serving a website for 1 hour). Does anyone here know a solution to this.
hi
Türkçe Bilen varmı orsubluar
where could i get my dbl token again?
thx
/dblwebhook
oof
How to get a DBL Token without need to public the bot to integrate it into the bot?
Your bot needs to be on top.gg before you can use a DBL token.
And to be accepted on the bot list your bot needs to be public
Also why would you want a DBL token for a private bot? There is no need to vote for a bot that no other server can use
to integrate it before release?
you get the dbl token when your bot gets approved
there's no way to get one before approval
@mighty shuttle ad ^
ty
yo i'm a novice when it comes to programming and i've tried for hours and used multiple sources to get the interaction with the top.gg api working but i havent been able to do so. Has anyone got a link to a guide i can use. I use python to make my bot.
i've looked at the code multiple times and tried different things with it but cant figure out to get it to work
i mean the code is litterally drag and drop
and i litterally did that
do you get any errors...
i still cant figure it out
dont know if its me being really dumb rn or i'm missing something that i've never been told about
could i have a hand??
lends a hand
So what's your code is looking like currently?
I took out the tokens for obvious reasons
that's what i found here; https://top.gg/api/docs#pylib
i dont really understand any of it
may i also say
does your bot even work?
considering you init client class
then the next callable line, run it
blocking everything underneath
well i put it on a seperate script so it didnt clash with anything else
i was planning on adding it to the main script afterwards
If you're not using the commands extension, just remove the class, any reference to self and instead of using __init__ use the event on_ready
so like this? But there're errors so i must be misunderstand something here
move on_guild_post out of on_ready indent and add @client.event above
And the bot = bot is redundant
And you might want to make dblpy a bot variable aka bot.dblpy
bot = bot is an error no?
yes but also no
your bot object isnt called bot is it
its called client
so bot needs replacing with client
so client.bdlpy
dblpy = xyz is irrelevant
you dont need dblpy = bot.dblpy
because it just get overriden bellow
and client doesnt have a dblpy attribute unless you manually set it
so remove it
and replace bot with client for DBLclient
so this??
👍
So someone made me mine so I just want to know how I can get mine approved or something
Submit your bot on https://top.gg
Also wrong channel for that lmao
Hi, I have an issue using the cog for discord.py. I have a sharded bot (4 process with 10 shard by process), and when using the example code, it show only the server count of one process
because its split cross processes, the lib cant just do len(bot.guilds) which is what it does for the server count
if you want it to post the total from all 4 proccesses
one way would have all 4 put their individual server counts to a global cache
or see if the lib can support posting a list of counts
shiv will know
👀
Psst, shard_id and shard_count
This is fun actually, I forgot about sharding support 
tbf its not that bad
depending on your python version (3.8+) you can setup a global cache pretty easily
bot.guilds shouldn't be touched tho, no?
processes cant share data
/ they cant see the same thing
so each process will only have the guild count for its set of shards
I see where you're getting at
why alot of people use docker when running mutliple processes
then have an ENV var
and have all of them post guild count to that
ok i just find out thank you !
dude
s/help
.help
Anyone know how to set the command for those users who had voted for us
Please mention me if you can help me
dbl.hasVoted(message.author.id).then(voted => { //if voted is true user has voted else it hasnt;
})
//dont work with webhooks```
Yo berapi ni discord
does dblapi automatically post server count from all shards?
this is the constructor I'm using (discord js v12)
it might be
how to connect your dbl webhook if our host does not allow us to touch the ports
you cant
if there are no open ports that you are able to route stuff through then it wont be possible
how can i do that so my bot can still see who is voting?
i mean you can request if a user has voted within the last 12 hours using the api
only if your bot gets less than 1000 votes a month
ah :/
so I can't, too bad thank you anyway
and is that on the dbl site in the webhook box I have to put the ip instead of 0.0.0.0 or the bot can communicate even with 0.0.0.0?
http://0.0.0.0:5000/dblwebhook
Replace 0.0.0.0 with your public IP
what are you hosting on rn 🤔
rn ?
right now
at home
you should be able to open ports when self hosting 🤔
also your public IP should only change when your router restarts which i cant imagine is often
it restarts every single week
... why
i don't know it's orange that works like that
how to make bot leave voicechannel if no one on vc except the client on voiceStateUpdate
const embed1 = new Discord.RichEmbed().setColor(config.emcolor)
.setDescription(`
Thanks for <@${vote.user}> for vote for luffybot
If you want to vote for me go to [https://top.gg/bot/652156490819436544/vote](https://top.gg/bot/652156490819436544/vote)
`);
client.guilds.cache
.get("563708914265358336")
.client.channels.cache.get("689908901235130634")
.send(embed1);
console.log(`User with ID ${vote.user} just voted!`);
})```
not work
is there an error?
well I guess first, did you set it up correctly in the dbl edit page?
does dblapi automatically post server count from all shards?
@limpid vector it does
Much appreciated, thanks!
How i get my API Key? I look at the API Docs but its says i dont have an bot, but i have added my Bot
@restive otter you can get an api key after your bot got approved
ok thx
:3
after your bot got approved you can find 2 other fields when you edit the bot
the field with the api options also allows you to see the api key or regenerate it
just so you know
woops
btw there is an else statement before that
and i tried changing this to if else
but it still doesnt work
it gives me a syntax error at the {
hello me again
i want to use get_user_vote but i cant figure out what to return
This is my code
could i please have some help
yea nvm again
it turns out it was just returing true everytime someone used it
so help pls??
-botinfo 460610749283172353
That bot wasn't found
-botinfo @460610749283172353
Please include a bot mention or ID
-botinfo @dusky island
That bot wasn't found
@cinder adder @stone sierra bot usages in #commands or #265156322012561408
How can I make a vote only feature
Like only allow them to use the command after they voted
-botinfo dumb bot
Please include a bot mention or ID
-botinfo @topaz sentinel
658757206908600320
Dumb Bot
2515
This is just a stupid bot I put together with some commands, really basic but is fun to mess around with.
discord.js
db!
44
8
No server count
@burnt sparrow
(bot usage in #commands or #265156322012561408 lmao)
Why is there a long delay between when someone upvotes and when the /bots/{bot.id}/check endpoint returns true
I would assume some garbage cache but idk for sure
@gaunt aspen Wrong channel to ask that, ask in #development and read #502193464054644737
-botinfo @restive otter
688390331523530978
BryXou
7414
Bot FR | Bot pour la modération, de nouvelles fonctions arrivent, rejoignez le Discord pour être informé de toutes les nouveautées
discord.js
++
3
2
No server count
@open bane
Hey i don't understand how to mâle a webhook for vote example : a person vote for my bot and a webhook send a message
@green mantle sorry
have you looked at the api docs for js?
what bit doesnt make sense?
Example can i send the message in a channel like a bot with the discord js api
sending messages to a specific channel isnt DBL api related thats normal discord.js
the DBL Api itself doesnt support sending messages to channels
you'd need to make a seperate system for that
Oh okey so i can't send message with my webhook when a person vote
not with the DBL API no
that would be normal Discord.js
you would take the vote event from the DBL Api then -> use discord.js to send a message in a channel like that
Ohh nice thx
Example : i use the discord js api and DBL so for example a person vote for my bot and after the webhook use the discord js api for send a
message
yeah
so DBL would send the vote payload to your webhook, you would take that vote info and go from there sending to a specific channel or what ever
Like a bot
hmm?
Send a message in a specific channel like a bot
Yeah the bot can do that
Okey
you can do it with webhooks but not sure how todo that with js
np
-botinfo @unkempt scarab
What is the webhookAuth password ?
Ohh okey
My code doesn't work :
const discord = require("discord.js");
const DBL = require('dblapi.js');
const dbl = new DBL (my token..., { webhookPort: 5000, webhookAuth: 'myPassword' });
dbl.webhook.on('vote', vote => {
message.channel.send(`${vote.user} a voté pour BryXou | +1`);
});
Why the webhook doesn't send message when a person vote for my bot or when i make a test ?
there is no "message"
learn the basics of any laguange
and then make a bot
@restive otter
this is what happens when you copy code
And
you can learn the basics of any programming lang and then try making a bot
??
And my package.json
I'm saying
Look my package
learn the basics of any programming lang
you're not even paying attention
to what I'm saying
no
Look my package.json
learn
Why i have this error
I have install dblapi.js
why do you even have pupeteer
there are a lot of dependencies you don't even need
I'm not going through this
It's not a problem for the moment
I'm trying to fix
This
And after i delete a lot of dependencies
I'm sorry, but you don't want to learn the basics of any programming language. And I'm not going through this.
