#development
1 messages ยท Page 895 of 1
i think the await directories
you need readdirSync
await is not the variable type, it is what you are doing to get the directories, but whats throwing the error is that it cannot find the 'commands' folder within the current operating directory
readdir requires a callback
He promisified it though
He used the Util.promisify function
discord.js server is being raided lmao
however, util and readir are never decalred as const variables
So if it's still so complicated can someone give me a simpler code for command handler with multiple folders?
like /commands/directory/file.js ?
sec
ok
util.promisify doesnt work well with all fs methods
because some of fs's callbacks do not follow a return parameter order as expected by promosify, so promisify ends up returning or passing the wrong values/parameters
wow slow images discord wth
its better if you use readdirSync or regular readdir without promisifying it
I think you can also customize the promisify function but like, doesn't make sense for the fs' callbacks to not follow the promisify callbacks
yeah its been a while, so i think most of them were fixed already
i've never actually used util.promisify because i can just create my own promises and have full control over it
so i was going to ask this in the discord.js server, but then the raid happened, and I dont think its gonna open back up anytime soon, so i'll just ask here
message.guild.channels.create(`${people.join("-").toLowerCase()}`, {
type: 'text',
topic: `Party including ${people.join(", ")}. Started on [DATE]`,
permissionsOverwrites: [{
id: message.guild.id,
deny: ['SEND_MESSAGES'],
allow: ['VIEW_MESSAGES', 'READ_MESSAGE_HISTORY']
}, {
id: id[0],
allow: ['SEND_MESSAGES', 'VIEW_MESSAGES', 'READ_MESSAGE_HISTORY']
}, {
id: id[1],
allow: ['SEND_MESSAGES', 'VIEW_MESSAGES', 'READ_MESSAGE_HISTORY']
}]
})
I have this issue where, while it does create the channel with the proper name and topic, it doesn't set the permissions right. The ID array is [ '262410813254402048', '300331417634603010' ], which is me and my alt's id. What am i doing wrong here?
or am i using an outdated method of permissionOverwrites
and yes, it has all the permissions it needs to edit the channel
@neat ingot ```const cdirectoryFiles = fs.readdirSync(CONFIG.command_files);
^
ReferenceError: CONFIG is not defined```
Hi, I thing some of you will find it stupid but, I have a problem with messageReactionAdd ! Before 12.x, with a raw event, it always worked fine, but now, with the latest version, with raw and without raw, nothing work ! I just have : js bot.on("messageReactionAdd", (reaction, user) => { // My code })if someone can help me.. ๐
how should i define CONFIG? =))
i know how to define man but i dont know what should be after = ๐
i have my config defined like this..
but thats likely much more complex than what you need
lulz
so i should do const CONFIG = { command_files: __dirname + "/commands"
?
Does some one here know how to use dank memer api for image manipulation ??
it depends, that might work, but depends on how your directory is structured, and when/where you include the file. basically __dirname will be the directory of the currently operating file
so yes, as long as there is a 'commands' folder within the same directory the file that runs the code
const CONFIG = { command_files: __dirname + "/commands" };
would be sufficient
i have like /Bot/commands/directory/file.js
Does some one here know how to use dank memer api for image manipulation ??
@stone meteor did you check out the docs?
I forgot how to make it so the status includes the amount of servers, is it client.guilds.cache.size or something in v12 djs
@stone meteor did you check out the docs?
@sudden geyser
Nah
I didn't found can you get me the link. ?
You sure you spelt it right? It's in the error message.
just checking
ofc its not, your not supposed to copy my code word for word, you were supposed to use it as reference
lol
ayy it works
@sudden geyser oh
I read that earlier
But still I don't know who to use that thing in my commands
@neat ingot oh =)))
well
there is some of the code i didnt show which would help get it working i guess
basic get with possible query parameters and boom
oh, i already did a collection, ty ๐
does anyone know where is the dblapi's test button ?
on the website
it's on your bot's edit page
if you mean to test for voting
So I make a role and store it in role like this
const role = message.guild.roles.create({data:{
name: 'Test',
color: '#26ff00',
hoist: 'false',
position: '1',
mentionable: 'false'
}})```
But when I try to use `role.id` it comes back as `null`... what did I do wrong?
@neat ingot still don't work
how do you make this https://prnt.sc/s6ygjp show the servers?
Sleepless, any API action returns a promise.
what doesnt?
You must resolve it first.
@neat ingot the commands don't work
well, assuming you have copied my kommander thing exactly, of course they dont, youarent executing any of the commands
Adam, you'll have to make a http request to the DBL API ^-^
like, you havent linked up the kommanders commands to actually run when a message triggers
@neat ingot i know i'm too dumb ๐
hmmm... alright, let me do some more research. Thank you
well, im not here to write other peoples bots for them ๐
You can either do it with a library like dblapi.js or just make the request yourself with the http library / node-fetch
Your bot must be approved afaik
otherwise https://top.gg/api/docs#mybots
that token makes it invalid
wait
it forced it to be spaced out
let me try again
is the file path correct
are you sure the file exists
One dot is for the same directory. Two dots is for the directory above you, so you may actually be trying to read /customisation.json
@neat ingot why are you even doing Object.create(Object) that's literally the same as doing {}
"Error: Cannot find module 'dblapi.js'"
I npm installed it do I need to upload that to github?
its on github so i can
are you running it locally or hosting it somewhere
hosting it somewhere
then
you need the module 'somwehere'
so you're hoping to install something on your machine and hope it works on your host out of the box
ok
should i remove it from nodemodules and just put it inside of the main bits
no
upload the node_modules folder
at some point your crap will get too big
so you'll have to get a real host
what you're doing is literally saying 'I installed google chrome on my pc why don't I have it in my phone?
well
tbf it is
should i remove the un-needed node modules that i dont need on github that work without
the other stuff work without being on github
some modules that are installed get installed bc another module you use needs them
wait cant i just upload in groups to get all the files onto github-
i do Object.create(Object) because it takes more space and makes my code look neater. (imo) im strange i know ๐
(wait... you have uploaded your node_modules folder to github? ๐ณ )
basically because its predefined, rather than an object created on the fly, if that makes sense?
like, if iw as just passing a small object to some function for options or such, i'd go {things:stuff}
but yea, predefined stuff thats like, global, or large objects, particularly those with functions, i do object.create
my little noob brain -._.-
lol
anyone familiar with behavior of urls as objects in rich embeds?
sure
^
good question
lool
I'm using this in a function that doesn't have access to my "game variables"
what is http://45543456787.com/lol.gif
so to find the player again i need the serverid and user name
but like
you can just fetch the old embed and get the data from there
more specifically, I'm in the add/remove reaction event
so I have my embed, and the user
but I need to find the guild id of what server the user is playing the game on
good start!
the concept is that im refreshing the user's inventory
message.guild isnt doing it? ๐
so they don't have to keep using a chat command
message.guild is a dm
the message is the embed which is a dm
there's the idea
i'd say for security reasons not to try getting things from embeds in dm's and sharing guild info with anyone via dm
unless its only the people in dm who the data is about
yeah, so you see how its got user name and guild name
the database finds the player that way
user name + guild id
So, you want a user to be able to use the command in DMs with any of their serves?
that gets me back to all my game information for that player
yes - so if a player had 3 inventory embeds up from different servers
each one would update
because the guildid is nested in embed somewhere
I could just flat out make it the description
but then people will tell me it looks like a bug
you should think of a better system ๐
this is innovation!
so was my idea of having a command suffix instead of prefix, after about 3 commands i realized why it wasnt...
I'm still not sure 100% what you're trying to do
here
ill give you the full ss
so that is a players inventory for the game
when the reaction is clicked
it updates with the current amounts based on what they've done in chat
that's the idea anyhow
rather than re-sending the embed over and over
just resend the embed
makes sense, here's my suggestion - do you do database caching? Like do you store database objects in-memory?
hey guys
require(`./commands/${dir}/${cmd}.js`);
how to make cmd handler like this?
like commands/fun/file.js ??
@cinder patio not exactly sure what that means, I'm building the embed from a mongodb and a function
you read the directory of categories, then you read loop over those categories and read the directory of the categories.
if you dont know how to, then just use discord js's built in commad handler and examples
Since when has Discord.js had a built-in command handler?
Do you mean the example they have?
never, commando is a thing
oh that framework
ikr
lol
no it is ugly
if they dont know how to make their own, its easier
I never really looked into building my own, I work around the example
it makes a few things look weird but it works fine
it is easier but if you go down the road you'll hit all the issues with frameworks not giving you much room to build with
i built my own, cause i didnt realize discord js had an option
no point going to theirs now
lol
aha, well you can store all embeds that could get updated in a map, along with the user who requested them, ex:
watchedInventories.set(userId, {user: user, guild: guild, msg: theMessageEmbed});
const {user, guild, msg} = watchedInventories.get(userid);
...fetch the data from the database using guild.id + user.id
msg.edit(..edit the embed...)``` @maiden mauve
hm
so that "event" just sort of lingers in the memory of the server like a global variable?
well, sorta... you can clear the map every once in a while..
Is getting a list of guilds my bot in against tos?
Just wanna check before i add anything like that
I don't see how its any different than logging what guilds it joins and leaves
Nex, afaik if the command is private, for owners of the bot only it's fine
i personally track how many times my bot is used in the guilds its in
Yeah tahts what i made it do
but its not available for others to just get
It makes sure it my id
should be fine then as your not sharing others personal data
I don't know by its ToS but a good thumb rule is to keep it private (e.g. to yourself).
Yeah it only says names and the amount of people in the server
pff my bot spits that info out every bootup in the console
I have a private test server that i would use it in
I'll keep that idea catalogued Google
But I like the integrity of an embed remote working even after bot restarts
My goal is that a user can load all the game menus and use reaction remote
but there is a limit to how long the bot can watch a particular emssage for reactions
which would be lost upoon shutdown
no?
As far as I've tested its good after 24 hours
someone know how to show up the offline members of all the guilds? i know that i have to filter that, but i literally don't get it
there's any guide or smh?
@neat ingot just loaded my "Test bot" and a menu remote from 3 days ago works
thats pretty neat ๐
this new idea of mine is adding in an extra problem
that's why im temporarily stumped
I was really banking on the url being a hidden string for the slam dunk
If it was my own object I could just make up a string property
is hover a tooltip supported by disc?
code looks kinda hot ngl
when i hover over them it displays a text field
what is hover tooltip?
I've never seen that before
nope
(hovering over vote)
ok say oliy sends a message in #announcements and simeone reacts and ifs a partial reaction, can you fetch the reaction?
so there are a few ways you can have information there that isnt 'seen' by the user
I could make a . that's a link and use the tooltip as a retrievable string
but it would still be there
something like that?
yea pretty much
that's a good idea in lieu of hidden
for someone like me, i won't be able to get it no because my bots not in the sevrer, for some1 like u, yes u can @grizzled raven
if ur bot can't read #announcements then no
hm
but now that we're all in the loop
one of my questions was does setURL immediately dump it's string path if theres no image?
I guess it appears to
no eyed deer
maybe it does if its not a valid url schema
try something dumb like umm
did you see what I tried? it made me laugh a bunch of times
png://my.fake.file.com/png
oh lol
add a field with this as a value
[shownname](${target.serbverId} "shownonhover")
?
and grab the first field or something?
and without typos in server ofc
yea it shouldnt be able to link the url so the link shouldnt be valid
idk if it would still try to open it in the browser on click though
what are you trying to do
hes wanting to hide a bit of data in an embed so he can later retrive it
well, discord won't display it without that
cause that should invalidate the link and make it unclickable ~ maybe
it does a validation check
lol
didnt you want it to be hidden? isnt that the point? lol
im writing the code to see if i can grab an invalid url
when I tried using the thumbnail url
it turned my serverid into undefined
because it wasn't in a valid format
yea, but its not a thumbnail url now, its am embed thing, which contains everything else valid but a link to somewhere, the text shown and hover should still work i think
ill get back to you in a short bit mining the embed object
if(message.metions.members.first().id == message.guild.members.get('id here'))```
so im trying to make it so my bot responds with a specific thing if a certain user is mentioned and this is what im using but it doesnt seem to be working
you're comparing a string to a guild member
that sounds like it wouldnt work 
remove the .id and see how that goes
so you need to get its id after
That won't work either I believe.
As they're different instances (?)
i think they should both represent the same thing though
Wait are you trying to make the bot respond if a message has a specific mention? @earnest phoenix
maybe but if they're different for some reason it won't work.
yes
@earnest phoenix =>
if (message.content.includes('<@ID OF THE USER>')){
return message.channel.send("The thing you want it to say");
}
ah nice
the "I0" is the footer text
i showed above can also hide in the embed field link thing
yeah pulling the data from fields
either way
i solved my problem ๐
thanks for tagging along
dank, that won't work if the member has a nickname.
@sudden geyser wait what?
That's not how the mentions work
your way didnt work for me :(
If the command was used in a guild and that member has a nickname, there will be a ! in the mention (<@!user-id>)
Hmm wait... What was the option to check if the user had a nickname or not? @sudden geyser
member.nickname but I think it's safer to just check message.mentions
message.mentions.has(guild.me);
i use that to check if my bot is mentioned
guild.me could easily be replaced with a different member object
is there a way that i could just have the ID itself instead of a member object
i feel like that's slightly easier
const member = guild.members.cache.get('ID');
message.mentions.has(member);
whats wrong with doing something like that?
fair
you don't actually need to get the member object as .members is a collection of mentioned members but I think they get the point
there are many ways to check if the member was mentioned. Just depends on how you want to check it.
ty
I'm wondering if this is the correct place to look for someone to code a bot for me (with payment). Tbh I'm not sure if it's even possible to code, but just looking around. If someone could perhaps DM me if they're willing to give it a shot?
how are u not sure if its possible to code
what does that even mean
and yes this is the wrong place
Because what I need it to do is.. some odd math + dice rolls and myself knowing no idea how to code I don't know if it's something possible to do. Could you point me towards a correct place? Unfortunately googling "Discord bot discords" doesn't exactly give very good results.
guess u can dm oliy to post in #434058442764714002
Oh, I didn't even see that channel. Odd that it's locked.
-verified @viral kayak and @stoic quarry
@viral kayak @stoic quarry
#434058442764714002 Is for companies with actual jobs. Not simple bot requests.
ok
Well, currently we use a dice roller and then add character stats to the number rolled. So say, they have a weapon they get 10% ontop of their attack roll. We math it all in a spreadsheet, adjust whatever rolls the dice bot has put out, then post that into the discord server. I'm wondering if it's possible somehow to have a bot do that work for us, not only rolling the attack/agility/etc number but also adding the %'s onto it based on the information we give it, then spitting out the adjusted number.
I don't think this would fit in Verified-jobs, since I'm asking for a bot request and not an actual job nor am I a company...
Do you use somthing like DiceCloud for the character sheets or dnd beyond?
No unfortunately it's not actually DND, it's a roleplay site and it's all handled on forum except the dice roll part which is done in a discord channel. And since each character has different attributes and such we enter it all manually per fight, I dont think there's a way at all for us to like.. link it so that the dice can collect the information itself.
ah yh
Tbf its possible, one of mine used todo that sort of system but its in to fit state to be of any use to u rn im afraif
Like we'll look at skill level, whether they have a weapon, a companion, roll 4 d100's and then depending on the character one might have 40% bonus to attack, 10% to perception, and we put the numbers into the spreadsheet to find the final value ourselves. It just takes a good amount of time per fight, I'm looking for a way to make it faster.
avrae might have some custom modifiers you can add
if not avrae supports some custom commands so might be able to setup some customs for the characters themselves
Hmmm, I'll take a look at it. Do you think it's simple enough for an idiot to do? Because I don't know much about coding at all.
If i remember avrae is pretty simple
But we do have few enough characters that I could potentially set up a custom per character, if I could like... tell the bot to roll character A 4 d100's and it does the math based on that.
i dont know how much DND beyond has actually ruined it since then but should be possible
yh Avrae can support custom character sheets from G sheets
so would be possible todo it custom for yourself
But in terms of coding I wouldnt know how to tell the bot that character A should have a 10% boost to attack and then a 40% boost to total score, or anything like that. Because after all 4 numbers are rolled and adjusted, they need to be added together and then another % needs to be added ontop of the total score.
Hmm I'll take a look, thanks! Hopefully it won't be too hard-coded to only work for DND things
avrae used to be pretty versatile so should be fine
throw e;
^
Error: The module '/rbd/pnpm-volume/c4ce2938-52f0-4ad4-aad3-2f01ac60dd27/node_modules/.registry.npmjs.org/quick.db/7.1.1/node_modules/quick.db/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1235:18)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
at bindings (/rbd/pnpm-volume/c4ce2938-52f0-4ad4-aad3-2f01ac60dd27/node_modules/.registry.npmjs.org/quick.db/7.1.1/node_modules/quick.db/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/rbd/pnpm-volume/c4ce2938-52f0-4ad4-aad3-2f01ac60dd27/node_modules/.registry.npmjs.org/quick.db/7.1.1/node_modules/quick.db/node_modules/better-sqlite3/lib/database.js:6:40)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)```
What did i do wrong here??
I don't know what it wants me to do...
Can anyone help me with this?
have you tried reading the error
reading is a skill required as a human
How can a bot give a role with python?
I read the error.....
u didnt
It wanted me to install node, but I already did it
u would know the problem if u djd
have you tried reading docs @tough relic
if message.content == "give me admin":
role = discord.utils.get(member.server.roles, name="admin")
await client.add_roles(message.author.id, role)
``` But I have the error (member is not definied)
long description
Long description, style tag
Long description supports HTML/Markdown
u learn css
okay
const { RichEmbed } = require('discord.js')
const db = require('quick.db')
module.exports = {
name: "messagelb",
aliases: ["msglb", "mlb", "msgtop"],
run: async (bot, message, args) => {
let messages = db.startsWith(`messages_${message.guild.id}`, { sort: '.data'})
let contentmsg = "";
for (let i = 0; i < messages.length; i++) {
let user = bot.users.get(messages[i].ID.split('_')[2]).username
contentmsg += `#${i+1} - ${user} - ${messages[i].data}\n`
}
const embed = new RichEmbed()
.setAuthor(`Message Leaderboard`, message.guild.iconURL)
.setDescription(`${contentmsg}`)
.setColor(0xabc123)
message.channel.send(embed)
}
}
For some reason it doesnt show the contentmsg stuff
And it doesnt show an error
Why me yt api usage limit always
yes
hey, whats the difference between token and alpha token pls ?
Hi
how do you open files like I'm going to write all the commands in another file so i want to open how do you do that?
what language
discord.js
thats not a language
ok thx
I wish programming was like a giant phone game
so I could pay $1 to hit the "Why?" button
for some reason every function from a require is suddenly being a delinquent
@craggy flower wrong place
i can add smth queue while bot is playing on another channel and dont know how to fix it
I think I know what I did
files requiring each other
may have changed the load order
ah yes synchronous coding 
can anyone help me
What do you need help with?
i can add smth queue while bot is playing on another channel and dont know how to fix it
What do you mean? Can you explain a little better?
Two different bots?
my bot on channel "b"
no
while im on another channel
i can play smth
i dont want to
just check if the voice channel the bot is in is the same as the voice channel you are in
Check the voice channel of the user and if it doesn't match then don't continue.
Are you using a specific lib for the bot? I can tell you.
@earnest phoenix Probably need to use a lib for that.
if(message.member.voice.channel != voiceChannel.channel) return message.reply(check your channel").catch(console.error);
i did this but
i donโt find lib ^^
i tdidnt work
Hey can we put an embed in a webhook ifttt ?
please ping me if you answer me
@earnest phoenix Can you pass application/json through IFTTT, if so just pass the embed there.
@magic jackal could you help me?
@earnest phoenix yeah one sec
Then diagnose it, what is it passing ? Have you tested to a requestbin
One sec
@earnest phoenix You're missing a " and I'm spinnin up my bot one sec
Okay let me work on ths other guy first one sec
the webhook send this
ok ok thanks
i wait
@magic jackal
still not working
i cannot pause while im on the same channel
wow
please dont spoonfeed.
ok, so basically you need to check against the bot voice channel ID and your voice channel ID in order to prevent this.
@earnest phoenix
What is voiceChannel.channel can you show me the var for that.
@earnest phoenix what lib
Can you paste what you are passing now?
oh
oh, uhh lets see I think this is like some Zapier weird tricky thing.
mmmhhh i have deleted this but can you send me an exemple ?
run(message) {
var voiceChannel = message.member.voice.channel;
if (!voiceChannel) return message.reply('Join a channel and try again');
{
"content": "@everyone",
"embeds": [
{
"footer": {
"text": "Ceci est un footer.",
"icon_url": "https://vignette.wikia.nocookie.net/spiderriders/images/d/dd/Discord.png/revision/latest?cb=20171218232913"},
"thumbnail": {
"url": "http://ec.europa.eu/eurostat/cache/infographs/youthday2016/img/embed.png"},
"title": "Ceci est un titre !",
"description": "Ceci est une description.\n\n[Ceci est un lien cliquable.](url.com)\n\n:web: Cette icone est un emoji.",
"color": 16777215
}
]
}
@magic jackal ^ this
I think you should try out the embed generator real quick with your ZAP
sec
@magic jackal the embed generator ?
@earnest phoenix try this one
{
"content": "Test body text",
"embeds": [
{
"title": "this is a test title",
"description": "test",
"color": 7506394
},
{
"title": "this is a test title",
"description": "test",
"color": 7506394
}
]
}```
@earnest phoenix Right now you are checking against the users voice channel and thats it, check the voice channel against the bot user and say this
if(bot.voiceChannel.id != userRequesting.voiceChannel.id){
}```
how to do
something like this. take a look at the voiceChannel doc page for help on making it.
@magic jackal idk how to fix my problem ๐
Okay so there is something wrong with how you are passing the information (JSON) to the webhook
@earnest phoenix are you using discord.js?
@quartz kindle yes
can't you add embeds data?
and you want to post the data in discord as an embed?
you're putting the object in content
@quartz kindle i use ZAPIER
ie: send a message containing the embed
is that what you want?
if i understand correctly
or what do you want?
const express = require('express');
const app = express();
const http = require('http');
const server = http.createServer(app);
const DBL = require('dblapi.js');
const dbl = new DBL("(MY DBLTOKEN)", { webhookPort: 3000, webhookAuth: '(MY AUTH)', webhookServer: server });
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!`);
});
server.listen(process.env.PORT, () => {
console.log('Listening');
console.log(process.env.PORT)
});```
hello , it's not working
state why it is not working
@earnest phoenix what do you want to do with this data?
send in discord
send it as a message on discord?
but in webhook with zapier automatic
then first of all, you cannot send multiple embeds in a single message
@pale vessel idk. there is no message in console
when i create card in trello, zapier send a webook in discord with all informations of the card created
i want to do this ^^
i know x)
he said he wants to post a message
well it worked, but the message is literally the embed object
yeah i want to post a message in webhook with all informations
@quartz kindle me ?
yes
because it worked, just something is wrong with the code
i thought tim didn't notice
uhh i don't think x)
no
yeah i have put content
there are two wrong things
the first wrong thing is that you have to use embed not embeds
the second wrong thing is that you're sending the object stringified, thats why its not an embed
show your code
he wanted your code
like this i can try and after modify the code
TypeError: Cannot read property 'id' of undefined
am i stupid
{
"content": "Test body text",
"embed": [
{
"title": "this is a test title",
"description": "test",
"color": 7506394
}
]
}
this is not a lib tho
send a exemple for me like i have send and i test if work
@quartz kindle can you send me the code correcly for exemple like i have send ^
no
and i try if work
i have no idea what your code is
i cant send you something without knowing your code
else it will likely not work
Hi, I need to know what I should write to make a command that shows all the servers the bot is in.
Example as if it was a feature (any ids and numbers are being used as if dbl was it's only server):
Input-
$servers
Output-
264445053596991498 (Discord Bots List)
Within json, as it needs to go into the commands.json file
what code ?
BRO It's on zapier what you speak me channel.send()
it's not a bot
but a webhook
ok ok, what i need to put here for create an embed :
shouldn't it be embeds instead of content?
whats the url you're sending to? this? /webhooks/{webhook.id}/{webhook.token}
@earnest phoenix you can use https://leovoel.github.io/embed-visualizer/ to visualise an embed with the JSON
this will provide you with the JSON you would need to post to the webhook in order to get your output
the problem is that his embeds are not getting embedded, its just posting raw text
which suggests you cannot use embeds together with content
{
"content": "this `supports` __a__ **subset** *of* ~~markdown~~ ๐ ```js\nfunction foo(bar) {\n console.log(bar);\n}\n\nfoo(1);```",
"embed": {
"title": "title ~~(did you know you can have markdown here too?)~~",
"description": "this supports [named links](https://discordapp.com) on top of the previously shown subset of markdown. ```\nyes, even code blocks```",
"url": "https://discordapp.com",
"color": 7977332,
"timestamp": "2020-04-27T22:48:34.364Z",
"footer": {
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png",
"text": "footer text"
},
"thumbnail": {
"url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"image": {
"url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"author": {
"name": "author name",
"url": "https://discordapp.com",
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"fields": [
{
"name": "๐ค",
"value": "some of these properties have certain limits..."
},
{
"name": "๐ฑ",
"value": "try exceeding some of them!"
},
{
"name": "๐",
"value": "an informative error should show up, and this view will remain as-is until all issues are fixed"
},
{
"name": ":thonkang:",
"value": "these last two",
"inline": true
},
{
"name": ":thonkang:",
"value": "are inline fields",
"inline": true
}
]
}
}
because webhooks are embeds unlike messages which are embed
because you can have more than one embed in webhook messages
@earnest phoenix do like you did before, with embeds:[{}] but remove content
{
"content": "Test body text",
"embeds": [
{
"title": "this is a test title",
"description": "test",
"color": 7506394
}
]
}```
should work
without content
ah
OH
you're sending EVERYTHING as content
that should be body
@quartz kindle tbf, once you figured that out you woulda needed to change embed to embeds
smh i already pointed that out ๐
@earnest phoenix
shouldn't it be embeds instead of content?
@pale vessel oof
yes
and i put my code in embeds ?
yes
only the embeds code yes
where ?
content: a
why is content a
get rid of content
i feel like he has been ignoring me
if you remove content, you need to remove the entire field
you cannot have empty content
i've not understand
use custom request
where ?
I have the code: ```
import discord
from discord.ext import commands
from discord.utils import get
import asyncio
bot = commands.Bot(command_prefix = '.')
@bot.event
async def on_ready():
print("Bot is ready")
@bot.command(pass_context=True)
async def add_roles(ctx, member: discord.Member = None, role: discord.Role = None):
await bot.add_roles(member, role)``` and I get the error
@quartz kindle do you have time to do something ?
?
go here and try to do what i want to do https://zapier.com/app/editor
๐
it's hard
i dont wanna create an account just for this
Repost:
Hi, I need to know what I should write to make a command that shows all the servers the bot is in.
Example as if it was a feature (any ids and numbers are being used as if dbl was it's only server):
Input-
$servers
Output-
264445053596991498 (Discord Bots List)
With json, as it needs to go into the commands.json file
@quartz kindle i'm so confused omggg
but no problem i gonna search solo
thanks you for help
termux is not for "programming"
on mobile, yes
you can open a lot of things there, not necessarily related to programming
You can also run javascript in your browser
coding on mobile is bad idea
I program on mobile
๐
And i dont have nothing bad
small screen and keyboard
autocorrect
And?
If you can avoid it definitely code on a non-mobile device
Its possible
It took me like 3 hours to make a 30 line python script
I cant beacuse this is all i have
ยฏ_(ใ)_/ยฏ
๐
anyway a good bot means a bot coded by someone who knows what they're doing, ie: at least 1-2 years of coding experience
if you're a beginner, there are probably a lot of things you can improve, but we cant tell you exactly what you need and where to make changes
But i dont find a mobile tutorial
if you're using javascript, then learn javascript
I am trying to learn but is a bit hard
you're using discord.js right?
Yes
discord.js is an advanced discord library made with javascript
Ok
basic knowledge of javascript itself is needed to understand discord.js and use it effectively
look for javascript tutorials, classes, courses, lessons etc
I use mybot guide to active it
once you learn the basics, you will be able to better understand what your code is doing
Ok
and once you understand it, you will be able to see what possibilities you can do with it
what
Yes
lol...
I am a kid
you know that discord is 13+ right?
^^
I want to study coding
you can
Ik @quartz kindle
so im sorry but you cant be here
But i am not an immature kid
but discord is 13+ 
yes but rules are rules, and big discord servers like this one must follow discord's rules, or we get in trouble
the mods will once they see this
Emmmmmm
๐จ
poor kid

Will it be a privancy breach a command that will show a random emoji from any guild that the bot is in?
no
I have a question.... How are the following not functions??
TypeError: client.guilds.map is not a function
&
TypeError: member.guild.channels.find is not a function
what is your d.js version
12
yep
I've got a question regarding IDEs for java development, I've gotten used to using Netbeans to code in java due to my courses, is it worthwhile to figure out how to code a bot for maven in netbeans, or should I just move to intellj?
Awesome, Thanks!
you might want to refer https://discordjs.guide/additional-info/changes-in-v12.html. it's really useful.
Lol
pffft, v12 has so many changes, if there was no guide i wouldnt have bothered upgrading
Fr
just to make sure, you're able to do something like this, right?```js
let m = require(require.resolve("discord.js").replace("index.js","managers/PresenceManager.js"))
m.add = () => null
//...
i really just mean if you can like change stuff with requiring the file
Whats up with Cannot read property of 'find' of undefined That used to work before...
same with Cannot read property of 'get' of undefined
cache
cache
.cache.find, .cache.get
just add cache to replace every collection, except message attachmefns and message memtions
channel => channel.name === "welcome"
);```
@grizzled raven yes you can, i do that in light lmao
I do have cache in it
just wanted to make sure
as you were using the delete keyword idk i was just thinking
in fact i got that from you anyway xd
anyone know why js is bad? https://img.thaun.dev/oxm34.png
haha
string
or not
but i assume
string
-idsshouldbestrings tag when
jk thats useless 
wait
no im bubble gum dum dum
yeah idk
ill test that
try it anyway
js
thats not gmail is it? i thought it was gmail for a sec lmao
yep that fixed it lol
see im not a bubble gum dum dum
I still get this error for my help command let owner = client.cache.get
lmao
Wtf
dude...7
client.cache.map
console.log(client.users)
client isn't a collection
wait
I know
I just want to see if client is also undefined
that would mean they copied some code
and maybe they have bot instead of client
Hello
I'm trying to implement a music feature to my bot, DirectX. Can anyone help me please?
Here's code:
That easy errors that when they don't get resolved gives me a headache lmao
So im using discord.js
Im working on a mute command
if im using settiemout how can I set the time to wait
and then remove the role
the timeout syntax is like this js setTimeout(function to execute, time to wait in millisconds)
but you're gonna have bigger problems than that
yeah
timeouts are stored in memory, which means they will be deleted when your bot restarts
if you mute someone, and then restart the bot, they will never be unmuted
you will need a database to store mute information
its generated by discord
lmao
yeah I won't be reading that either
when they said async function execute I really felt that
#inclue <iostream>
int main() {
int c = 0;
c++;
std::cout << c << std::endl; // 1
return 0;
}
I really felt that
I've made 2 bots but is there a way that one will output something to trigger the other bot?
yeah
your c++ is missing an ;
whitenames say "im having trouble, here's my code" like they didnt just copy it word for word off of someone's github or from an idiot guide's guide 
lmao
Imagine writing code like this
#include <stdio.h>
int main() {
int c = 0
;c++
;printf(c)
;return 0;
}
it works tho
int main()
{
//...
}```
Also IDEs like intellij format to () {
ha
I prefer ()
{
}
tho
no
it's like a standard for the C family
well okay
but like
you dont even wanna know...
just fucking use nim and then you get rid of {}
This is better. Period.
public void knowWhat() {
System.out.println("Time to move to off-topic guys!");
}
bc nim has python-like syntax
i like ruby syntax
This is personal preference stuff
emojicode is the prettiest language.
package main
func goIsntA(object ...interface{}, oriented string) (language string) {
return "yes, it isn't"
}
lmao
I think it is more readable than
$ruby.is_a?(Object) {|oriented| language}
that ruby line won a competition back in i think 2013
good for it
its valid syntax to get 'true'
lol
and displays how you can manipulate rubys 'blocks' ({})
I'll look more into ruby tho
i used to use it a bunch for rpg maker back in the day ๐
really nice to write with, but not so performant ๐ข
badge#2222
?
How do I use json to receive the ids of all the servers my bot is in?
Hey everyone
I've seen that alot of the discord bots on top.gg have a a server count that shows how many servers the bot is in
My bot shows "N/A" in the server count
How do I configure it?
You'll want to post that information to the dbl api
https://top.gg/api/docs


