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:
object
Represents a user’s avatar URL.
To get the actual URL, do str(avatar_url).
Parameters: user ( User
) – TheUser
for this URL.
-
class
curious.dataclasses.user.
BotUser
(client, **kwargs)[source]¶ Bases:
curious.dataclasses.user.User
A special type of user that represents ourselves.
Inspects the stack to ensure we’re being called correctly.
-
created_at
¶ Return type: datetime
Returns: The datetime.datetime
this user was created at.
-
-
class
curious.dataclasses.user.
User
(client, **kwargs)[source]¶ Bases:
curious.dataclasses.bases.Dataclass
This 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: datetime
Returns: The datetime.datetime
this 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: Channel
Returns: The newly created private channel.
-