Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

The Mold Forms

Compare
Choose a tag to compare
@b1naryth1ef b1naryth1ef released this 10 Oct 01:18
· 381 commits to master since this release

This release marks the first set of solid internal API structures, that at this point are looking to make their way into the final version. There is a lot of random tidbits in here, but most of the important bits are outlined below

Big Changes

Modeling V2.0

The modeling system has been reworked to avoid magic as much as possible, while also providing a better API interface. Generally these changes should be invisible.

CLI Interface and Configuration

The command line interface has been refactored, its now geared much more towards users who want to get up and running with a simple bot quickly. Naturally, the interface was built in such a way that it shouldn't feel clunky or obtrusive to larger bot developers. 99% of users running a bot with discos builtin plugin system will now want to build a configuration file that looks something like:

token: 'MY_BOT_TOKEN'

manhole_enable: true
manhole_bind: localhost:1337

bot:
  levels:
    80351110224678912: owner
  plugins:
    - module.path.to.a.plugin.file
  storage_provider: rocksdb

This configuration can then be loaded, and the bot ran by running:

python -m disco.cli --config config.yaml

Command Changes

Commands now support a basic built-in permissions system, and some of the internal regexing was buffed to enable cool grouping abbreviation. Reloading is now fully supported, and some additional helper functions where added for loading plugins and their configurations. By default, plugin configuration is loaded from the config directory, in the format 'example.yaml' where example is parsed from ExamplePlugin. This release also includes the ability to parse user/role mentions within the argument format string.

Storage

Storage is another big feature of this release, which represents a still WIP interface that is shaping up nicely. The storage features of disco are meant to provide a simple to configure and use interface that gives developers the ability to save and query data. The storage system supports multiple storage providers (right now; memory, disk, rocksdb) and is meant more for ease of use than performance. Large bot developers will likely not want to use this for anything more than a simple key-value store.

ETC

  • Its now possible to listen on both incoming and outgoing gateway packets
  • Fixes/improvements to the state module
  • More API method implementations
  • Added scheduling functionality to plugins