talkomatic.py 0.1.2
An easy-to-use Python versatile wrapper for the Talkomatic Bot interface ensuring best practices for making bots, and handling the REST API.
 
Loading...
Searching...
No Matches
talkomatic.dataclasses.user.User Class Reference

Public Member Functions

"User" from_raw_json (cls, dict data, bool id_only=False)
 
"User" from_id_only (cls, str id)
 
bool __eq__ (self, "User" other)
 
bool __ne__ (self, "User" other)
 
str __str__ (self)
 
int __hash__ (self)
 

Public Attributes

 id = other.id
 

Detailed Description

A class representing a user in a lobby.

In some places, "id-only users" are used, which are users that only have an ID
and no username or location attached. These are where the original Talkomatic
API only specifies a user ID, and not a username or location. You can still
try retrieving the username and location from the bot if the user is stored
in the bot's currently online user database, but this is not guaranteed.

Composed of:
- id: The user's raw ID in web safe Base64 encoding.
- username: The user's username. (doesn't apply if the user is a "id-only user")
- location: The user's location. (doesn't apply if the user is a "id-only user")
- id_only: Whether the user is an "id-only user".

Definition at line 5 of file user.py.

Member Function Documentation

◆ __eq__()

bool talkomatic.dataclasses.user.User.__eq__ ( self,
"User" other )

Definition at line 40 of file user.py.

◆ __hash__()

int talkomatic.dataclasses.user.User.__hash__ ( self)

Definition at line 52 of file user.py.

◆ __ne__()

bool talkomatic.dataclasses.user.User.__ne__ ( self,
"User" other )

Definition at line 46 of file user.py.

◆ __str__()

str talkomatic.dataclasses.user.User.__str__ ( self)

Definition at line 49 of file user.py.

◆ from_id_only()

"User" talkomatic.dataclasses.user.User.from_id_only ( cls,
str id )

Definition at line 37 of file user.py.

◆ from_raw_json()

"User" talkomatic.dataclasses.user.User.from_raw_json ( cls,
dict data,
bool id_only = False )

Definition at line 28 of file user.py.

Member Data Documentation

◆ id

talkomatic.dataclasses.user.User.id = other.id

Definition at line 44 of file user.py.


The documentation for this class was generated from the following file: