What it is and why it was created.
DwayneBot is a chat bot app and service I built. It exists inside this web server, and integrates with different internal and external chat rooms and web pages. It was designed to understand when it's being asked to do something, do it, and respond with the results.
The things it can do include looking up Wikipedia articles, translating text, recalling chat logs, searching Twitter, looking up weather, and a lot more. The places it can connect to include Twitch, YouTube Live, IRC, Matrix, and chat rooms here at Dwayne.xyz.
I designed and wrote every line of DwayneBot myself, so I created these pages to describe all the work I did. Use the sidebar on the left (or using the menu button on mobile) to see the other sections.
DwayneBot started as a simple chat bot for Twitch, and then grew into one of the biggest software projects I've built. Here were the goals I had in mind while created it:
- It should work at least as well as existing popular chat bots that are used to manage Twitch, YouTube Live, or other live stream chat rooms, like Nightbot, StreamElements Chatbot, or PhantomBot.
- It should exist in one central, managable place but connect to many different chat rooms.
- It should integrate with HTML-based chats, like the WebSocket-based chats on this website, and text-only chats like IRC.
- It should take advantage of the many features and services I've built into this web server over the years.
- It should understand both "commands", which are single words prefixed with a character, and natural language (NLP).
- It should be able to both combine multiple responses from one user asking more than one thing at once, and combine responses from multiple users asking for the same thing.
- It should safely handle authentication for sensitive actions (like controlling my music or lights) or moderation (kicking and banning users) using a combination of the existing Dwayne.xyz account system and a "trust" system that extends to instances like Twitch or IRC.
- It should be secure, efficient, and scale to a high level of traffic.
- It should be adaptive to different modes (text, HTML, syncronous, asyncronous, etc) and configurations.
- It should be able to change (and report on) its configuration or mood in real time per Instance.
- It should be completely managable from the dwayne.xyz admin section, including viewing all active Instances and invoking Actions in any of them.
- It should safely handle authentication in trusted and untrusted rooms.
- The Bridge App (that connects the Bot to all external rooms/channels like IRC or Twitch) should gracefully handle web app deployment or server restarts and report status separately from the Bot itself.
Started working on a bot for my Twitch streamJun 19th, 2020It lived in its own Go app and made a connection to Twitch, and API calls to dwayne.xyz. Since Twitch chats work like IRC channels, the Bot supported IRC from the start.
Installed an IRC server at dwayne.xyzJun 19th, 2020Since I had an IRC bot, I decided to install an IRC server for testing and whatever else I wanted.
Added 1-1 video/audio/text chat to dwayne.xyzOct 12th, 2020
Brought in parts of the Bot into dwayne.xyz as a library and named it DwayneBotOct 12th, 2020As soon as I had chat working in the 1-1 rooms, I wanted DwayneBot to be available there. I also added a web page for directly asking it a question.
Rewrote DwayneBotJun 19th, 2021Moved it completely into dwayne.xyz, added sync and async modes, memory/storage, HTML output, an API endpoint, lots of new capabilities, etc.
Created these pages to explain what I didJul 10th, 2021