| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Fixes #712
|
| |
|
|
|
| |
Some clever nicknames or role names would lead themselves to
resolving to pings.
|
| |
|
|
|
|
|
|
| |
In some cases, the Discord provided role_mentions and mentions array
would be empty, such as wrapping a mention with a backtick or
other frivolous characters. Since we want to completely nullify
mentions, we should not rely on the Discord provided arrays and instead
use and resolve the IDs from the content itself.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The old code for some reason assumed that the length of the command
would be 1. This is because when I tested this I would use single
letter command names and it would "just work" when in reality it was
completely incorrect.
A reminder to thoroughly test instead of just fitting something to work
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
When unloading cogs, currently we do not remove submodules from
sys.modules, meaning they will not be reloaded. Removing here
makes new imports reload from file. Of course, any already imported
modules will still hold a reference to the old module, since they
will not re-import it, and will not be forcably unloaded.
|
| |
|
|
|
|
| |
unload_extension would incorrectly unload cogs/listeners
of other extensions if the name of one was a prefix of
another.
|
| |
|
| |
remove_cog always returns None, even if the cog is found.
|
| | |
|
| |
|
|
|
| |
It was annoying when commands would have a keyword-only argument
named 'command', such as a help command or a disable command.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Previously, Context.command was not guaranteed to be the actual command
being checked if it can run. This could be troublesome when
implementing help commands or when using the default help command.
This new change allows at least for the guarantee that Context.command
to be technically correct in Command.can_run.
|
| |
|
|
|
|
|
| |
There is a counterpart for this in cogs, called __global_check_once.
This allows for predicates that would filter a command globally that
do not necessarily require rechecking in the case of e.g. the help
command such as blocking users or blocking channels.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
That way you don't need to have, e.g. Foo and FooConverter and can
do it inline via Foo instead.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Context.reinvoke would be the new way to bypass checks and cooldowns.
However, with its addition comes a change in the invocation order of
checks, callbacks, and cooldowns. While previously cooldowns would
trigger after command argument parsing, the new behaviour parses
cooldowns before command argument parsing.
The implication of this change is that Context.args and Context.kwargs
will no longer be filled properly.
|
| |
|
|
|
|
| |
When used, it would be set to False after the invoke was done. Ideally
it should report to False during invoke but True during any error
case.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Along with this change comes with the removal of Converter.prepare and
adding two arguments to Converter.convert, the context and the argument.
I suppose an added benefit is that you don't have to do attribute
access since it's a local variable.
|
| | |
|
| |
|
|
|
| |
They now have Context as the first argument to be consistent with other
context-passing functions.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This will allow it to work in mobile clients which don't respect the
<@!id> format in case of nicknames.
|
| |
|
|
|
|
|
|
|
| |
Internally, instead of using module objects just use the `__module__`
attribute which is the same thing. From preliminary testing this seems
to work fine with both regular one-file-per-cog approaches and the
folder cog approach.
Fixes #126.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This is a breaking change. The original purpose of no_pm has been
mainly a legacy aspect. They came from a time before checks were a
generalised concept and were never removed. A check is the proper way
to do its behaviour.
|
| |
|
|
|
|
|
|
|
| |
This should prevent asyncio.CancelledError from being propagated more
and suppressed "Task was destroyed but was pending!" warnings when
doing graceful closes outside of using a KeyboardInterrupt.
To make clean up a bit more robust, also add signal handlers
for POSIX systems.
|
| | |
|
| |
|
|
| |
This replaces HelpFormatter.get_command_signature for the most part.
|
| |
|
|
|
| |
Self-explanatory. This should help create help commands for a cog
more easily.
|
| |
|
|
|
| |
This is a breaking change as GroupMixin.commands now returns a set
of unique Command objects.
|
| | |
|
| | |
|
| | |
|
| | |
|