Plan 9 user builds a Discord bridge so you can chat from 9front

What happened
Stuck with colleagues who insist on Discord? You're not alone. A Plan 9 (9front) user has published a small "discord bot" that lets you send and receive messages from Discord while running entirely on a 9front machine. It has been reported that the project β a handful of scripts plus a Go program β includes a precompiled binary for 9front amd64 and a short how-to for getting started.
How it works
The setup is simple glue, not a full client. The Go program is the only component that speaks to Discord; the surrounding rc scripts present chats as files and pipes inside the usual Plan 9 layout. Start the server with discordsrv YOURTOKEN and it will post a pipe at /srv/discordfront. Incoming lines are reformatted by a helper and written to $home/lib/discord/logs/$serverName/$channelName, while the discord script tails the logfile and writes outgoing messages into the pipe. Want everything in acme? Run discordacme to open a channels file and spawn chat windows. Handy, low-tech, and very Plan 9.
Usage and caveats
You must first create a Discord bot and get its token β it has been reported that the author found that step more confusing than the coding itself β then invite the bot to your server. The bridge does not fetch previous messages, so the author recommends running discordsrv on a machine that's always online and using rimport to expose the logs to your local workstation. The blog includes an example rc startup snippet that rimports /srv and the discord lib and then launches discordacme.
Bottom line
This is not a polished, feature-complete client. The author admits the script names "suck", functionality is limited, and testing is light. But for Plan 9 purists who refuse to give up acme β and for anyone who wants to poke a hole through Discord's cozy garden β it's a pragmatic, do-it-yourself bridge that gets the job done. Who said old-school OSes can't talk to the modern web?
Sources: pmikkelsen.com, Lobsters
Comments