Back in 2000 you could use this utility to connect to Battle.net, choose a channel, and chat with everyone. Today the connection is refused. Presumably they have changed the protocol or disallowed public bots.

It wasn't very sophisticated, but it got the job done.

There were a lot of Battle.net chat bots created for Windows and Mac OS, but it's not clear whether they still work today either. If you're on Windows, give Xbot a try; it seems to be the most recently updated (2005).