ValvePython / dota2

🐸 Python package for interacting with Dota 2 Game Coordinator
http://dota2.readthedocs.io
198 stars 32 forks source link

Messages are not sending #85

Closed BruhMomentum closed 2 years ago

BruhMomentum commented 2 years ago

So, the problem is that I'm trying to send messages in regional chat when I'm joining it, but I don't see any

Logs:

[2022-05-16 18:29:17,054] DEBUG Dota2Client: Incoming: <EDOTAGCMsg.EMsgGCJoinChatChannelResponse: 7010>
[2022-05-16 18:29:17,055] DEBUG Dota2Client: Emit event: <EDOTAGCMsg.EMsgGCJoinChatChannelResponse: 7010>
[2022-05-16 18:29:17,055] DEBUG Dota2Client.channels: Emit event: ('join_result', 'Buguruslan, OB', 0)
[2022-05-16 18:29:17,056] DEBUG Dota2Client.channels: Emit event: 'channel_joined'
170997 Buguruslan, OB 0 <ChatChannel(170997, 'Buguruslan, OB', 0)>
[2022-05-16 18:29:17,059] DEBUG __main__: Emit event: ('join_result', 'Buguruslan, OB', 0)
[2022-05-16 18:29:17,059] DEBUG __main__: Emit event: 'channel_joined'

[2022-05-16 18:29:20,062] DEBUG Dota2Client: Outgoing: <EDOTAGCMsg.EMsgGCChatMessage: 7273>
[2022-05-16 18:29:20,062] DEBUG SteamClient: Outgoing: <MsgProto(<EMsg.ClientToGC: 5452> | CMsgGCClient)>

[2022-05-16 18:29:20,064] DEBUG Dota2Client: Outgoing: <EDOTAGCMsg.EMsgGCChatMessage: 7273>
[2022-05-16 18:29:20,064] DEBUG SteamClient: Outgoing: <MsgProto(<EMsg.ClientToGC: 5452> | CMsgGCClient)>

[2022-05-16 18:29:20,400] DEBUG SteamClient: Incoming: <MsgProto(<EMsg.Multi: 1> | CMsgMulti)>
[2022-05-16 18:29:20,400] DEBUG SteamClient: Emit event: <EMsg.Multi: 1>
[2022-05-16 18:29:20,401] DEBUG SteamClient: Multi: Unpacking

Code:

@dota.channels.on(dota.channels.EVENT_JOINED_CHANNEL)
def on_channel_join(channel):
    try:
      print(channel.id,channel.name,channel.type, channel)
      dota.sleep(3)
      print('\n')
      channel.send("test")
      print('\n')
      channel.flip_coin()
      print('\n')
    except Exception as e:
      print(e)
rossengeorgiev commented 2 years ago

Try configuring .verbose_log=True to get the contents of the messages. It possible the protobufs have been changed, or there is some restrictions on the account or channels. I haven't touched dota 2 for a long time.

nmashchenko commented 1 year ago

Were you able to find fix for it?