API Reference¶
The following section outlines the API of pytalk.
Note
This module uses the Python logging module to log diagnostic and errors in an output independent way. If the logging module is not configured,
Bot¶
Enums¶
TeamTalk enums and constants.
- class pytalk.enums.TeamTalkServerInfo¶
Holds the required information to connect and login to a TeamTalk server.
- __init__(data: dict[str, Any]) None¶
Initialize a TeamTalkServerInfo object.
- Parameters:
data (dict) – A dictionary containing the server information.
- class pytalk.enums.UserStatusMode¶
Represents user status modes (mutually exclusive).
- ONLINE = 0¶
The user is online.
- AWAY = 1¶
The user is away.
- QUESTION = 2¶
The user has a question.
- class pytalk.enums.Status¶
A helper class to construct combined status values for a user.
Use Status.online, Status.away, or Status.question properties, then chain them with a gender property (.male, .female, .neutral) to get the final status value for pytalk.TeamTalkInstance.change_status.
Examples
Status.online.male Status.away.female Status.question.neutral
This class should not be instantiated directly.
- __init__() None¶
Prevent direct instantiation of the Status class.
- Raises:
TypeError – If an attempt is made to instantiate this class.
- classmethod online() _StatusBuilder¶
Set the user status to ‘online’.
- classmethod away() _StatusBuilder¶
Set the user status to ‘away’.
- classmethod question() _StatusBuilder¶
Set the user status to ‘question’.
Server¶
Channel¶
UserAccount¶
User¶
Message¶
Audio Streaming¶
Files¶
Permission¶
Subscriptions¶
Exceptions¶
teamtalk.py exceptions.
- exception pytalk.exceptions.TeamTalkError¶
Base exception class for teamtalk.py.
All other exceptions inherit from this class, which inherits from
Exception.
- exception pytalk.exceptions.PytalkPermissionError¶
Exception raised when the bot does not have permission to perform an action.