16

In many chat rooms, such as Codenames, there is a bot to moderate the room, or to help update things. How do you create such bots? Do you need to make an account for this bot, and then program something that "runs" the bot? Or is there something on Stack Exchange that can already have bots?

1
9

Well, more or less chats are a terrible terrible hack.

There's no bot API - so for most part, bots replicate what a normal user would do, either through a library that communicates via websockets and/or other means - the JS bot on our chatroom basically talks to a headless browser instance.

Many bot authors prefer a separate user - ideally with 20 points on a suitable site specifically for the bot. You can test on your own account, presumably but I know of a user who set up a js bot and forgot. It was a little embarrassing.The bot's going to be liable to the same sort of rules a regular user would. In a practical sense you're responsible for the bot, even if there's no formal framework

Here's a good start for the ethics of running a bot on SE. Go through the links - stuff like this is critical to know in designing your bot. Talk to the specific chatroom, and make sure folks are ok with your bot being there. On Our chatroom, we actually have a seperate chatroom for bot testing and command settings so it won't annoy folks in the main chatroom. If a bot is more of an annoyance than a help it won't last long.

Ironically, I have no idea about the technical side. Pick a language, get your 20 rep, make a chatroom, and... well hack at it? It might also help to take a look around at existing bots - sobotics has a lovely set of libraries.

Stackapps also has a listing of some (many?) existing bots - if you want to take a look at current implimentations in use.

2
  • One can also test the bot on their own account, then when testings are done, release the bot on a new account. (So the new account isn't as essential as implied here, at least until the final steps) – Shadow The Vaccinated Wizard Jul 26 '18 at 8:37
  • A great many of the bots on the network are a fork of this one, or based on that. There are several different chat libraries available for interacting with chat, in different languages. – Mithical Jul 26 '18 at 8:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .