About DwayneBot

What it is and why it was created.

About

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.

Where to find and how to use DwayneBot
How DwayneBot works
DwayneBot's Privacy Policy

Goals

Stylized screenshot of some of the Bot code.

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:


Feature Goals

  • 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.

Technical Goals

  • 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.

Development History

  • Started working on a bot for my Twitch stream
    Jun 19th, 2020
    It 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.xyz
    Jun 19th, 2020
    Since 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.xyz
    Oct 12th, 2020
  • Brought in parts of the Bot into dwayne.xyz as a library and named it DwayneBot
    Oct 12th, 2020
    As 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 DwayneBot
    Jun 19th, 2021
    Moved 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 did
    Jul 10th, 2021

Next Section

Usage and Availability