curious.dataclasses.invite¶
Wrappers for Invite objects.
Invite objects are linked to a real channel and real guild, but Discord does not return the full data for these objects. Therefore, a few “mini” objects are provided that represent the objects:
InviteGuild
, which contains thename
,splash_url
andicon_url
of the Guild.InviteChannel
, which contains thename
andtype
of the Channel.
These objects will be returned on :attr`.Invite.guild` and Invite.channel
respectively
if the data for each is not cached by curious. Otherwise, full Guild
and
Channel
objects will be returned.
Classes
Invite (client, **kwargs) |
Represents an invite object. |
InviteChannel (**kwargs) |
Represents an InviteChannel - a subset of a channel. |
InviteGuild (**kwargs) |
Represents an InviteGuild - a subset of a guild. |
InviteMetadata (**kwargs) |
Represents metadata attached to an invite. |
-
class
curious.dataclasses.invite.
InviteGuild
(**kwargs)[source]¶ Bases:
curious.dataclasses.bases.IDObject
Represents an InviteGuild - a subset of a guild.
-
name
= None¶ The name of this guild.
-
splash_hash
= None¶ The splash hash of this guild.
-
_icon_hash
= None¶ The icon hash of this guild.
-
features
= None¶ A list of features for this guild.
-
member_count
= None¶ The approximate member count for this guild.
-
presence_count
= None¶ The approximate presence count.
-
text_channel_count
= None¶ The number of text channels.
-
voice_channel_count
= None¶ The number of voice channels.
-
-
class
curious.dataclasses.invite.
InviteChannel
(**kwargs)[source]¶ Bases:
curious.dataclasses.bases.IDObject
Represents an InviteChannel - a subset of a channel.
-
name
= None¶ The name of this channel.
-
type
= None¶ The
ChannelType
of this channel.
-
-
class
curious.dataclasses.invite.
InviteMetadata
(**kwargs)[source]¶ Bases:
object
Represents metadata attached to an invite.
-
uses
¶ The number of times this invite was used.
-
max_uses
¶ The maximum number of uses this invite can use.
-
max_age
¶ The maximum age of this invite.
-
temporary
¶ Is this invite temporary?
-
created_at
¶ When was this invite created at?
-
revoked
¶ Is this invite revoked?
-
-
class
curious.dataclasses.invite.
Invite
(client, **kwargs)[source]¶ Bases:
object
Represents an invite object.
-
code
= None¶ The invite code.
-
guild_id
= None¶ The guild ID for this invite.
-
channel_id
= None¶ The channel ID for this invite.
-
_invite_guild
= None¶ The invite guild this is attached to. The actual guild object can be more easily fetched with .guild.
-
_invite_channel
= None¶ The invite channel this is attached to. The actual channel object can be more easily fetched with .channel.
-
inviter_id
= None¶ The ID of the user that created this invite. This can be None for partnered invites.
-
guild
¶ Return type: Union
[Guild
,InviteGuild
]Returns: The guild this invite is associated with.
-
channel
¶ Return type: Union
[Channel
,InviteChannel
]Returns: The channel this invite is associated with.
-