Project:Discord Bot Improvements: Difference between revisions

From DisNCord Community Wiki
Jump to navigation Jump to search
Kraaabs (talk | contribs)
Initial TODO for the bot situation on DisNCord ~Sarah
 
Kraaabs (talk | contribs)
mNo edit summary
Line 22: Line 22:
# Grab embeds for messages as well (maybe embed them in the JSON log format as base64?)
# Grab embeds for messages as well (maybe embed them in the JSON log format as base64?)
# Containerize it! (see below)
# Containerize it! (see below)
# MediaWiki companion bot to upload images/automatically create pages
# MediaWiki companion bot to upload images/automatically create pages ([https://github.com/barrust/mediawiki it seems there are mature Python bindings for the MediaWiki API])
# Whatever else I forgot (I'm sure I'll add more as I go)
# Whatever else I forgot (I'm sure I'll add more as I go)



Revision as of 16:42, 2 January 2023

This is a general TODO area for improvements to the bot situation on DisNCord. Contact User:Kraaabs (Krabs#0571 on Discord) with comments/concerns/suggestions!

Better Discord logging

As it stands, the wiki discussion logs (such as Lotus Notes and Taligent Shenanigans Log or SoylentNews History Log) are manually copied and pasted before being either run through a script to convert them to WikiText, or manually formatted by hand. This approach has a few drawbacks:

  1. Things are easily missed
    1. Discord is... inconsistent when copy pasting large amounts of messages. The infinite scroll implementation in the client is fairly aggressive, and it leads to messages getting booted from the selection buffer sometimes, without anyone noticing.
  2. Manual labour
    1. The process right now is mostly manual. This gets tedious when there are large logs to be converted, or more than one log at once.
    2. Logs with images (such as Lotus Notes and Taligent Shenanigans Log) need to have their images manually downloaded, uploaded to the wiki, and embedded. That's a pain.
  3. Formatting
    1. Copy pasting logs isn't perfect. There isn't enough metadata to properly automate formatting of things like link embeds.

User:Kraaabs has written (most of) a Discord bot that can record messages to a few formats, including WikiText. After some cleanup and feature additions, it should be well suited to the task.

Raconteur TODO

  1. Better document the code, and open the repository up to the public
  2. See about using user permissions for the bot, rather than any moderator permissions
  3. Flesh out retroactive logging (in addition to the proactive logging already implemented)
  4. Grab embeds for messages as well (maybe embed them in the JSON log format as base64?)
  5. Containerize it! (see below)
  6. MediaWiki companion bot to upload images/automatically create pages (it seems there are mature Python bindings for the MediaWiki API)
  7. Whatever else I forgot (I'm sure I'll add more as I go)

Modmail/Ticketing

Currently, DisNCord doesn't have any formal modmail or ticketing for moderator concerns. Specific concerns are handled by direct messaging moderators, and communicating in the #mod-discussion channel, with User:NCommander having the final say. This may not scale well as the server continues to grow, so a proper modmail or ticketing system would be beneficial. If you have other suggestions for ticketing bots, or experience using any of these, contact User:Kraaabs (Krabs#0571 on Discord) with your thoughts!

Current proposed candidates:

discord-mod-mail

Pros

  • Extremely simple codebase
  • Sirocyl has experience with it
  • Already dockerized
  • Looks easily hackable if needed

Cons

  • Uses old-style prefixed bot commands (not necessarily a con per-se)
  • No formal role-locking -- relies on channel visibility

Ticket Tool

Pros

  • Appears very robust feature-wise
  • Comes with a handy dashboard
  • Seemingly scales well

Cons

  • The free version is rate-limited (although I don't think we'll hit the limit)
  • Features such as DM support are locked behind a paywall

Tickets

Pros

  • Similar feature set to Ticket Tool
  • Allows multiple support teams
  • Similar to Ticket Tool, used on many many servers already

Cons

  • Again, some features are paywalled

Bot Infrastructure

The thing about Discord bots is that you need to host them, of course. Ideally, for ease of management, all bots would be hosted on Restless Systems infrastructure, using Docker containers.

TODO

  1. Do we need a separate VPS for bots? Or will we host on the wiki infra?
  2. Are all the bots we want to host Dockerized already? Or do we need to make our own containers?
  3. How will we manage the containers? Manually, or with something like K8s?
  4. If we want to do auto-updates (we probably do) how will we accomplish this?
    1. User:NCommander had suggested to me that we could use GitHub/GitLab actions. If we go this route, we would likely have to mirror any bots we're using in our own GitHub/GitLab project. This could pose a problem with the proprietary bots though...
  5. For consistency's sake, are we going to re-containerize everything to use the same OS inside the containers, if they aren't already? (I doubt all of the bot authors involved are using the same OS)