discord-interactions

Message Models

class interactions.api.models.message.MessageType(value)

An enumerable object representing the types of messages.

..note::

While all of them are listed, not all of them would be used at this lib’s scope.

class interactions.api.models.message.MessageActivity(**kwargs)

A class object representing the activity state of a message.

Note

party_id is ambigious – Discord poorly documented this. :)

We assume it’s for game rich presence invites? i.e. : Phasmophobia, Call of Duty

Variables
  • type (int) – The message activity type.

  • party_id (typing.Optional[str]) – The party ID of the activity.

class interactions.api.models.message.MessageReference(**kwargs)

A class object representing the “referenced”/replied message.

Note

All of the class instances are optionals because a message can entirely never be referenced.

Variables
  • message_id (typing.Optional[int]) – The ID of the referenced message.

  • channel_id (typing.Optional[int]) – The channel ID of the referenced message.

  • guild_id (typing.Optional[int]) – The guild ID of the referenced message.

  • fail_if_not_exists (typing.Optional[bool]) – Whether the message reference exists.

class interactions.api.models.message.Attachment(**kwargs)

A class object representing an attachment in a message.

Note

height and width have values based off of content_type, which requires it to be a media file with viewabiltiy as a photo, animated photo, GIF and/or video.

Variables
  • id (int) – The ID of the attachment.

  • filename (str) – The name of the attachment file.

  • content_type (typing.Optional[str]) – The type of attachment file.

  • size (int) – The size of the attachment file.

  • url (str) – The CDN URL of the attachment file.

  • proxy_url (str) – The proxied/cached CDN URL of the attachment file.

  • height (typing.Optional[int]) – The height of the attachment file.

  • width (typing.Optional[int]) – The width of the attachment file.

class interactions.api.models.message.MessageInteraction(**kwargs)
class interactions.api.models.message.ChannelMention(**kwargs)
class interactions.api.models.message.Message(**kwargs)

The big Message model.

The purpose of this model is to be used as a base class, and is never needed to be used directly.

class interactions.api.models.message.Emoji(**kwargs)
class interactions.api.models.message.ReactionObject(**kwargs)
class interactions.api.models.message.PartialSticker(**kwargs)

Partial object for a Sticker.

class interactions.api.models.message.Sticker(**kwargs)

The full Sticker object.

class interactions.api.models.message.EmbedImageStruct(**kwargs)

This is the internal structure denoted for thumbnails, images or videos

class interactions.api.models.message.EmbedProvider(**kwargs)
class interactions.api.models.message.EmbedAuthor(**kwargs)
class interactions.api.models.message.EmbedFooter(**kwargs)
class interactions.api.models.message.EmbedField(**kwargs)
class interactions.api.models.message.Embed(**kwargs)