Models¶
Models are classes that are received from Revolt API and are not meant to be created by the user of the library.
Danger
The classes listed below are not intended to be created by users and are also read-only.
For example, this means that you should not make your own mutiny.models.User
instances nor should you modify the mutiny.models.User
instance yourself.
If you want to get one of these model classes instances, you should do that by using
appropriate methods and attributes on the mutiny.Client
, Events, and Models.
User models¶
User¶
- final class mutiny.models.User[source]¶
Represents a user.
- avatar¶
The user’s avatar.
- Type
Optional[Attachment]
- relations¶
The user’s relations. This is only present for the client user.
- Type
Optional[dict[str, Relationship]]
- relationship_status¶
The client user’s relationship status with this user.
- Type
Optional[RelationshipStatus]
- profile¶
The user’s profile.
- Type
Optional[UserProfile]
- created_at¶
The resource’s creation time as an aware UTC datetime object.
- Type
BotInfo¶
Relationship¶
Status¶
UserProfile¶
Channels¶
Channel¶
- class mutiny.models.Channel[source]¶
Base class for all channel classes.
- type¶
The channel’s type.
Note
Checking using
type()
orisinstance()
should be preferred over using this attribute.
- created_at: datetime.datetime¶
The resource’s creation time as an aware UTC datetime object.
- Type
SavedMessagesChannel¶
- final class mutiny.models.SavedMessagesChannel[source]¶
Represent the ‘Saved Notes’ channel of a user.
- created_at: datetime.datetime¶
The resource’s creation time as an aware UTC datetime object.
- Type
DMChannel¶
- final class mutiny.models.DMChannel[source]¶
Represents a direct message (DM) channel.
- last_message_id¶
ID of the last message sent in this channel if any.
Note
This only includes non-system messages.
- Type
Optional[str]
- created_at: datetime.datetime¶
The resource’s creation time as an aware UTC datetime object.
- Type
GroupChannel¶
- final class mutiny.models.GroupChannel[source]¶
Represents a group channel.
- last_message_id¶
ID of the last message sent in this channel if any.
Note
This only includes non-system messages.
- Type
Optional[str]
- icon¶
The channel’s icon if provided.
- Type
Optional[Attachment]
- permissions¶
The permissions in this channel.
- Type
- created_at¶
The resource’s creation time as an aware UTC datetime object.
- Type
TextChannel¶
- final class mutiny.models.TextChannel[source]¶
Represents a server text channel.
- icon¶
The channel’s icon if provided.
- Type
Optional[Attachment]
- default_permissions¶
The default permissions in this channel.
- Type
- role_permissions¶
The mapping of role ID to its permissions in this channel.
- Type
- last_message_id¶
ID of the last message sent in this channel if any.
Note
This only includes non-system messages.
- Type
Optional[str]
- created_at¶
The resource’s creation time as an aware UTC datetime object.
- Type
VoiceChannel¶
- final class mutiny.models.VoiceChannel[source]¶
Represents a server voice channel.
- icon¶
The channel’s icon if provided.
- Type
Optional[Attachment]
- default_permissions¶
The default permissions in this channel.
- Type
- role_permissions¶
The mapping of role ID to its permissions in this channel.
- Type
- created_at¶
The resource’s creation time as an aware UTC datetime object.
- Type
Messages¶
Message¶
- final class mutiny.models.Message[source]¶
Represents a message.
- content¶
The contents of the message. This is a (potentially empty) string, or
None
if this is a system message.- Type
Optional[str]
- system_message¶
The data of a system message.
None
if this is not a system message.- Type
Optional[SystemMessage]
- attachments¶
The list of attachments the message has.
- Type
- edited_at¶
An aware UTC datetime object denoting the time the message was edited at, or
None
if the message was never edited.- Type
Optional[datetime.datetime]
- created_at¶
The resource’s creation time as an aware UTC datetime object.
- Type
ChannelDescriptionChangedSystemMessage¶
ChannelIconChangedSystemMessage¶
ChannelRenamedSystemMessage¶
SystemMessage¶
- class mutiny.models.SystemMessage[source]¶
Base class for all system message classes.
- type¶
The type of the system message.
Note
Checking using
type()
orisinstance()
should be preferred over using this attribute.- Type
TextSystemMessage¶
UserAddedSystemMessage¶
UserBannedSystemMessage¶
UserJoinedSystemMessage¶
UserKickedSystemMessage¶
UserLeftSystemMessage¶
UserRemovedSystemMessage¶
Server models¶
Server¶
- final class mutiny.models.Server[source]¶
Represents a server.
- system_message_channels¶
The server’s system message channels configuration.
- default_server_permissions¶
The default server permissions.
- Type
- default_channel_permissions¶
The default channel permissions in the server.
- Type
- icon¶
The server’s icon if provided.
- Type
Optional[Attachment]
- banner¶
The server’s banner if provided.
- Type
Optional[Attachment]
- created_at¶
The resource’s creation time as an aware UTC datetime object.
- Type
Category¶
- final class mutiny.models.Category[source]¶
Represents a server channel category.
- created_at: datetime.datetime¶
The resource’s creation time as an aware UTC datetime object.
- Type
Member¶
- final class mutiny.models.Member[source]¶
Represents a member in a server.
- avatar¶
The member’s server avatar.
- Type
Optional[Attachment]
- created_at¶
The resource’s creation time as an aware UTC datetime object.
- Type
Role¶
- final class mutiny.models.Role[source]¶
Represents a role in a server.
- server_permissions¶
The role’s server permissions.
- Type
- channel_permissions¶
The role’s channel permissions.
- Type
- rank¶
The role’s ranking. A role with a smaller number will have permissions over the roles with larger numbers.
- Type
- created_at¶
The resource’s creation time as an aware UTC datetime object.
- Type
SystemMessageChannels¶
Attachment models¶
Attachment¶
AttachmentMetadata¶
- class mutiny.models.AttachmentMetadata[source]¶
Base class for all attachment metadata classes.
- type¶
The type of the attachment.
Note
Checking using
type()
orisinstance()
should be preferred over using this attribute.- Type
AudioMetadata¶
FileMetadata¶
ImageMetadata¶
TextMetadata¶
VideoMetadata¶
Message embeds models¶
Embed¶
- class mutiny.models.Embed[source]¶
Base class for all embeds.
- type¶
The type of the embed.
Note
Checking using
type()
orisinstance()
should be preferred over using this attribute.- Type
NoneEmbed¶
WebsiteEmbed¶
- final class mutiny.models.WebsiteEmbed[source]¶
Represents a website embed.
- special¶
Special information about this website if provided.
- Type
Optional[EmbeddedSpecial]
- image¶
The website’s embedded image if provided.
- Type
Optional[EmbeddedImage]
- video¶
The website’s embedded video if provided.
- Type
Optional[EmbeddedVideo]
ImageEmbed¶
EmbeddedSpecial¶
- class mutiny.models.EmbeddedSpecial[source]¶
Base class for all embed special classes.
- type¶
The type of the embed special.
Note
Checking using
type()
orisinstance()
should be preferred over using this attribute.- Type