I'd like to build a Bot using the Chat function.
Similar to the Bots for various Chat apps, not specifically for playing Poker.
Is there any function which listens to and/or records what is said in the Chat Box
which I could use for scanning for Keywords and subsequent text/commands?
Chat commands
Re: Chat commands
I'm also looking for people who have the coding skills to do such a thing.
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Chat commands
There is for the Lobby chat. See "Lobby chat event" and "Lobby chat event regex" in the Callback Events group on the System tab. That system was designed so that players could enter custom commands such as staking other players, getting bitcoin prices, etc. (all coded by the site operator).social wrote:Is there any function which listens to and/or records what is said in the Chat Box
which I could use for scanning for Keywords and subsequent text/commands?
Re: Chat commands
OK, I read the section on callbacks: http://prntscr.com/dfbc5gKent Briggs wrote:There is for the Lobby chat. See "Lobby chat event" and "Lobby chat event regex" in the Callback Events group on the System tab. That system was designed so that players could enter custom commands such as staking other players, getting bitcoin prices, etc. (all coded by the site operator).social wrote:Is there any function which listens to and/or records what is said in the Chat Box
which I could use for scanning for Keywords and subsequent text/commands?
This will send commands to *my* server when certain phrases are triggered.
However, I don't understand how to get my server's replies to those callbacks into the Poker Mavens chat, or the client in general.
-
- Posts: 38
- Joined: Sun Mar 01, 2015 4:20 pm
Re: Chat commands
You can have an Admin message triggered via the API with something SystemLobbyMessage, RingGamesMessage and TournamentsMessage. So when the callback happens on your server, it would send the reply via one/all of these messages back to the client and they would show up in chat
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Chat commands
harrythree has it correct. The callback will execute your code (typically a PHP script on your own web site), and pass in the parameters of the chat just entered. Your code will process that however you want. If you then want to send a message back to the players, your script would make the applicable API call. Such as SystemLobbyMessage which will put a message right in the Lobby chat. You can see some sample callback code on the API Examples page:social wrote:However, I don't understand how to get my server's replies to those callbacks into the Poker Mavens chat, or the client in general.
http://www.briggsoft.com/docs/pmavens/A ... m#callback