#development
1 messages ยท Page 1057 of 1
if (command === `${prefix}caat`) {
const { catFile } = await fetch('https://aws.random.cat/meow').then(response => response.json());
message.channel.send(`${catFile}`);
}
```it is supposed to get an image from catFile then send it... any ideas why it does not work?
oopsss ๐
lol sorry
can i make something like i want to make the bot send either a or b but i want the chance to send a 75% and b 15%
math.random() <= 0.15
thank you so much
wait i did not get you
so will it be lke
math.random(b) <= 0.15
@slender thistle
if (random <= 0.15) a
else b
How long does it take?
3-4 Weeks
bruh
but its possible that it already aproach 5 weeks
it's going to start lowering
especially because of the intents update approaching
they're going to have to get more people on the team
is a lie?
wtf
?
grow past 100 servers, some intents if you may need them, upcoming updates (such as your bot having something to do with the little plus on the message bar; check the medium post), etc.
For a full list you should check the medium post
also the badge doesn't really mean anything
ah yes more dms
intends are not that bad.
I already use em in my bots
they're very useful
nvm I dont, oof
cutting out presence updates alone lowered resource usage by half for some
how come?
right.. caching
these are huge bots
my bot is at 200mb i think
115 guilds
receiving thousands of presence updates a second
that's kind of big
how to make this
im presuming you're using djs
https://i.alhassan.best/u/8DQKBAd7mP.png Something is definitely wrong..
i used to hold steady 150mb on 2.1k
sounds like typing start
5 weeks bruh
intents thankfully resolve the issue of events polluting resource usage
how i can do categories on my help command
@earnest phoenix if you use d.js its maybe worth looking into d,js-light
is what i want to solve
Wait so I'd have to recode my bot and remove all v12 functionality
no you keep the v12 syntax
Oh?
just not everything is cached
will it break anything in my bot
it will break everything that uses the cache if its disabled
but you can fetch it to cache it
if you want a better explanation ask tim he made the lib
Tim as in @quartz kindle ?
yes
ik
or use eris 
that would require a huge recode
totally different library
wtf is this
a discord server
nothing you should worry about
its not that different
lol
Welp
Guys anyone knows the cooldown command and the command that do so u cant kick urself
?
how can i make my bot edit the message it sent after 5 seconds (not instant)
how can i make my bot edit the message it sent after 5 seconds (not instant)
@hazy sparrow wait
wut?
@autumn aspen check if the mentioned user is = command author if yes return
and for cooldown look into the d.js guide
@hazy sparrow setTimeout
i didnt get you
msg.delete();
msg.channel.bulkDelete(args[0]).catch(e => { msg.channel.send("You can only delete 100 messages at once!")});
msg.channel.send(`Successfully deleted \`${args[0]} messages\`!`).then(m => m.delete({ timeout: 5000 }));
@hazy sparrow
@hazy sparrow https://nodejs.org/api/timers.html
thats the end
ty
guys anyone know how I can check what is eating up the most ram?
msg.channel.bulkDelete(args[0]).catch(e => { msg.channel.send("You can only delete 100 messages at once!")});
msg.channel.send(`Successfully deleted \`${args[0]} messages\`!`).then(m => m.delete({ timeout: 5000 }));
}```
use htop if you use linux
guys anyone know how I can check what is eating up the most ram?
@earnest phoenix yep
how
use htop if you use linux
@lusty quest Whats the command for not kicking or baning ur self
I lost it lmao
@autumn aspen Do you know how to do it or not?
@autumn aspen check if the mentioned user is = command author if yes return
guys anyone know how I can check what is eating up the most ram?
@earnest phoenix use htop if you use linux
ohh
im not sure if you can see every command but you can check the process itself
enmap is the problem
How do u know..?
i used it before i switched to Mysql
after i switched to mysql the Ram usage droped by 1GB
maybe there is a way to lower the impact on the system but idk
a
b
maybe it's a memory leak
Not sure to be honest
enmap caches the DB into the ram
ik
and for some reason eats ram like crazy
is there an easy way to convert the sqlite db to sql
sqlite uses SQL so it should be easy
Suggestion for adding regional indicators as reactions with discord.net? ๐จ for example isnt an emoji, not sure how to add using the :name:
https://stackoverflow.com/questions/18671/quick-easy-way-to-migrate-sqlite3-to-mysql maybe you see something that is usefull
enmap's storing way is so bad
its better than json db
is there any free mysql hosts?
there is a free mongodb host
jesus christ i get told to use a different kind of database every fking time i ask
@obtuse jolt How much data will you be storing?
Is it a public bot or private bot etc
public
How many servers?
10
How much you storing per server?
i think its 10 entries per server
Do you run a local test sql server for any projects?
Where you hosting the bot?
For now, you could set a sql server up on aws and then move it over further down the line
What I usually do for smaller projects
sqlite is even easier if you just need to test something
^
?
Get a free vm on aws, first year is free. Set a sql server up yourself
you need a credit card for this and not everyone got one
is enmap really that bad lmao
hosting on raspberry pi is a good idea?
Its 2020
@hazy sparrow check DM
well i switched from enmap to Mysql and dropped 1GB in ram usage. there where no other changes on the code
i made an aws account is sucked
mongodb atlas
@lusty quest Man u rlly need to help me out! I cant find the mute and warn command anywhere for my versuin
version
@earnest phoenix sure if you have the internet connection
i had to move
You cant really be picky when you have ยฃ0..
my listed bot on top.gg wont start on my PC bcs my internet is to slow
@lusty quest Dude is it gonna be something in thos brackets?if (message.mentions.users.first() === message.author) return;
^^^
Is it something in the brackets u need?
my sqlite db uses next to nothing of ram lul
Tim
if you know how to optimize it it can be pretty efficent
Superbrain8?
but most users that start with them have probably 0 knowledge how to optimize it
if you need a warn command get a idea yourself how it should work and what data to store, its the same stuff i would have to do to get it together
but most users that start with them have probably 0 knowledge how to optimize it
@lusty quest but is it smth in the brackets?
Oh ok
why tf did you quote random stuff and then ask stuff that doesnt relate to it?
Nvm I fixed it
๐คจ
?
idk i dont use Atlas
oof
i have my own Cluster
but i guess they wont expect that someone uses the free DB for a production system
hopefully it will still work
it will work. its just limited in space (512mb)
Guys is it "Banned" or "Baned"?
2xn
banned
HELP
Help with...
what did you expect it to do?
temp voice channel
What you trying to do, what happened, what didnt happen
and what is the problem
sleep
it should create temp voice chat and when u leave it delete it
@restive pebble
i need u rn
and there goes the next random mention
wut u making
why pinged
so you want to create a voice channel if someone enters a voice channel?
true
and where does it stuck?
no error
So they join main voice channel, it creates a channel. Then when they leave, it deletes it?
and it dont do any thing
@lusty quest it dont stuck there is no error and nothing happens
i guess learn how to debug your code.
i would add console.logs for seeing if a part of the code executes
.setImage
thx
Try both
uhh
lmao
Guys what is the cooldown command
for a message
I want it to be like 5sec
If someone can DM me it I will buy u a coockie
aka how to be spoonfed 101
lmao
discord.js guide has instructions for this
Noshit Im there now and poop my pants off
Im not sure how to get ๐ฆ , ๐ง , ๐จ or ๐ฉ as theyre technically not emojis... Any suggestions?
IEmote[] reactions = {
new Discord.Emoji("๐
ฐ๏ธ"),
new Discord.Emoji("๐
ฑ๏ธ"),
new Discord.Emoji("C"),
new Discord.Emoji("D"),
new Discord.Emoji("โ"),
};
guys, silly question...must i use this bot with coding?
Nevermind, looking at this wrong... need to pass them as emote not emoji
@balmy raptor to create your own, yes
you could use something like Discord Bot Maker but this is verry limited
is there other way? i dont have knowledge towards coding tho
Can someone explain the discord verification process a bit detailed?
You can make your bot with a program like Discord Bot Maker, but it's limited compared to what you can make if you learn a programming language and write it from scratch.
@earnest phoenix this may be helpful: https://support.discord.com/hc/en-us/articles/360040720412-Bot-Verification-and-Data-Whitelisting
oh damn..
aaa
Im not sure how to get ๐ฆ , ๐ง , ๐จ or ๐ฉ as theyre technically not emojis... Any suggestions?
IEmote[] reactions = { new Discord.Emoji("๐ ฐ๏ธ"), new Discord.Emoji("๐ ฑ๏ธ"), new Discord.Emoji("C"), new Discord.Emoji("D"), new Discord.Emoji("โ"), };
@flat goblet Dude u cant use custom emojis
U must use the discord ones
or u need to have a special command for that
Alsoo what u tryna do??
Anyone knows a cooldown command for discord.js
Did I not already explain it to you a few days ago?
Did I not already explain it to you a few days ago?
@sudden geyser I forgot, what?
@sudden geyser now what was complicated can u help me thru this please?
Im doing the command now in the command I want
now aight?
do you know what a JavaScript map object is
how long does it take for a bot to get approval?
3-4 weeks
do you know what a JavaScript map object is
@sudden geyser Nope lol, also its wronf
g
@sudden geyser can I check the docs?
You can find info about JS maps here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map. If you don't know what something in that example means, you can probably look it up and find the answer online. If you're having a hard time understanding it, try starting simple and work your way up.
how does one get a verified developer badge???
-verifybot @torpid edge
@torpid edge
Hi! It seems like you are looking for information on how to get your bot verified.
Once your bot reaches 75 servers or more, you are eligible for bot verification. On October 7, 2020, bots with 100 servers or more that are not verified will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.
If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.
We cannot provide support on how to get your bot verified.

process.on('unhandledRejection', (error) => { console.log(error) });
```why this dont work?
Idk
E.E
For wuttrrr
You won't always find templates for Discord bot commands
Hence you'll have to code it yourself
@autumn aspen You can use custom ones, and I found my issue anyway... just need to use \๐ฆ
Hold you have to code it yourself.
People aren't going to throw the answer in your face always.
what does this mean? https://cdn.vurighosting.com/u/DRjrIL.png
lol. why does MongoDB gives you issues for that?
what does it even mean
In computing, a symbolic link (also symlink or soft link) is a term for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.Symbolic links were already present by 1978 in minicomputer ...
but why does it error out while to many of them exist?
idk
most are paid
you could get a 5$ Digitalocean Droplet with MongoDB installed. then just install your enviroment and you are ready to go
guys
message.channel.replacePermissionOverwrites what is the new function?
@lusty quest are u here?
Docs exist
check the body
@cobalt spruce
Why cant read property 0
Can you send a ss instead?
Also it means that body.countrydata is undefined
but it worked 10-25 minuted ago?
Rate limited?
I suggest using https://disease.sh
Also,why are you using replace?
idk
I suggest using https://disease.sh
@golden condor problem isnt api
It is
hm lets try it
hey uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
client.guilds.forEach
HOW DOES IT WORK
what?
(v11 btw)
it works by iterating over each guild and running a function you pass it.
Guys this is message.author what is the persons id then?
but how? @sudden geyser
Because i want to log every guild's id & name
message.author.id :D?
@earnest phoenix if its a bot?
@autumn aspen message.author.id
no nvm
You pass it a function. So, you pass it a function to console.log each one of them. The first argument is a Guild instance.
thx
Same
@surreal sage discord.js v11 or v12?
v11 will stop working soon
I know
wait WHAT
unless people update it themselves
@quartz kindle i am gonna yes
i am using v11
look into migrating haxer
You are allowed to re-publish on npm with a modifation
Same
@earnest phoenix is it message.author.id(ID)
Bc I want, if u mention the bot that u use its says "U cant kick the bot u are using!"
anyway, do you know how a forEach works?
No
the normal array.forEach method?
is it message.author.id(ID)
Bc I want, if u mention the bot that u use its says "U cant kick the bot u are using!"
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
@quartz kindle thanks lol xD
Just try
Aight
if v11 stops do my bot will stop working?
yes
;-;
Look into this guide: https://discordjs.guide/additional-info/changes-in-v12.html
idk how to upgrade v11 to v12
Discord.RichEmbed = Discord.MessageEmbed guys, i have 200IQ
big brain
@quartz kindle so in case for client.guilds > client.guilds.forEach(guild => console.log(guild.id))
big brain
@sudden geyser but its working,lol
lazy!
@quartz kindle so in case for client.guilds >
client.guilds.forEach(guild => console.log(guild.id))
@surreal sage works, thanks!
uninstall V11 before this
command
lmao
Discord.RichEmbed = Discord.MessageEmbedguys, i have 200IQ
@earnest phoenix What is that?
if (message.mentions.users.first() === '731927983274721301') this is not working?
why
if (message.mentions.users.first() === '731927983274721301') return msg.channel.send(":x: **You can't kick me!** :x:"); whole command
Its for a bot
u use like u cant kick the bot ur using
the message.mentions.users returns a user object
bots canโt kick themselves tho
I want it to, if u mention the bot u using its says You can't kick me!
Yes
but I want a special one for it
you need to do .first().id in order to get the id of the user
Like where u put the bots id?
what
you put it in the if statement?
if (message.mentions.users.first.id() === ) return msg.channel.send(":x: **You can't kick me!** :x:");
like this?

