Objects¶
invite
¶
InviteModel
dataclass
¶
Bases: DataModel
flowchart TD
scurrypy.api.invite.InviteModel[InviteModel]
scurrypy.core.model.DataModel[DataModel]
scurrypy.core.model.DataModel --> scurrypy.api.invite.InviteModel
click scurrypy.api.invite.InviteModel href "" "scurrypy.api.invite.InviteModel"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents a code that adds a user to guild or group DM channel.
type: InviteType
instance-attribute
¶
Type of invite.
code: str
instance-attribute
¶
Invite code (unique ID).
guild: GuildModel | None
instance-attribute
¶
Guild the invite is for.
channel: ChannelModel
instance-attribute
¶
Channel this invite is for.
inviter: UserModel | None
instance-attribute
¶
User who created invite.
approximate_member_count: int | None
instance-attribute
¶
Approximate count of total members.
expires_at: str
instance-attribute
¶
ISO8601 timestamp for expiration date.
roles: list[GuildRoleModel] | None
instance-attribute
¶
Roles assigned to the user upon accepting the invite.
InviteWithMetadataModel
dataclass
¶
Bases: InviteModel
flowchart TD
scurrypy.api.invite.InviteWithMetadataModel[InviteWithMetadataModel]
scurrypy.api.invite.InviteModel[InviteModel]
scurrypy.core.model.DataModel[DataModel]
scurrypy.api.invite.InviteModel --> scurrypy.api.invite.InviteWithMetadataModel
scurrypy.core.model.DataModel --> scurrypy.api.invite.InviteModel
click scurrypy.api.invite.InviteWithMetadataModel href "" "scurrypy.api.invite.InviteWithMetadataModel"
click scurrypy.api.invite.InviteModel href "" "scurrypy.api.invite.InviteModel"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents the invite model with extra information.
uses: int
instance-attribute
¶
Number of times this invite was used.
max_uses: int
instance-attribute
¶
Max number of times this invite can be used.
max_age: int
instance-attribute
¶
Duration (in seconds) after which this invite expires.
temporary: bool
instance-attribute
¶
Whether this invite only grants temporary membership.
created_at: str
instance-attribute
¶
ISO8601 timestamp for when this invite was created.
InvitePart
dataclass
¶
Bases: DataModel
flowchart TD
scurrypy.api.invite.InvitePart[InvitePart]
scurrypy.core.model.DataModel[DataModel]
scurrypy.core.model.DataModel --> scurrypy.api.invite.InvitePart
click scurrypy.api.invite.InvitePart href "" "scurrypy.api.invite.InvitePart"
click scurrypy.core.model.DataModel href "" "scurrypy.core.model.DataModel"
Represents fields for creating an invite.
max_age: int | None = None
class-attribute
instance-attribute
¶
Duration of invite (in seconds) before it expires.
0 for never or up to 604800 (max 7 days).
Discord defaults to 86400 (24 hours).
max_uses: int | None = None
class-attribute
instance-attribute
¶
Max number of uses for this invite.
0 for unlimited or up to 100.
Discord defaults to 0.
temporary: bool | None = None
class-attribute
instance-attribute
¶
Whether this invite grants temporary membership.
Discord defaults to False.
unique: bool | None = None
class-attribute
instance-attribute
¶
Whether to reuse similar invite codes.
Discord defaults to False.
role_ids: list[Snowflake] | None = None
class-attribute
instance-attribute
¶
Role IDs to be given when the user accept this invite.
Permissions
Requires MANAGE_ROLES and cannot assign roles with higher
permissions than the sender.