curious.dataclasses.widget¶
Wrappers for Widget objects.
Classes
Widget (client, **kwargs) |
Represents the embed widget for a guild. |
WidgetChannel (bot, guild, **kwargs) |
Represents a limited subsection of a channel. |
WidgetGuild (bot, **kwargs) |
Represents a limited subsection of a guild. |
WidgetMember (bot, guild, kwargs) |
Represents a limited subsection of a member. |
-
class
curious.dataclasses.widget.
WidgetChannel
(bot, guild: curious.dataclasses.widget.WidgetGuild, **kwargs)[source]¶ Bases:
curious.dataclasses.bases.Dataclass
Represents a limited subsection of a channel.
Inspects the stack to ensure we’re being called correctly.
-
name
= None¶ The name of this channel.
-
position
= None¶ The position of this channel.
-
guild_id
= None¶ The guild ID for this channel.
-
guild
= None¶ The
WidgetGuild
for this channel.
-
-
class
curious.dataclasses.widget.
WidgetMember
(bot, guild: curious.dataclasses.widget.WidgetGuild, kwargs)[source]¶ Bases:
curious.dataclasses.bases.Dataclass
Represents a limited subsection of a member.
Inspects the stack to ensure we’re being called correctly.
-
guild
= None¶ The
WidgetGuild
object associated with this member.
-
game
= None¶ The game associated with this member.
-
-
class
curious.dataclasses.widget.
WidgetGuild
(bot, **kwargs)[source]¶ Bases:
curious.dataclasses.bases.Dataclass
Represents a limited subsection of a guild.
Inspects the stack to ensure we’re being called correctly.
-
name
= None¶ The name of this guild.
-
_channels
= None¶ A mapping of
WidgetChannel
in this widget guild.
-
_members
= None¶ A mapping of
WidgetMember
in this widget guild.
-
channels
¶ Return type: Mapping
[int
,WidgetChannel
]Returns: A read-only mapping of WidgetChannel
representing the channels for this guild.
-
members
¶ Return type: Mapping
[int
,WidgetMember
]Returns: A read-only mapping of WidgetMember
representing the channels for this guild.
-
-
class
curious.dataclasses.widget.
Widget
(client, **kwargs)[source]¶ Bases:
object
Represents the embed widget for a guild.
-
guild_id
= None¶ The guild ID for this widget.
-
_widget_guild
= None¶ The widget guild for this widget.
-
invite_url
= None¶ The invite URL that this widget represents.
-
guild
¶ Return type: Union
[Guild
,WidgetGuild
]Returns: The guild object associated with this widget. If the guild was cached, a Guild
. Otherwise, aWidgetGuild
.
-