Module serenity::model
[−]
[src]
Mappings of objects received from the API, with optional helper methods for ease of use.
Models can optionally have additional helper methods compiled, by enabling
the methods
feature.
Methods like Message::delete
or Webhook::execute
are provided with
this feature, which can be shorthands for operations that are otherwise in
the Context
, or the much lower-level rest
module.
Reexports
pub use self::permissions::Permissions; |
Modules
event |
All the events this library handles. |
permissions |
A set of permissions for a role or user. These can be assigned directly to a role or as a channel's permission overrides. |
Structs
AffectedComponent |
A component that was affected during a service incident. This is pulled from the Discord status page. |
ApplicationInfo |
Information about a user's application. An application does not necessarily have an associated bot user. |
Attachment |
A file uploaded with a message. Not to be confused with embeds. |
Ban |
A representation of a banning of a user. |
BotApplication |
Information about an application with an application's bot user. |
BotGateway |
A representation of the data retrieved from the bot gateway endpoint. |
Call |
An active group or private call. These are different from voice channels in guilds. |
ChannelId |
An identifier for a Channel |
ChannelOverride |
An override for a channel. |
CurrentApplicationInfo |
Information about the current application and its owner. |
CurrentUser |
Information about the current user |
Embed |
Represents a rich embed which allows using richer markdown, multiple columns and more. This was heavily inspired by slack's attachments. |
EmbedAuthor |
An author object in an |
EmbedField |
A field object in an |
EmbedFooter |
Footer information about an |
EmbedImage |
An image object in an |
EmbedProvider |
The provider of an embed |
EmbedThumbnail |
The dimensions and URL of an embed thumbnail |
EmbedVideo |
A video information object in an |
Emoji |
Represents a custom guild emoji, which can either be created using the API, or via an integration. Emojis created using the API only work within the guild it was created in. |
EmojiId |
An identifier for an Emoji |
EmojiIdentifier |
Version of emoji struct used only when Id and name are known. |
FriendSourceFlags |
Flags about who may or may not add the current user as a friend. |
Game |
Represents a game that a a user is playing, or streaming in the case that a stream link is provided. |
Gateway |
A representation of the data retrieved from the gateway endpoint. |
Group |
A group channel, potentially including other users, separate from a |
Guild |
Live information about a Discord guild such as channels, emojis, etc. |
GuildChannel |
Represents a guild's voice or text channel. Some methods are available only for voice channels and some are only available for text channels. |
GuildEmbed |
Information relating to a guild's embed. |
GuildId |
An identifier for a Guild |
GuildInfo |
Basic information about a guild used for oauth. |
GuildPrune |
Representation of the number of members that would be pruned by a guild prune operation. |
Incident |
An incident retrieved from the Discord status page. This is not necessarily a representation of an ongoing incident. |
IncidentUpdate |
An update to an incident from the Discord status page. This will typically state what new information has been discovered about an incident. |
Integration |
Holds various information about integrations. |
IntegrationAccount |
Integration Account Object |
IntegrationId |
An identifier for an Integration |
Invite |
Information about an invite URL. Can't be accessed if you're banned. |
InviteChannel |
Minimal information about the channel an invite points to. |
InviteGuild |
A minimal amount of information about an invite's guild. |
Maintenance |
A Discord status maintenance message. This can be either for active maintenances or for scheduled maintenances. |
Member |
Represents information about a member of a guild. |
Message |
A representation of a message sent over a guild's text channel, a group, or a private channel. |
MessageId |
An identifier for a Message |
MessageReaction |
A representation of a |
PartialGuild |
Partial information about a guild. This does not include information like member data. |
PermissionOverwrite |
A channel-specific permission overwrite for a member or role. |
Presence |
A set of settings each member of a guild has. |
PrivateChannel |
A Direct Message text channel with another user. |
Reaction | |
ReadState |
Summary of messages since last login |
Ready |
An active group or private call. These are different from guild voice channels. |
Relationship |
Information about a relationship that a user has with another user. |
RichInvite |
Detailed information about an invite. This information can only be retrieved by anyone with the Manage Guild permission. Otherwise, a minimal amount of information can be retrieved via the |
Role |
Information about a role within a guild. A role represents a set of permissions, and can be attached to one or multiple users. A role has various miscellaneous configurations, such as being assigned a colour. Roles are unique per guild and do not cross over to other guilds in any way, and can have channel-specific permission overrides in addition to guild-level permissions. |
RoleId |
An identifier for a Role |
SuggestionReason |
A reason that a |
Tutorial |
The current user's progress through the Discord tutorial |
User |
Information about a user. |
UserConnection |
A user's connection. Note: This is not in any way related to a WebSocket connection. |
UserGuildSettings |
Settings about a guild in regards to notification configuration |
UserId |
An identifier for a User |
UserSettings |
User settings usually used to influence client behavior |
VoiceRegion |
Information about an available voice region. |
VoiceState |
A member's state within a voice channel |
Webhook |
A representation of a webhook, which is a low-effort way to post messages to channels. They do not necessarily require a bot user or authentication to use. |
WebhookId |
An identifier for a |
Enums
Channel |
A container for any channel. |
ChannelType |
A representation of a type of channel. |
ConnectionType |
The type of a user |
DefaultAvatar |
An enum that represents a default avatar. The default avatar is calculated via the result of |
Feature |
A special feature, such as for VIP guilds, that a |
GameType |
The type of activity that is being performed when playing a |
GuildContainer |
A container for guilds. |
IncidentStatus |
The type of status update during a service incident. |
MessageType |
Allows messages to be differentiated between regular ones and system ones like pins and clyde's responses. |
NotificationLevel |
Different level of notification levels such as mention-only, all messages, etc. |
OnlineStatus |
The representation of a user's status like online, idle, etc. |
PermissionOverwriteType |
The type of edit being made to a Channel's permissions. |
PossibleGuild |
A guild which may or may not currently be available. |
ReactionType |
The type of a |
Region |
The name of a region that a guild's voice server can be located in. |
RelationshipType |
The type of a relationship between two users. |
VerificationLevel |
The level to set as criteria prior to a user being able to send messages in a |
Traits
Mentionable |
Allows something - such as a channel or role - to be mentioned in a message. |