User
TheUser model represents any Discord account: a human user, a bot, or the account your selfbot is logged into. You receive User objects from gateway events such as READY, MESSAGE_CREATE, and relationship events.
Attributes
Properties
Guild
TheGuild model represents a Discord server. alterself populates guild objects from GUILD_CREATE events and caches them for the lifetime of the session.
Attributes
Properties
member_count reflects the count at the time the guild payload was received. It is not updated incrementally as members join or leave. Use GUILD_MEMBER_ADD and GUILD_MEMBER_REMOVE events to track live changes.Channel
TheChannel model represents any Discord channel: text, voice, category, thread, or DM. The kind attribute tells you which type you are dealing with.
Attributes
Properties
Subclasses
DMChannel
DMChannel extends Channel and is returned for private messages between you and another user.
GroupChannel
GroupChannel extends Channel and represents a group DM.
Message
TheMessage model represents a Discord message. You receive message objects primarily from MESSAGE_CREATE and MESSAGE_UPDATE gateway events, and from HTTP fetch methods.
Attributes
Properties
Member
TheMember model represents a user’s membership within a specific guild. It combines guild-specific metadata with a reference back to the underlying User object.
Attributes
Properties
Flake
Flake is alterself’s wrapper around a Discord snowflake ID. Every model’s id attribute is a Flake, not a plain integer, but Flake compares and hashes as an integer, so you can use it wherever an int is expected.
The real value of Flake is the structured data it exposes directly from the 64-bit snowflake value.
Flake objects are safe to use as dictionary keys and in sets. Two Flake objects with the same integer value are considered equal and produce the same hash.