Skip to content

Objects


Attachment


attachment

AttachmentPart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.attachment.AttachmentPart[AttachmentPart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.attachment.AttachmentPart
                


              click scurrypy.api.messages.attachment.AttachmentPart href "" "scurrypy.api.messages.attachment.AttachmentPart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents an attachment.

path: RequiredPartField[str] = None class-attribute instance-attribute

Relative path to the file.

description: OptionalPartField[str] = None class-attribute instance-attribute

Description of the file.

is_spoiler: OptionalPartField[bool] = None class-attribute instance-attribute

Whether this attachment should be blurred.

id: RequiredPartField[int] = field(init=False, default=None) class-attribute instance-attribute

ID of the attachment (internally set).

Embed


embed

EmbedAuthorPart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.embed.EmbedAuthorPart[EmbedAuthorPart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.embed.EmbedAuthorPart
                


              click scurrypy.api.messages.embed.EmbedAuthorPart href "" "scurrypy.api.messages.embed.EmbedAuthorPart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents fields for creating an embed author.

name: RequiredPartField[str] = None class-attribute instance-attribute

Name of the author.

url: OptionalPartField[str] = None class-attribute instance-attribute

URL of the author. http or attachment:// scheme.

icon_url: OptionalPartField[str] = None class-attribute instance-attribute

URL of author's icon. http or attachment:// scheme.

EmbedThumbnailPart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.embed.EmbedThumbnailPart[EmbedThumbnailPart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.embed.EmbedThumbnailPart
                


              click scurrypy.api.messages.embed.EmbedThumbnailPart href "" "scurrypy.api.messages.embed.EmbedThumbnailPart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents fields for creating an embed thumbnail.

url: RequiredPartField[str] = None class-attribute instance-attribute

Thumbnail content. http or attachment:// scheme.

EmbedFieldPart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.embed.EmbedFieldPart[EmbedFieldPart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.embed.EmbedFieldPart
                


              click scurrypy.api.messages.embed.EmbedFieldPart href "" "scurrypy.api.messages.embed.EmbedFieldPart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents fields for creating an embed field.

name: RequiredPartField[str] = None class-attribute instance-attribute

Name of the field.

value: RequiredPartField[str] = None class-attribute instance-attribute

Value of the field.

inline: OptionalPartField[bool] = None class-attribute instance-attribute

Whether or not this field should display inline.

EmbedImagePart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.embed.EmbedImagePart[EmbedImagePart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.embed.EmbedImagePart
                


              click scurrypy.api.messages.embed.EmbedImagePart href "" "scurrypy.api.messages.embed.EmbedImagePart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents fields for creating an embed image.

url: RequiredPartField[str] = None class-attribute instance-attribute

Image content. http or attachment:// scheme.

EmbedFooterPart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.embed.EmbedFooterPart[EmbedFooterPart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.embed.EmbedFooterPart
                


              click scurrypy.api.messages.embed.EmbedFooterPart href "" "scurrypy.api.messages.embed.EmbedFooterPart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents fields for creating an embed footer.

text: RequiredPartField[str] = None class-attribute instance-attribute

Footer text.

icon_url: OptionalPartField[str] = None class-attribute instance-attribute

URL of the footer icon. http or attachment:// scheme.

EmbedPart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.embed.EmbedPart[EmbedPart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.embed.EmbedPart
                


              click scurrypy.api.messages.embed.EmbedPart href "" "scurrypy.api.messages.embed.EmbedPart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents fields for creating an embed.

title: OptionalPartField[str] = None class-attribute instance-attribute

This embed's title.

description: OptionalPartField[str] = None class-attribute instance-attribute

This embed's description.

timestamp: OptionalPartField[str] = None class-attribute instance-attribute

Timestamp of when the embed was sent.

color: OptionalPartField[int] = None class-attribute instance-attribute

Embed's accent color.

author: OptionalPartField[EmbedAuthorPart] = None class-attribute instance-attribute

Embed's author.

thumbnail: OptionalPartField[EmbedThumbnailPart] = None class-attribute instance-attribute

Embed's thumbnail attachment.

image: OptionalPartField[EmbedImagePart] = None class-attribute instance-attribute

Embed's image attachment.

fields: OptionalPartField[list[EmbedFieldPart]] = None class-attribute instance-attribute

List of embed's fields.

footer: OptionalPartField[EmbedFooterPart] = None class-attribute instance-attribute

Embed's footer.

set_user_author

Embed author builder.

Parameters:

set_timestamp

Embed timestamp builder. Adheres to ISO8601 format.

Parameters:

  • dt (datetime, default: None ) –

    datetime object

Message


message

MessageReferencePart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.message.MessageReferencePart[MessageReferencePart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.message.MessageReferencePart
                


              click scurrypy.api.messages.message.MessageReferencePart href "" "scurrypy.api.messages.message.MessageReferencePart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents fields for creating a message reference.

message_id: OptionalPartField[Snowflake] = None class-attribute instance-attribute

ID of the originating message.

channel_id: OptionalPartField[Snowflake] = None class-attribute instance-attribute

Channel ID of the originating message.

Note

Optional for default type, but REQUIRED for forwards.

type: OptionalPartField[MessageReferenceType] = None class-attribute instance-attribute

Type of reference. Discord defaults to MessageReferenceTypes.DEFAULT.

MessagePart dataclass

Bases: Part


              flowchart TD
              scurrypy.api.messages.message.MessagePart[MessagePart]
              scurrypy.core.part.Part[Part]

                              scurrypy.core.part.Part --> scurrypy.api.messages.message.MessagePart
                


              click scurrypy.api.messages.message.MessagePart href "" "scurrypy.api.messages.message.MessagePart"
              click scurrypy.core.part.Part href "" "scurrypy.core.part.Part"
            

Represents fields for creating a Discord message.

content: OptionalPartField[str] = None class-attribute instance-attribute

Message text content.

flags: MessageFlags = field(init=False, default=(MessageFlags.NO_FLAGS)) class-attribute instance-attribute

Message flags. Defaults to MessageFlags.NO_FLAGS.

See specific message creation endpoints for what flags can be set.

components: OptionalPartField[list[ContainerComponent]] = None class-attribute instance-attribute

Components to be attached to this message.

attachments: OptionalPartField[list[AttachmentPart]] = None class-attribute instance-attribute

Attachments to be attached to this message.

embeds: OptionalPartField[list[EmbedPart]] = None class-attribute instance-attribute

Embeds to be attached to this message.

message_reference: OptionalPartField[MessageReferencePart] = None class-attribute instance-attribute

Message reference if reply.

poll: OptionalPartField[PollPart] = None class-attribute instance-attribute

A poll!

files: list[str] | None property

Gather file paths and from attachments.

Raises:

Returns:

  • list[str] | None –

    list of file paths or None if no attachments were supplied

prepare_attachments