@sinful belfry
lol
lol
oh
and also
you have done users.first.id()
i forgot the path, but i believe client has a me property that can be accessed
its a comparison
oh
it must be compared to something
yes yes
if (me === meh)
if (message.mentions.users.first.id() === ) return msg.channel.send(":x: **You can't kick me!** :x:"); What can I use now?
Or change
you have done
users.first.id()
.first()is a method, and theidis simply a property
Yes
^
but whats the right command?
smh
Bc Im lost
no
1 === 2 makes sense
1 === doesn't
you need to compare it
w8
^^
do you know how an if statement works? you need to assess 2 values to check if they're equal
if is a basic operation in JS
hey @quartz kindle remember when you told me I'd regret using json? yeah well i am rn
im clueless as how you've gone thru this far without knowing comparators
lmao
An if statements is there for you to check a condition and do stuff if that condition has been fullfilled
basic js stuff
that you should know
if i give you any more help i'll just be spoonfeeding
same
i told you whats wrong, WHY its wrong, and given you what you should use to be comparing
imagine not using canary
in my bot i added a feature in when u type a specific message u can become a member
now is there a way u can use carlbot or mee6 to delete those messages everytime someone types that specific message?
if (message.mentions.users.first() === bot.me.id) return msg.channel.send(":x: **You can't kick me!** :x:");
@opal plank
Like this?
there we go
why not make your bot delete it
aight
oh
in my bot i added a feature in when u type a specific message u can become a member
now is there a way u can use carlbot or mee6 to delete those messages everytime someone types that specific message?
@torpid edge why do you need mee6 to do that
or maybe he means how he would do all that stuff with mee6 and he is not talking about his own bot
so I put the id where?
cuz in that case
in the first
message = message
message.mentions = mentions in this message
message.mentions.users = users mentioned in this message
message.mentions.users.first() = first user mentioned in this message
message.mentions.users.first().id = id of the first user mentioned in this message
yes
^^
oh
bet he just waited for u to post the code
its like a folder, you going deeper and deeper seeing whats inside
so I put the ID in the brackets?
internal rage
no, first() is a method
i completely understand Link's rage
go read https://discordjs.guide
and then come back
Tim literally gave you what you needed PLUS how to easily understand
and don't even think of skipping a part in that
or copy pasting
or we are back here again
wrong guide Link
k
Hold, weren't you told multiple times to get to basics of JS?
Refer to Tim's message
@opal plank it does show guides for other guides about js so
@marble juniper https://www.w3schools.com/js/
indeed
does it matter?
the basics first
Learn js first, then learn npm and nodejs
well lets hope he just doesn't copy paste the answers
you dont need expertize, but you need to learn the basics
bot making is an intermediate level project
npm is the package manager for node, so yes you need to know how it works
you dont need expertize, but you need to learn the basics
@opal plank I learned the basics as I went
at least know some stuff before you start without any knowledge at all
you trying to write a russian essay without knowing russian
?
i mean
I knew a bit of code before
its like trying to climb a wall without knowing how to climb it
you can probably write a russian essay with blyat and cyka everywhere and be done with it
jk
^^
blyat blyat cyka blyat cyka cyka wide putin
graded 100%
forgot to end the sentence with Putin @misty sigil
Translation: fuck fuck bitch fuck bitch bitch
Is it possible to get url of every emoji even if the bot doesn't have access to the emoji?
no
if you have id, yes
i do that
its on the cdn
if you have id, you can fetch emoji
so you could get it
@opal plank <I don't think you can fetch an emoji>
@earnest phoenix if you have id, you can
if you are using node-fetch, you can
Wait lemme check something
so you could get it
@vestal starif (message.mentions.users.first() === bot.me.id) return msg.channel.send(":x: **You can't kick me!** :x:");literally where do I pit the id lol
lmao
I did everything right
@earnest phoenix
@autumn aspen
how can someone be so stubborn
@opal plank i see, not fetching, just getting it from the url
Who uses discord.js lmao
Who uses discord.js lmao
@vestal star mw
@vestal star a lot of people
@earnest phoenix indeed, if you have id, you can fetch it at that url, just replace id
Yea nice
And for the love of God, you have been pushing your luck with the help vampirism. If you keep ignoring any offers to learn the basics, I'll have to mute you.
remember that extensions matter
Discord.js is wayy too easy, so i use eris
Thanks
@earnest phoenix indeed, if you have id, you can fetch it at that url, just replace id
@opal plank lmao finally please'
thanks
wot?
And for the love of God, you have been pushing your luck with the help vampirism. If you keep ignoring any offers to learn the basics, I'll have to mute you.
@slender thistle you truly are saving my nerves ngl
i second this
Aight time to make a proxy scraper ๐
Meh, help vampirism isn't often
< crawlers
Easier to warn manually
fair enough
@opal plank what?
i prefer crawlers
It's a crawler/scraper, almost same thing
what are you gonna scrap
if (message.mentions.users.first().'731927983274721301') still not working
LOL
LOL
@quartz kindle Im lost
@autumn aspen you dont need to put your literal id anywhere
we have given you the awsner
They are similar
did he just try to add a string to that
he did
can I puke
@autumn aspen discord.js is object oriented, which means everything is accessible via linking objects and properties, ie: getting something from something else from something else from something else
right ahead
everything is linked together
ok gimme a minute then im back once I recovered from this
if (this === that) do this
Read as, If THIS EQUAL TYPE that, do this
if you literally type .id it means "get the id from this"
Yes
YESSSSSS YOU FINALLY GOT IT
oh ok
we gotta celebrate this
read it backwards
so message.mentions.users.first().id means "get the id, from the first, from users, from mentions from message". or, "get the id of the first user mentioned in a message"
its easy
IF (the id, of the FIRST MENTION from, MENTIONS, from the MESSAGE) do this
you arent comparing it to anything
without a comparison it'll just check if that exists
message (message object the user sent)
.mentions (the mentions from the message)
.users (the users that got mentioned)
.first() (the first user that got mentioned)
.id (the id of the first user that has been mentioned)
easy to understand
ngl
for checking if it exists, yes

