* Easily use multiple prefixes... Now onto programmatic fetching and conquering the world!
* Updated a test and added some documentation.
Now someone just needs to find a way to transition into multiple prefixes...
* Allow bots to be run without access to the console.
This is going to allow for custom prefix-getters :D
* Fix flake8's innate hate of monkey patching.
* Documentation!
No idea how to make tests for this...
* Python 2 compatibility is basically impossible.
Implicit Relative Imports ruin the day here (`import logging`) and so why not ruin Python 2's day with type hinting?
* And it's done!
Python 2 **can** keep using disco, because `disco.util.runner`
shouldn't be automatically imported.
Changelog:
+ Added two keys to the config.
`commands_prefix_getter`
`commands_prefix`
+ Added documentation.
+ Added a new utility file, `disco.util.runner`
* nekoka.tt code review (github.com/nekocatt)
Some of the stuff edited (`disco.util.config.Config`) are not within the scope of this PR, but `disco.util.runner.create_bot` makes it easier to mess up.
(also, if lines 414 to 417 are premature optimization, that's all me)
* Undo the change to `disco.util.config.Config`.
There is probably a way to do this, but that's topic of a different PR.
* remove unused import
* Python 2 Compatibility
* Move `disco.util.runner.py` to another PR
* b1nzy code review
* fix tests
* stop being dumb
* Remove unintuitive behaviour.
Previously, if you had `{@mention} {prefix}{command}`, `require_mention` was set to `True`, and `prefixes` were set to anything, then the command framework would look for a command named `{prefix}{command}`. However, this specific grouping of settings would not be chosen unless the bot creator wanted the command framework to look for `{command}`.
tl;dr settings weren't being respected
Co-authored-by: Andrei Zbikowski <[email protected]>
Disco is a simple, clean and extendable library for the Discord API. Disco is built and aimed at developers looking to quickly start building bots that can be grown and extended to live on thousands of servers, and have immense functionality. To facilitate this, Disco provides a clean and simple interface which gets out of the way, but never sacrifices functionality. Disco is actively used by the staff at Discord to help us build and test Discord.
Stability
Disco is still a relatively young library, and as such it bears the "alpha" tag. For the most part, this means that while the general API and functionality may change or vary from version to version, the core concepts and features shouldn't diverge much. A benefit of this comes in the form of bleeding edge features and support for the latest Discord version.
Highlights
Expressive, Idiomatic, and Functional - the API interface stays out of our way, while giving you the required power
Performant and Efficient - allowing you to build bots that operate on many thousands of servers, without manual sharding
Modular and Extendable - take only the bits you need to build what you want, while being able to add or remove functionality by installing packages
Python 2.x/3.x Support - build integrations with the version of Python you need to