chat¶
Chat channel features
-
class
dota2.features.chat.ChannelManager(dota_client, logger_name)¶ Bases:
eventemitter.EventEmitter-
EVENT_JOINED_CHANNEL= 'channel_joined'¶ When the client join a channel.
Parameters: channel ( ChatChannel) – channel instance
-
EVENT_LEFT_CHANNEL= 'channel_left'¶ When the client leaves a channel.
Parameters: channel ( ChatChannel) – channel instance
-
EVENT_MESSAGE= 'message'¶ On a new channel message
Parameters: - channel (
ChatChannel) – channel instance - message (CMsgDOTAChatMessage) – message data
- channel (
-
EVENT_CHANNEL_MEMBERS_UPDATE= 'members_update'¶ When users join/leave a channel
Parameters: - channel (
ChatChannel) – channel instance - joined (list) – list of members who joined
- left (list) – list of members who left
- channel (
-
emit(event, *args)¶ Emit event with some arguments
Parameters: - event (any type) – event identifier
- args – any or no arguments
-
join_channel(channel_name, channel_type=<DOTAChatChannelType_t.DOTAChannelType_Custom: 1>)¶ Join a chat channel
Parameters: - channel_name (str) – channel name
- channel_type (
DOTAChatChannelType_t) – channel type
Returns: join result
Return type: Response event:
EVENT_JOINED_CHANNEL
-
join_lobby_channel()¶ Join the lobby channel if the client is in a lobby.
Response event:
EVENT_JOINED_CHANNEL
-
lobby¶ References lobby channel if client has joined it
Returns: channel instance Return type: ChatChannel
-
join_party_channel()¶ Join the lobby channel if the client is in a lobby.
Response event:
EVENT_JOINED_CHANNEL
-
party¶ References party channel if client has joined it
Returns: channel instance Return type: ChatChannel
-
get_channel_list()¶ Requests a list of chat channels from the GC.
Returns: List of chat channels Return type: CMsgDOTAChatGetUserListResponse, None
-
leave_channel(channel_id)¶
-