yes

but should I replace it with the bot id

do you know what "comparison" means?
BRO JUST TELL I DONT GET IT

read carefully what i sent
do you know how to compare 2 items?
Yes ===
Thin ice
a === b
this is a comparison. it compares a and b, and checks if they are equal
in other words, it means a EQUALS b
save me for the love of god and my mentality and soul
so you just need to do the same thing
if(this) check if it exists
if( 1 > 2) checks if 1 is bigger than 2
if(0 == 0) checks if 0 equals to 0
Leave this channel if you're not willing to help.
Leave this channel if you're not willing to help.
@slender thistle me??
Anyone who keeps on complaining.
in your case, message.mentions.users.first().id is like the a in my comparison example
read the rules
you just need to add the rest of the comparison
Oh ok
if (a === b) //Check if a is the same as b and if the types are the same
No minimodding here. You kept breaking the rules for the past days if not a week already.
oh hell yeah this sounds fun https://cdn.vurighosting.com/u/gjV4IH.png
its not about being noob or not, its the fact that 3 people are explaining the same thing for the past 18 minutes with the same basic thing
in your case,
message.mentions.users.first().idis like theain my comparison example
@quartz kindle ohhh and the b is??
if (a == b) //check if a is the same as b but not if they are the same types
what do you want to compare it to?
the bot
well you want to compare the id with the bots id
https://www.w3schools.com/jsref/jsref_operators.asp @autumn aspen
yes
so thats your b
so b is the bots id
How do I create channel overwrites that only allows the author to speak in the channel?
try it >>
an id is a string
Any
it doesn't matter
strings can be done in any of the three forms
" or ' is the same
` is used for template literals
Multiple people explaining at once wasn't the best idea in the end
agreed
How do I create a channel that denies everyone else permission to talk
Thanks @quartz kindle!
what library
djs light
let tChannel = await msg.guild.channels.create(`${msg.author.id}-ticket`, {
type: 'voice',
permissionOverwrites: [
{
id: msg.author.id,
allow: [
'SEND_MESSAGES',
'VIEW_CHANNEL'
]
}
]
})
got this so far
the everyone role has the same ID as the guild
So you could set the ID as the guild id, deny as an array with SEND_MESSAGES, and the type as role to refer to the role.
but that would deny the author too
@pure lion do you have permissions enabled in the client options
just to be sure
lol
You already overwrote the author to have permission.
no that was fine
as I assume the library you're using is very close to regular discord.js, you should be able to structure it as this: https://discord.js.org/#/docs/main/stable/typedef/OverwriteData
Tem br
wait i got it
hey
my muted role overrides overwrite all of my perms, should i use updatePermissions instead of overwritePermissions?
theres something similar
language I mean
d.js
oh its updateOverride
yeah was just gonna say x))))
can i use multiple for it, do i just , or do i use an array
You gotta
updateOverwrite(user, { PERMISSION_NAME: Boolean }
)
Note, the permission name is not a string
user can be a role ID yes?
yes
commas
thought that yea
https://i.callumdev.pw/4igns.png
why does the role not get administrator permission?
it could be because the bot doesn't have admin perm
The fuck
oh
wait what
Yeah
what did i even read
i wasnt aware of that
How do I close an awaitMessages collector when a message is sent
give it max:1
Alright
or collector.stop once the requirement is met
wait rlly?
its like doing ```js
return new Promise(resolve => {
collector = createMessageCollector()
collector.on("end", resolve)
})
Can I filter for 2 message contents using an or in the filter definition?
E.g bot says "send 1 for bla and 2 for bla"
a filter is a function so yes
I just got some chips and was hoping to watch some people get helped here so I can learn turns out no one needs help ๐ฆ
Tim isn't it doing collector = new createMessageCollector() as .on is a method right? Making collector a class
usually when im bored i browse on
good practice to skim thru the docs
even if you arent using something
.on is just listening to an event emitted by the colector you are creating(message)
well
messageCollector is a class
but channel.createMessageCollector does it for you
oh
and the .on doesnt have anything to do with classes per se
oh
it just means that said class is an event emitter
and most likely extends the native event emitter
oh ok
Hey Tim
I wanted to ask you; if I convert to djs-lite will my bot work fine or do i need to change some stuff
rule of thumb is, everywhere that you use .cache.something, that isnt guilds, will need to be reworked
yikes
.cache.get can usually be replaced with .fetch()
whats the catch with djs lite?
.cache.find/filter most likely wont work out of the box
the catch is less caching, so more requests
you can re-enable certain caches if you need them, but it will increase memory usage
oh ok
the goal is less memory usage (wayyy less) in exchange for losing some features
when we fetch does it get added to cache
the current version on npm is v2, so you need to switch to the v2 branch
depends
if you use it correctly, no
im using better-sqlite3 myself
im using it through enmap
then possibly yes
according to superbrain, his experience with enmap was pretty terrible
of enmap or better-sqlite3?
enmap
well, depends on your use case i guess
It's guildSettings
but better-sqlite3 gives you direct control over everything, so if anything goes wrong its your fault
enmap doesnt
My issue is there is no way I can see what is using how much ram
well, you can probably get an estimate if you stringify your objects
let me check something
do you have an eval command?
yep
try evaling db.export.length
1.5 GB for 115 guilds? That's insane
You must have a memory leak somewhere
so enmap not the issue
23984
so at 1 byte per character, thats basically 24kb
even if you make it 4 bytes per character, plus object and enmap overhead, i doubt the entire db will use more than 100-200kb
Im suspecting voice has something to do with it
Anyway to check?
are you using dicord.js's built in voice streaming and stuff?
with ytdl or something?
Yep
should i add anything else to this?
eval process.memoryUsage()
What gave it away
external
600mb on external memory
which means buffers and streams and other non-primitive data
audio uses those
your actual discord.js is only using 285mb
So that's good for my guild count yea?
its average
depends on the point of view
if you want to compare with djs-light
3700 guilds ^
I cant on production
how do i fetch user again
Tim is amazing
i forgot 
client.users.fetch()
ty
np
ok i have myJSON and in myJSON the data is json [{"user":"YxriDev#3160","userid":2147483647,"channelid":2147483647,"messageid":2147483647,"type":"url","input":"connection.co","isautoscan":1,"priority":0,"scanid":"q6Zd8H"}]
but when i do myJSON.user is say undefined, how do i read the data inside of myJSON?
its an array
how to do i do it with an array?
just do array[0]
arraโข๏ธ
array[0].object
No
myJSON[0]
weird..
show code
connection.query('SELECT * FROM automatedScans WHERE scanid = "q6Zd8H"', function (error, results, fields) {
// When done with the connection, release it.
connection.end(function(err) {if(err) console.log(err)});
// Handle error after the release.
if (error) throw error;
var myJSON = JSON.stringify(results);
console.log(myJSON)
// Don't use the connection here, it has been returned to the pool.
});```
you're stringifying it
results is already an array, by stringiying it it isnt an array anymore
im not good with this
how do i mention someone in an embed?
results[0].user
I didn't want in field names
You can but it wont reach the user
JSON.stringify is to convert data to string, so the data becomes readable, but not workable
JSON.parse is to convert string to data, so the data become workable, but not necessarily readable
I wanted in a field, and not reaching the users
ye does that all the time
Okay then you can simply put the user's object
wait really?
much appreciated @quartz kindle
in your case, results is already workable data, if you stringify it, it becomes non workable, its just a string
yep
or you can do <@${user.id}>
@earnest phoenix How long do I have to wait?
for what
verifed?
discord verified or top.gg verified
3+ weeks
they're both about a month aren't they tho
yea
oww




