Invite

discord_http.invite module

class discord_http.invite.Invite(*, state, data)

Bases: PartialInvite

Parameters:
is_vanity() bool

Whether the invite is a vanity invite.

Return type:

bool

class discord_http.invite.PartialInvite(*, state, code, channel_id=None, guild_id=None)

Bases: object

Parameters:
BASE = 'https://discord.gg'
property channel: PartialChannel | None

The channel the invite is in.

async delete(*, reason=None) Invite

Deletes the invite.

Parameters:

reason (str) – The reason for deleting the invite

Return type:

Invite

Returns:

The invite object

async fetch() Invite

Fetches the invite details.

Return type:

Invite

Returns:

The invite object

property url: str

The URL of the invite.