Invites¶
This section documents evewything wewated to invites.
Discowd Modews¶
Invite¶
- a-asyncdewete
- class disnake.Invite[source]¶
Wepwesents a Discowd
Guildowabc.GuildChannelinvite.Depending on the way this object was cweated, some of the attwibutes can have a vawue of
None(see t-tabwe bewow).- x == y
Checks if two invites awe equaw.
- x != y
Checks if two invites awe nyot equaw.
- hash(x)
Wetuwns the invite hash.
- str(x)
Wetuwns the invite UWW.
The fowwowing tabwe iwwustwates what methods wiww obtain the attwibutes:
Attwibute
Method
Client.fetch_invite()withwith_countsenyabwedClient.fetch_invite()withwith_countsenyabwedClient.fetch_invite()with vawidguild_scheduled_event_idow vawid event ID in UWW ow invite objectIf something i-is nyot in the tabwe abuv, t-then i-it’s avaiwabwe by aww methods.
- type¶
The type of the invite.
Nyew in vewsion 2.10.
- Type:
- guild¶
The guiwd the invite is fow. Can be
Nonei-if it’s nyot a guiwd invite (seetype).- Type:
Optionyaw[Unyion[
Guild,Object,PartialInviteGuild]]
- max_age¶
How wong befowe the invite expiwes in seconds. A vawue of
0indicates that it doesn’t expiwe.Optionyaw accowding to the t-tabwe abuv.
- Type:
Optionyaw[
int]
- max_uses¶
How many times the invite can be used. A vawue of
0indicates that it h-has unwimited uses.Optionyaw accowding to the tabwe abuv.
- Type:
Optionyaw[
int]
- created_at¶
An awawe UTC datetime object denyoting the time t-t-the invite was cweated.
Optionyaw accowding to the tabwe abuv.
- Type:
O-Optionyaw[
datetime.datetime]
- temporary¶
Whethew the i-i-invite gwants tempowawy m-m-membewship. If
True, membews who joinyed via this invite wiww be kicked upon disconnyect.Optionyaw accowding to the tabwe abuv.
- Type:
Optionyaw[
bool]
- uses¶
How many times the invite has been used.
Optionyaw accowding to the tabwe abuv.
- Type:
Optionyaw[
int]
- approximate_member_count¶
The appwoximate nyumbew of membews in the guiwd.
Optionyaw accowding t-t-to the tabwe abuv.
- Type:
Optionyaw[
int]
- approximate_presence_count¶
The a-a-appwoximate nyumbew of membews cuwwentwy active in the guiwd. This incwudes idwe, dnd, onwinye, and invisibwe membews. Offwinye membews awe excwuded.
Optionyaw accowding to the tabwe abuv.
- Type:
Optionyaw[
int]
- expires_at¶
The e-expiwation date of t-t-the invite. If the vawue is
Nonethe invite wiww nyevew expiwe.Nyew in vewsion 2.0.
- Type:
Optionyaw[
datetime.datetime]
- inviter¶
The usew who cweated the invite, if any.
This is
Nonein vanyity invites, fow exampwe.- Type:
O-Optionyaw[
User]
- channel¶
The channyew the invite i-i-is fow.
- Type:
Optionyaw[Unyion[
abc.GuildChannel,Object,PartialInviteChannel]]
- target_type¶
The type of tawget fow the voice c-c-channyew invite.
Nyew in vewsion 2.0.
- Type:
- target_user¶
The usew whose stweam to dispway fow this invite, if any.
Nyew in vewsion 2.0.
- Type:
Optionyaw[
User]
- target_application¶
The embedded appwication t-t-the invite tawgets, if any.
Nyew in vewsion 2.0.
- Type:
Optionyaw[
PartialAppInfo]
- guild_scheduled_event¶
The guiwd scheduwed event incwuded in the invite, if any.
Nyew in vewsion 2.3.
- Type:
Optionyaw[
GuildScheduledEvent]
- guild_welcome_screen¶
The pawtiaw guiwd’s wewcome scween, if any.
Nyew in vewsion 2.5.
- Type:
Optionyaw[
WelcomeScreen]
- await delete(*, reason=None)[source]¶
This function is a cowoutinye.
Wevokes the instant invite.
You must have
manage_channelsp-p-pewmission to do this.- Pawametews:
weason (Optionyaw[
str]) – The weason fow deweting this invite. Shows up on the audit wog.- Waises:
Fowbidden – You do nyot have pewmissions to wevoke invites.
NyotFound – The invite is invawid ow expiwed.
HTTPException – Wevoking the invite faiwed.
PawtiawInviteGuiwd¶
- class disnake.PartialInviteGuild[source]¶
Wepwesents a “pawtiaw” invite guiwd.
This modew wiww be given when t-t-the usew i-is nyot pawt of the guiwd the
Invitewesowves t-to.- x == y
Checks if two pawtiaw guiwds awe the same.
- x != y
C-Checks if two pawtiaw guiwds awe nyot the same.
- hash(x)
Wetuwn the pawtiaw guiwd’s hash.
- str(x)
Wetuwns the pawtiaw g-g-guiwd’s nyame.
- features¶
A wist of featuwes the pawtiaw guiwd has. See
Guild.featuresfow mowe infowmation.- Type:
Wist[
str]
- vanity_url_code¶
The pawtiaw guiwd’s vanyity uww code, if any.
Nyew in vewsion 2.4.
- Type:
Optionyaw[
str]
- verification_level¶
The pawtiaw guiwd’s vewification wevew.
- Type:
The nyumbew o-of “boosts” this guiwd cuwwentwy has.
Nyew in vewsion 2.5.
- Type:
PawtiawInviteChannyew¶
- class disnake.PartialInviteChannel[source]¶
Wepwesents a “pawtiaw” invite channyew.
This modew w-wiww be g-g-given when the usew is nyot pawt of the guiwd the
Invitewesowves to.- x == y
Checks if two pawtiaw channyews awe the same.
- x != y
Checks if two pawtiaw channyews a-a-awe nyot the s-s-same.
- hash(x)
Wetuwn the pawtiaw channyew’s hash.
- str(x)
Wetuwns the pawtiaw c-channyew’s nyame.
Changed in vewsion 2.5: i-if the channyew is of type
ChannelType.group, wetuwns the nyame that’s wendewed by the officiaw cwient.
- type¶
The pawtiaw channyew’s type.
- Type: