/assyst2

Assyst Discord Bot 2.0 rewrite

Primary LanguageRustMIT LicenseMIT

Assyst

Discord GitHub Discord Bots Discord Bots

Assyst is a multi-purpose Discord bot with a focus on image processing and manipulation, custom commands via a tag parser, and other unique features. A more detailed overview of the Assyst feature-set can be located on the Top.gg listing page for Assyst.

Assyst is powered by a custom image editing service called Flux. Flux is available here. It provides image and video editing features via the command-line, and is a submodule of this repository in order to facilitate single-step deploys. Refer to the Flux README for more information.

Assyst is split into a number of separate crates, as described below.

Binaries

  • assyst-core: Main command-handling process. Also contains logic for the parsing of message-based commands.
  • assyst-gateway: Connects to the Discord WebSocket gateway to receive messages, which are then forwarded to assyst-core for processing.
  • assyst-cache: Independent cache process designed to hold some caching information.

Libraries

  • assyst-common: Utilities, structures, and functions shared throughout the entire Assyst ecosystem.
  • assyst-tag: Tag parser and handler.
  • assyst-database: Interfaces with PostgreSQL, for database purposes.
  • assyst-webserver: Web server designed to handle webhooking, such as vote processing for Discord bot list websites, as well as Prometheus metrics.
  • assyst-proc-macro: General purpose procedural macros (currently just a macro for command setup)
  • assyst-flux-iface: Basic wrapper over Flux for ease of use.
  • assyst-string-fmt: String parsing and formatting utilities.

Note: assyst-core will likely be split into more, smaller, crates in the future.

For more information on each crate, refer to the README.md file for the crate.

Each binary is ran as an independent process on the same host machine. Each binary communicates through the use of Unix-like pipes. For more information, please refer to the README.md file for the relevant crate.

Contributing

All contributions - both issues and pull requests - are greatly appreciated. Contributions are done on a fairly loose basis. The easiest way to begin contributing is to first understand the structure of Assyst - this can be done initially by understanding all individual crates by reading their READMEs. If you have any questions, feel free to open an issue. All issues are free to be tackled by anyone.

Self-hosting

Self-hosting is not yet supported for this version of Assyst, since it is not yet considered production-ready. Self-hosting may be supported with release 1.0.0.
However, for completeness, the entire tech stack of Assyst is as follows:

  • Rust, as well as Cargo for building.
  • PostgreSQL. Database format TBA.
  • Flux, which has its own set of requirements
  • youtube-dlp
  • fake-eval service (currently closed source).
  • CDN (filer) service (currently closed course).
  • nginx, for top.gg and prometheus webserver.
  • Optionally, Grafana and Prometheus for graphs and logging. A template for this may be made available eventually. If you would like it, open an issue.

Acknowledgements

Special thanks to y21 and Mina for their invaluable help and contributions towards this version of Assyst.
Thank you to the team developing cobalt.tools for creating such a versatile and easy-to-use downloading tool.
Thank you to the countless developers of the libraries and programs powering both Assyst and Flux, in particular:

  • Tokio - the asynchronous runtime that Assyst uses,
  • Twilight - the Discord API library that Assyst communicates to Discord with,
  • Image - the primary library providing image decoding, encoding, and editing functionality to Flux,
  • FFmpeg - simply the best multimedia processing tool ever made,
  • gegl - providing a bunch of handy image manipulation tools.