Skip to content

hikari.events.member_events#

Events concerning manipulation of members within guilds.

MemberCreateEvent #

Bases: MemberEvent

Event that is fired when a member joins a guild.

app property #

app: RESTAware

App instance for this application.

guild_id property #

guild_id: Snowflake

ID of the guild that this event relates to.

member class-attribute instance-attribute #

member: Member = field()

Member object for the member that joined the guild.

shard class-attribute instance-attribute #

shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})

Shard that received this event.

user property #

user: User

User object for the member this event concerns.

user_id property #

user_id: Snowflake

ID of the user that this event concerns.

bitmask classmethod #

bitmask() -> int

Bitmask for this event.

dispatches classmethod #

dispatches() -> Sequence[Type[Event]]

Sequence of the event classes this event is dispatched as.

get_guild #

get_guild() -> Optional[GatewayGuild]

Get the cached view of the guild this member event occurred in.

If the guild itself is not cached, this will return None.

RETURNS DESCRIPTION
Optional[GatewayGuild]

The guild that this event occurred in, if known, else None.

MemberDeleteEvent #

Bases: MemberEvent

Event fired when a member is kicked from or leaves a guild.

app property #

app: RESTAware

App instance for this application.

guild_id class-attribute instance-attribute #

guild_id: Snowflake = field()

ID of the guild that this event relates to.

old_member class-attribute instance-attribute #

old_member: Optional[Member] = field()

The old member object.

This will be None if the member was missing from the cache.

shard class-attribute instance-attribute #

shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})

Shard that received this event.

user class-attribute instance-attribute #

user: User = field()

User object for the member this event concerns.

user_id property #

user_id: Snowflake

ID of the user that this event concerns.

bitmask classmethod #

bitmask() -> int

Bitmask for this event.

dispatches classmethod #

dispatches() -> Sequence[Type[Event]]

Sequence of the event classes this event is dispatched as.

get_guild #

get_guild() -> Optional[GatewayGuild]

Get the cached view of the guild this member event occurred in.

If the guild itself is not cached, this will return None.

RETURNS DESCRIPTION
Optional[GatewayGuild]

The guild that this event occurred in, if known, else None.

MemberEvent #

Bases: ShardEvent, ABC

Event base for any events that concern guild members.

app property #

app: RESTAware

App instance for this application.

guild_id abstractmethod property #

guild_id: Snowflake

ID of the guild that this event relates to.

shard abstractmethod property #

shard: GatewayShard

Shard that received this event.

user abstractmethod property #

user: User

User object for the member this event concerns.

user_id property #

user_id: Snowflake

ID of the user that this event concerns.

bitmask classmethod #

bitmask() -> int

Bitmask for this event.

dispatches classmethod #

dispatches() -> Sequence[Type[Event]]

Sequence of the event classes this event is dispatched as.

get_guild #

get_guild() -> Optional[GatewayGuild]

Get the cached view of the guild this member event occurred in.

If the guild itself is not cached, this will return None.

RETURNS DESCRIPTION
Optional[GatewayGuild]

The guild that this event occurred in, if known, else None.

MemberUpdateEvent #

Bases: MemberEvent

Event that is fired when a member is updated in a guild.

This may occur if roles are amended, or if the nickname is changed.

app property #

app: RESTAware

App instance for this application.

guild_id property #

guild_id: Snowflake

ID of the guild that this event relates to.

member class-attribute instance-attribute #

member: Member = field()

Member object for the member that was updated.

old_member class-attribute instance-attribute #

old_member: Optional[Member] = field()

The old member object.

This will be None if the member missing from the cache.

shard class-attribute instance-attribute #

shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})

Shard that received this event.

user property #

user: User

User object for the member this event concerns.

user_id property #

user_id: Snowflake

ID of the user that this event concerns.

bitmask classmethod #

bitmask() -> int

Bitmask for this event.

dispatches classmethod #

dispatches() -> Sequence[Type[Event]]

Sequence of the event classes this event is dispatched as.

get_guild #

get_guild() -> Optional[GatewayGuild]

Get the cached view of the guild this member event occurred in.

If the guild itself is not cached, this will return None.

RETURNS DESCRIPTION
Optional[GatewayGuild]

The guild that this event occurred in, if known, else None.