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 model feature.

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.

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.

AuditLogEntry
AuditLogEntryId

An identifier for an audit log entry.

AuditLogs
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.

Change
ChannelCategory

A category of GuildChannels.

ChannelId

An identifier 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 fields and more. This was heavily inspired by slack's attachments.

EmbedAuthor

An author object in an embed.

EmbedField

A field object in an embed.

EmbedFooter

Footer information for an embed.

EmbedImage

An image object in an embed.

EmbedProvider

The provider of an embed.

EmbedThumbnail

The dimensions and URL of an embed thumbnail.

EmbedVideo

Video information for an embed.

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

A version of an emoji used only when solely the Id and name are known.

Game

Representation of a game that a [User] is playing -- or streaming in the case that a stream URL 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.

Guild

Information about a Discord guild, such as channels, emojis, etc.

GuildChannel

Represents a guild's text or voice channel. Some methods are available only for voice channels and some are only available for text channels.

GuildEmbed

Information relating to a guild's widget embed.

GuildId

An identifier for a Guild

GuildInfo

Basic information about a guild.

GuildPrune

Representation of the number of members that would be pruned by a guild prune operation.

GuildUnavailable

Data for an unavailable guild.

Incident

An incident retrieved from the Discord status page.

IncidentUpdate

An update to an incident from the Discord status page.

Integration

Various information about integrations.

IntegrationAccount

Integration account object.

IntegrationId

An identifier for an Integration

Invite

Information about an invite code.

InviteChannel

A inimal information about the channel an invite points to.

InviteGuild

A minimal amount of information about the guild an invite points to.

Maintenance

A Discord status maintenance message. This can be either for active maintenances or for scheduled maintenances.

Member

Information about a member of a guild.

Message

A representation of a message over a guild's text channel, a group, or a private channel.

MessageId

An identifier for a Message

MessageReaction

A representation of a reaction to a message.

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

Information detailing the current online status of a User.

PrivateChannel

A Direct Message text channel with another user.

Reaction

An emoji reaction to a message.

Ready

An initial set of information given after IDENTIFYing to the gateway.

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 Invite struct.

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

User

Information about a user.

UserId

An identifier for a User

VoiceRegion

Information about an available voice region.

VoiceState

A user'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 Webhook.

Enums

Action

Determines the action that was done on a target.

ActionChannel
ActionChannelOverwrite
ActionEmoji
ActionInvite
ActionMember
ActionRole
ActionWebhook
Channel

A container for any channel.

ChannelType

A representation of a type of channel.

DefaultAvatar

An enum that represents a default avatar.

Feature

A special feature, such as for VIP guilds, that a Guild has had granted to them.

GameType

The type of activity that is being performed when playing a game.

GuildContainer

A container for guilds.

GuildStatus
IncidentStatus

The type of status update during a service incident.

MessageType

Differentiates between regular and different types of system messages.

ModelError

An error returned from the model module.

NotificationLevel

Identifier for the notification level of a channel.

OnlineStatus

The representation of a user's status.

PermissionOverwriteType

The type of edit being made to a Channel's permissions.

ReactionType

The type of a Reaction sent.

Region

The name of a region that a voice server can be located in.

RoleIdParseError
RoleParseError
Target

Determines to what entity an action was used on.

UserIdParseError
UserParseError
VerificationLevel

The level to set as criteria prior to a user being able to send messages in a Guild.

Traits

BanOptions
Mentionable

Allows something - such as a channel or role - to be mentioned in a message.