Room class

class psclient.Room(name, connection)

Bases: object

Represents a room on Pokemon Showdown

Parameters:
  • name (string) – the name of the room that the Room object represents (can include spaces/caps)
  • connection (Connection) – the Connection object to use to connect to the room
Variables:
  • connection (Connection) – the Connection object to use to connect to the room
  • id (string that is an ID) – the room’s ID
  • auth (dictionary) – a dictionary containing the room’s auth
join()

Joins the room

leave()

Leaves the room

say(message)

Sends a message to the room

Parameters:message (string) – the message to send
updateAuth(authDict)

Updates the auth list for the room based on the given auth dictionary

Parameters:authDict (dictionary) – dictionary of the changes to the auth list
usersWithRankGEQ(rank)

Gets a set of userids of the roomauth whose room rank is greater than or equal to a certain rank

Parameters:rank (string) – the minimum rank
Returns:a set of userids for the roomauth whose room rank is greater than or equal to the given rank
Return type:set