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.

snowflake_timestamp
Return type:datetime
Returns:The timestamp of the snowflake.
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.

user = None

The User object associated with this member.

guild = None

The WidgetGuild object associated with this member.

game = None

The game associated with this member.

status = None

The Status associated with this member.

snowflake_timestamp
Return type:datetime
Returns:The timestamp of the snowflake.
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.
snowflake_timestamp
Return type:datetime
Returns:The timestamp of the snowflake.
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, a WidgetGuild.
channels
Return type:Mapping[int, Union[Channel, WidgetChannel]]
Returns:A mapping of channels associated with this widget.