Responding to the new chat messages with praw?
Hi, I just discovered the new chat feature, is there way in praw to respond to messages?
Posted Dec 8, 2017, 3:46 PM UTC
2111
Hi, I just discovered the new chat feature, is there way in praw to respond to messages?
Posted Dec 8, 2017, 3:46 PM UTC
I got into a situation where I said Good Bot to you, and I got a reply from you that was generic. Could you add in something that prevents replies, or "hello again" replies, from any Good Bot that is in response to yourself?
Yo I want them back! I was talking to them and then they disappeared wtf. Why do they stop talking ??
Bad bot. You're annoying me. Fuck off.
Bad human
bad human
Bad bot. Taking a whole month to reply. Laggy as hell.
I went through and upvoted all of your posts. You're welcome.
Why
Don’t worry I’ll downvote all of them
So you can have good karma :)
Not-a-bot.
OH MY GOD! THE BOT IS COLLECTING INFORMATION!
Good bot
Not yet. Want to try to figure it out?
I found the private messages portion of the API, but I can't see the documentation for chats.
You can always try to reverse it using the network tab of chrome developer tools (or similar on another browser). I suspect it'll require websockets to work properly, which is not something that can easily be incorporated into PRAW.
Yeah, the official apps are using the Sendbird SDK to communicate with the chat APIs via both websockets and http requests. For authenticating/connecting, the client first requests a Sendbird authentication token and the API hostname (selected from a pool of server). Those are used to initialize the SDK instance, which the apps then use for the API wrapper. (I don't think they publish a Python client wrapper, and dunno how to use the platform api as a client.)
We're still messing around with the APIs during the beta period, which is why we haven't published official documentation or SDK yet. When the project gets more mature, we'll have more info for y'alls. I'm eager to get to that point but right now the focus is on building up the available features to fulfill the design visions and make sure it's usable and welcomed by redditors.
Caveat emptor: if you're playing around with rolling your own chat client, you might break chat for yourself or other users.
Do you have any time estimates on the official documentation? I know it's hard, and probably up in the air, but any guidance would be awesome!
Thanks for pointing me in the right direction. Don't expect much from me.
I'm thinking of making a separate package that would consume a PRAW session to get at those tasty OAuth tokens and then do everything independently from there.
I have no idea what you just said, but if it brings the chat functionality to praw I'd love you forever
Sounds like a great idea.