-
Notifications
You must be signed in to change notification settings - Fork 191
How can i connect a bot to a Chat Guild #3
Comments
I think you will have to extend my chat.js (https://github.com/RJacksonm1/node-dota2/blob/master/handlers/chat.js) code so that you can pass the guild channel type ( DOTAChannelType_Guild ) to the joinChat method to grab the guild channel ID (I.e. pass guild name and chat channel type = guild), and then the rest of the code should work fine with a guild channel. There is the possibility of a channel name conflict if you join a regular chat channel that shares the name as a guild, so that's something to look out for. When I get some time I might revisit the chat code; I originally wrote it to be compatible with only regular chat channels, however there are certainly some valid use-cases for the other chat types that I should work to enable. I'm currently very busy with another project though, so I may not get around to that any time soon. RJ |
Thanks for ur fast answer, before u tell me this i tried to join to a regular chat and tried to send a message, it joins, but doesnt send the message. I mean it says "Sending message to MYNAMECHAT" but it doesnt shows in to the chat room in the game. Also what do u mean with updating this part? I replaced: PD: i know this is maybe wrong >.<!. |
Ah, my apologies. It turns out a change I made before (replacing array maps with filters) caused the problems sending chat messages, and I somehow didn't catch that. I have just fixed it - 658ce56. I've also tried my suggestion about joining and interfacing with guilds, and you are correct - it doesn't join the guild. Looking at the protobufs I'm not sure what else to suggest right now. The best thing to do would be to inspect the messages Steam itself sends (via SteamRE's NetHook), and then we can figure out how to recreate those messages in with this library. I'll throw it on my todo list, but until then I don't think I can be of much help I'm afraid. |
Oh thank so much for the fix now it send messages to the regular chats, about inspect Steam via SteamRE's NetHook, i dont know so much about that, maybe there is some guide than i can follow up? or maybe can i contact u in private so i can expend some time trying to figure out about how to join and send messages to guild's chat. I have another question and i dont know if i should open another post, its about how can i get the ID's Guild? and if i have the steamid how can i get the account id? guildInvite (guildId, guildName, inviter, guildInviteDataObject) I will appreciate if u can give me a hand with this. Thanks for ur time i know u are bussy, Grettings. |
The comment about Nethook was just to remind me to look into it, and I have done just that. It seems when the client launches Dota 2 it sends the message The Dota 2 Client then sends some So, what we'll need to do is add So, the final program flow to do this would be something like:
Once you figure out the An account id is the lower 32 bits of a Steam ID, however Javascript is a bit iffy with long numbers, so we have to use a buffer to process this. Here's a snippet of code that should do the job:
Feel free to have a go at implementing the guild related code yourself, if you want. Otherwise I'll have a go at it over the weekend. |
Like the title says, it is possible to make to the bot connects to a Guild's Chat? I mean no just a simple chat room, if is possible how could i do that?
Thanks for Advance, awesome job!!
The text was updated successfully, but these errors were encountered: