#Get member count

1 messages · Page 1 of 1 (latest)

swift sapphire
#

i want a welcome message that say total of member in the serve

unborn crest
#

-d disnake.Guild

wicked stormBOT
#

class disnake.Guild```
Represents a Discord guild.

This is referred to as a “server” in the official Discord UI.

x == y Checks if two guilds are equal.

x != y Checks if two guilds are not equal.

hash(x) Returns the guild’s hash.

str(x) Returns the guild’s name.
swift sapphire
#

i mean the member count

#

oh i saw it

#

does it need to , guild?

#

oh

#

disnake.Guild

unborn crest
#

on_member_join(member)

member.guild.member_count

swift sapphire
#

what wrong with self tho

unborn crest
#

self if you are in a class.

#

since you are.. just add self, but it's the same as what I said otherwise

#

-d disnake.on_member_join

wicked stormBOT
#

disnake.on_member_join(member)``````py

disnake.on_member_remove(member)```
Called when a [`Member`](https://docs.disnake.dev/page/api.html#disnake.Member "disnake.Member") leaves or joins a [`Guild`](https://docs.disnake.dev/page/api.html#disnake.Guild "disnake.Guild"). If [`on_member_remove()`](https://docs.disnake.dev/page/api.html#disnake.on_member_remove "disnake.on_member_remove") is being used then consider using [`on_raw_member_remove()`](https://docs.disnake.dev/page/api.html#disnake.on_raw_member_remove "disnake.on_raw_member_remove") which will be called regardless of the cache.

This requires [`Intents.members`](https://docs.disnake.dev/page/api.html#disnake.Intents.members "disnake.Intents.members") to be enabled.
swift sapphire
#

im make the join to say the member count

#

so member.self.member.count?

#

or member.guild.member_count
?

#

no respond lol

#

i guess is member.member_count

unborn crest
#

have you tried reading the docs I've linked?

#

or anything I've said?

swift sapphire
#

well yep

#

member.guild.member_count won't work

unborn crest
#

how is it not working?

swift sapphire
#

idk

unborn crest
#

Well.... is it giving an error?

swift sapphire
#

yep

#

error

unborn crest
#

LIke, you need help but you provide zero information

#

Then what is the error

swift sapphire
#

it only show the error when the member get join

#

i try the guild it said:on_member_join missing 1 requirement "guild"

#

so i try the self it index error

#

and the member say member not found

#

like this

unborn crest
#

because member doesn't have memebr count.

#

read the docs

swift sapphire
#

ik

#

i still try to find it

#

oh wait

#

ok

unborn crest
#

member.guild.member_count

swift sapphire
#

i will try the one you said second time

#

it WORKED

#

thx

#

</solve:0>