Browse Source
* 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]>staging/v1.0.0
committed by
Andrei Zbikowski
4 changed files with 67 additions and 10 deletions
Loading…
Reference in new issue