curious.dataclasses.user¶
Wrappers for User objects.
Classes
AvatarUrl(user) |
Represents a user’s avatar URL. |
BotUser(client, **kwargs) |
A special type of user that represents ourselves. |
User(client, **kwargs) |
This represents a bare user - i.e, somebody without a guild attached. |
-
class
curious.dataclasses.user.AvatarUrl(user: curious.dataclasses.user.User) → None[source]¶ Bases:
objectRepresents a user’s avatar URL.
To get the actual URL, do str(avatar_url).
Parameters: user ( User) – TheUserfor this URL.
-
class
curious.dataclasses.user.BotUser(client, **kwargs)[source]¶ Bases:
curious.dataclasses.user.UserA special type of user that represents ourselves.
Inspects the stack to ensure we’re being called correctly.
-
created_at¶ Return type: datetimeReturns: The datetime.datetimethis user was created at.
-
-
class
curious.dataclasses.user.User(client, **kwargs)[source]¶ Bases:
curious.dataclasses.bases.DataclassThis represents a bare user - i.e, somebody without a guild attached. This is used in DMs and similar. All member objects have a reference to their user on
.user.Variables: id – The ID of this user. Inspects the stack to ensure we’re being called correctly.
-
created_at¶ Return type: datetimeReturns: The datetime.datetimethis user was created at.
-
await
open_private_channel()[source]¶ Opens a private channel with a user.
Note
You probably won’t need this to just send messages to a user.
Return type: ChannelReturns: The newly created private channel.
-