#thread

1 messages · Page 1 of 1 (latest)

drowsy sun
#

e

#

@summer fable @undone dew

undone dew
#

o_O

summer fable
#

ok

#

@undone dew

#

so how u write this code?

undone dew
#

O_o

summer fable
#

im a little comefused

#

idk if it detects it if u put in plain

#

java is way more comefusing then lua

undone dew
summer fable
#

ik i just wanna know if u can just put in plain

drowsy sun
#

lua is a easy leveled code for a reason

summer fable
#

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

undone dew
#

Well, if you understand computer science based logic now they you’ve used another language learning JS shouldn’t be all that difficult

drowsy sun
#

youll figure it out soon

summer fable
#

im on my secound day

undone dew
#

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)

drowsy sun
#

TS good script

undone dew
#

dpy was terrible to begin with

drowsy sun
#

C# better for anything windows related

undone dew
#

Aaaanyways this is getting off topic. What did you need again sorry 😅

drowsy sun
summer fable
#

ok so @undone dew i rewrote it so would this work?

            { name: '🙍‍♂️', value: `${!interaction.guild.author.user.bot}` },

undone dew
#

Well you can’t get the author of a guild hmmCat

summer fable
#

wait

#

im an idiot

undone dew
#

!interaction.user.bot

summer fable
#

i ment to put member

#

wait

#

is it member?

undone dew
#

The bot property is on a User. You can get a user off a member, but there’s no reason to here

summer fable
#

wait

undone dew
#

Well that would be your own logic doing that

summer fable
#

i ment to do member count?

#

iim comefusing my self

#

why am i doing this to my self

undone dew
#

As stated before you can use memberCount, but this won’t show who’s a bot or not

summer fable
#

do i count this as a win

#

and just add size?

undone dew
#

Considering idk what the code is or if that’s the actual member count, I have no idea

summer fable
#
            { name: '🙍‍♂️', value: `${(!interaction.guild.members.bot).size}` },

#

that would work ?

undone dew
#

You’ll need to fetch the members first as the members cache is unreliable

summer fable
#

ye i see ur point now

#

{ name: '🤖Bots', value: ${interaction.guild.members.cache.filter(!member.user.bot).size} },

undone dew
#

That logic also just won’t work because bot doesn’t exist on a member

summer fable
#

that would work?

#

it does?

undone dew
summer fable
#

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 >

undone dew
#

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

summer fable
#

bro

#

i dont know how to fetch the members

#

thats the problem

undone dew
#

interaction.guild.members.fetch() it returns a promise you need to resolve

summer fable
#

bro

#

i didint even know

#

.fetch()

#

was a thing

undone dew
#

The djs docs show everything on a class ;)

dusty jackalBOT
#

Documentation suggestion for @summer fable:
interface FetchMembersOptions
Options used to fetch multiple members from a guild.

summer fable
#

this would help correct?

undone dew
#

Well I mean those are the options for fetching, but they’re not required for this

summer fable
#

.

#

im ngl

undone dew
#

If you pass no params, it just fetched all the members for that guild

summer fable
#

im getting nowhere with this

#

so quick question

#

can i just subtract

#

the bots from all members?

#

and get my answer?

undone dew
#

Yup, but again… to get your true bot count you need to fetch the members so you can access the updated cache

summer fable
#

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

undone dew
#

Add another bot to your server and see if that number stays correct. Odds are it does not

summer fable
#

ok

undone dew
#

If it does, you’re already fetching the members somewhere else

summer fable
#

ummm

#

it

#

didint

#

well

#

fidint

#

fetch

#

but um

#

idk

#

ughhh

undone dew
#

… so let me guess it was incorrect like I said

summer fable
#

um

#

maybe

undone dew
#

If you fetch before that code, it’ll be up to date

summer fable
#

ok

#

if i put this into a var

interaction.guild.members.fetch()

then say it would it say the number

undone dew
undone dew
summer fable
#

bro

#

why this gotta be so hard sobuncontrollably

undone dew
#

Constantly saying bro achieves nothing dogeHaHa

summer fable
#

only said it 5 times crazy

undone dew
summer fable
#

bro

#

I WANNA LEARN

undone dew
#

And use that same logic as before

summer fable
#

i dont wanna just skid my whole bot

#

i wanna learn

#

u got anyvids of discordjs tuts?

undone dew
#

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

summer fable
#

im not gonna read

#

and then learn

#

thats not how my brain works

#

its to slow for that

#

ima fail to read it CryingThonk

undone dew
#

We don’t support any videos as they become out of date and don’t actually explain anything

summer fable
#

ima goto bed man

undone dew
#

You will learn very little if you only sim through old YouTube videos

summer fable
#

its 2:05

undone dew
#

Yikes

summer fable
#

am

undone dew
summer fable
#

its gonna take me ages

#

to read that

#

i can barley finish 1 chapter in 1 book

undone dew
#

Hence at your own pace. If you wish to learn, you have to commit to learning how to read documentation and guides

summer fable
#

bro

#

i dont even have quite at my house

#

i have 3 brothers

undone dew
#

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

summer fable
#

how long is the avreage bot take?

undone dew
#

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

steady valley
summer fable
#

AINT NO WAY THEY MADE A BOOK