Invite¶
discord_http.invite module¶
- class discord_http.invite.Invite(*, state, data)¶
Bases:
PartialInviteRepresents an invite object.
- Parameters:
state (DiscordAPI)
data (dict)
- property channel: PartialChannel | None¶
The channel the invite is in.
- code¶
The invite code.
- async fetch_target_users() list[PartialUser]¶
Fetch the list of users allowed to use this invite.
- Return type:
- Returns:
The users from the target users file
- async fetch_target_users_job_status() InviteTargetUsersJobStatus¶
Fetch the status of the target users file processing job.
- Return type:
- Returns:
The status of the target users file processing job
- target_type: InviteTargetType | None¶
The target type of the invite, if applicable.
- property guild: Guild | PartialGuild | None¶
The guild associated with the invite, if applicable. Resolved live from cache.
- property type: InviteType¶
The type of the invite.
- property flags: GuildInviteFlags¶
The flags associated with the invite.
- class discord_http.invite.InviteTargetUsersJobStatus(status, total_users, processed_users, created_at, completed_at, error_message)¶
Bases:
NamedTupleRepresents the status of an invite’s target users file processing job.
- Parameters:
- status: InviteTargetUsersJobStatusType¶
Alias for field number 0
- count(value, /)¶
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- class discord_http.invite.PartialInvite(*, state, code, channel_id=None, guild_id=None)¶
Bases:
objectRepresents a partial invite object.
- Parameters:
state (DiscordAPI)
code (str)
channel_id (int | None)
guild_id (int | None)
- code¶
The invite code.
- property guild: Guild | PartialGuild | None¶
The guild associated with the invite, if applicable. Resolved live from cache.
- property channel: PartialChannel | None¶
The channel the invite is in.
- async fetch_target_users() list[PartialUser]¶
Fetch the list of users allowed to use this invite.
- Return type:
- Returns:
The users from the target users file
- async fetch_target_users_job_status() InviteTargetUsersJobStatus¶
Fetch the status of the target users file processing job.
- Return type:
- Returns:
The status of the target users file processing job