ClientCompoundInviteEndpoints
Methods
()
__new__Compound components do not support instancing.
Sub-typing is supported, but the attributes are only proxied. Sub-types have no meaning by themselves.
Raises
RuntimeError
(channel, application, ...)
application_invite_createCreates an EMBEDDED_APPLICATION invite to the specified voice channel. The application must have must have embedded
flag.
Deprecated and will be removed in 2024 February.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel |
| The target channel of the invite. | |||
application |
| The embedded application to open in the voice channel.
| |||
max_age |
|
| After how much time (in seconds) will the invite expire.
| ||
max_uses |
|
| How much times can the invite be used.
| ||
unique |
|
| Whether the created invite should be unique. | ||
temporary |
|
| Whether the invite should give only temporary membership. |
Returns
invite : Invite
Raises
TypeError
- If
channel
was not given neither asChannel
, neither asint
. - If
application
was not given neither asApplication
nor asint
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(channel, ...)
invite_createCreates an invite at the given channel with the given parameters.
To create stream invite pass the target_type
parameter as InviteTargetTypes.stream
and use either the target_user
or target_user_id
to define the streamer.
To create an embedded application invite pass the target_type
parameter as InviteTargetTypes.embedded_application
and use either the target_application
or target_application_id
to define the application.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
channel |
| The channel of the created invite. | |||
invite_template |
|
| Invite entity to use as a template. | ||
**keyword_parameters | Keyword parameters | Additional keyword parameters to create the invite with. | |||
max_age |
| After how much time (in seconds) will the invite expire. Defaults is never. | |||
max_uses |
| How much times can the invite be used. Defaults to unlimited. | |||
target_application |
| Alternative for | |||
target_application_id |
| The invite's target application. | |||
target_type |
| The invite's target type. | |||
target_user |
| Alternative for | |||
target_user_id |
| The target of the invite if applicable. | |||
temporary |
| Whether the invite should give only temporary membership. | |||
unique |
| Whether the created invite should be unique. |
Returns
invite : Invite
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(, ...)
invite_create_preferredCreates an invite to the guild's preferred channel.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
guild . | The guild the invite will be created to. | ||||
**keyword_parameters | Keyword parameters | Additional keyword parameters to describe the created invite. | |||
max_age |
|
| After how much time (in seconds) will the invite expire. Defaults is never. | ||
max_uses |
|
| How much times can the invite be used. Defaults to unlimited. | ||
unique |
|
| Whether the created invite should be unique. | ||
temporary |
|
| Whether the invite should give only temporary membership. |
Returns
invite : Invite
Raises
TypeError
- if
guild
is not GuildĖ
ValueError
If the guild has no channel to create invite to.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(invite, ...)
invite_deleteDeletes the given invite.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
invite | The invite to delete. | ||||
reason |
|
| Shows up at the respective guild's audit logs. |
Raises
TypeError
If invite
was not given neither Invite
nor str
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(guild, vanity_code, ...)
invite_edit_vanityEdits the given guild's vanity invite's code.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
guild | The guild, what's invite will be edited. | ||||
vanity_code |
| The new code of the guild's vanity invite. | |||
reason |
|
| Shows up at the guild's audit logs. |
Raises
TypeError
If guild
was not given neither as Guild
nor as int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
AssertionError
If vanity_code
was not given as str
.
(invite)
invite_getRequests a partial invite with the given code.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
invite |
| The invites code. |
Returns
invite : Invite
Raises
TypeError
If invite
was not given neither Invite
nor str
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
AssertionError
If invite_code
was not given as str
.
(channel)
invite_get_all_channelGets the invites of the given channel.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
channel |
| The channel, what's invites will be requested. |
Returns
invites : list
of Invite
objects
Raises
TypeError
If channel
was not given neither as Channel
, neither as int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(guild)
invite_get_all_guildGets the invites of the given guild.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
guild |
| The guild, what's invites will be requested. |
Returns
invites : list
of Invite
objects
Raises
TypeError
If guild
was not given neither as Guild
nor as int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(guild)
invite_get_vanityReturns the vanity invite of the given guild.
This method is a coroutine.
Parameter | Type | Description |
---|---|---|
guild |
| The guild, what's invite will be returned. |
Returns
invite : None
, Invite
The vanity invite of the guild
, None
if it has no vanity invite.
Raises
TypeError
If guild
was not given neither as Guild
nor as int
.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
(guild, user, ...)
stream_invite_createCreates an STREAM invite at the given guild for the specific user. The user must be streaming at the guild, when the invite is created.
Deprecated and will be removed in 2024 February.
This method is a coroutine.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
guild | The guild where the user streams. | ||||
user | ClientUserBase, int | The streaming user. | |||
max_age |
|
| After how much time (in seconds) will the invite expire. Defaults is never. | ||
max_uses |
|
| How much times can the invite be used. Defaults to unlimited. | ||
unique |
|
| Whether the created invite should be unique. | ||
temporary |
|
| Whether the invite should give only temporary membership. |
Returns
invite : Invite
Raises
TypeError
- If
user
was not given neither asClientUserBase
neither asint
. - If
guild
is notGuild
.
ValueError
- If the user is not streaming at the guild.
ConnectionError
No internet connection.
DiscordException
If any exception was received from the Discord API.
()
vanity_invite_editDeprecated and will be removed in 2023 February. Please use .invite_edit_vanity
instead.