#thread
1 messages · Page 1 of 1 (latest)
o_O
O_o
im a little comefused
idk if it detects it if u put in plain
java is way more comefusing then lua
Write what code? Also just a reminder I’m not going to write all your code for you 
ik i just wanna know if u can just put in plain
lua is a easy leveled code for a reason
yes ik
ive been doing it for 3 years
so im to uses to it
i wish ive been using that time
for diffrent codes
im pissed off now
im gonna spend my next 1-3 years learning java
Well, if you understand computer science based logic now they you’ve used another language learning JS shouldn’t be all that difficult
youll figure it out soon
im on my secound day
Learn Java if you want to get into C based languages. If you’re interested in web dev I recommend JS and then TS (TypeScript)
dpy was terrible to begin with
C# better for anything windows related
Aaaanyways this is getting off topic. What did you need again sorry 😅
python is something taught in school tho so like... itd be more likely someone would know how todo that one than discord.js
ok so @undone dew i rewrote it so would this work?
{ name: '🙍♂️', value: `${!interaction.guild.author.user.bot}` },
Well you can’t get the author of a guild 
!interaction.user.bot
The bot property is on a User. You can get a user off a member, but there’s no reason to here
Well that would be your own logic doing that
As stated before you can use memberCount, but this won’t show who’s a bot or not
Considering idk what the code is or if that’s the actual member count, I have no idea
{ name: '🙍♂️', value: `${(!interaction.guild.members.bot).size}` },
that would work ?
You’ll need to fetch the members first as the members cache is unreliable
ye i see ur point now
{ name: '🤖Bots', value: ${interaction.guild.members.cache.filter(!member.user.bot).size} },
That logic also just won’t work because bot doesn’t exist on a member
Again, you’d need to actually fetch the members first
wait?
it feteched the members for the bot
listen
why does it error me
when i try to do this
{ name: ':robot:Bots', value: `${interaction.guild.members.cache.filter(member <= member.user.bot).size}` },
legit flipping ther >
Well yeah. That’s simple JS
But again, you’re going to run into issues once that member count updates, as the cache is not updated
You need to fetch the members beforehand so that the cache is updated
interaction.guild.members.fetch() it returns a promise you need to resolve
The djs docs show everything on a class ;)
Documentation suggestion for @summer fable:
FetchMembersOptions
Options used to fetch multiple members from a guild.
this would help correct?
Well I mean those are the options for fetching, but they’re not required for this
If you pass no params, it just fetched all the members for that guild
im getting nowhere with this
so quick question
can i just subtract
the bots from all members?
and get my answer?
Yup, but again… to get your true bot count you need to fetch the members so you can access the updated cache
bro
{ name: '🤖Bots', value: `${interaction.guild.members.cache.filter(member => member.user.bot).size}` },
that is the tru bot count
im tryna get true member count
Add another bot to your server and see if that number stays correct. Odds are it does not
ok
If it does, you’re already fetching the members somewhere else
… so let me guess it was incorrect like I said

ok
if i put this into a var
interaction.guild.members.fetch()
then say it would it say the number
The promise also returns the exact same value as guild.members.cache, you just need to await it
Well no, but it would return a collection of all members which you can use that original filter code you made to get the bot count
Constantly saying bro achieves nothing 
only said it 5 times 
Just run your old code, but instead of using interaction.guild.members.cache use (await interaction.guild.members.fetch())
And use that same logic as before
i dont wanna just skid my whole bot
i wanna learn
u got anyvids of discordjs tuts?
Awesome… The reason you need to do this as said before is that the members cache is not updated. By doing this you’re updating the cache. If you want to actually follow through how to use the DJS library, I suggest following the official guides
im not gonna read
and then learn
thats not how my brain works
its to slow for that
ima fail to read it 
We don’t support any videos as they become out of date and don’t actually explain anything
ima goto bed man
You will learn very little if you only sim through old YouTube videos
its 2:05
Yikes
am
I highly suggest just going through this at your own pace. It gives examples and explains everything you’ll need to start making bots
Hence at your own pace. If you wish to learn, you have to commit to learning how to read documentation and guides
And school work to do by the sounds of this conversation, but regardless. If you’re willing to learn and create bots, follow the guides. Falling back to people explaining things in these help channels and then proclaiming “I WANT TO LEARN” but refuse to look at the guides isn’t going to get you very far unfortunately
Happy to help if you need a hand with small things you don’t understand, but my responses are under the pretence you’ve at least got basic understanding of both JavaScript and the DJS library
how long is the avreage bot take?
Can’t really answer that as it depends on a variety of factors. Some can take minutes, some bots have been in continued development for years. Depends on the project you want to make and if you want to keep it up to date
lmao
AINT NO WAY THEY MADE A BOOK




