| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way the command cooldown works is using a windowed way of doing it.
That is, if we have a cooldown of 2 commands every 30 seconds then if we
do a single command, we have 30 seconds to do the second command or else
we will get rate limited. This more or less matches the common
expectations on how cooldowns should be.
These cooldowns can be bucketed up to a single dimension of depth for
a per-user, per-guild, or per-channel basis. Of course, a global bucket
is also provided. These cannot be mixed, e.g. no per-channel per-user
cooldowns.
When a command cooldown is triggered, the error handlers will receive a
an exception of type CommandOnCooldown with proper information regarding
the cooldown such as retry_after and the bucket information itself.
|
| |
|
|
|
|
|
|
|
|
|
| |
This is for exceptions that are inherently based on user errors and not
permission based. e.g. passing incorrect number of arguments, too many
arguments, or an invalid argument. CommandNotFound is not classified
under this since it isn't inherently a user input error in all cases.
Some invalid commands can simply be due to an odd bot prefix. It would
also diminish the usefulness of the new parent class if CommandNotFound
was included.
|
| |
|
|
| |
Generalised unpacking is 3.5 only.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also demote is_private to a property instead of a slot.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The first batch of changes are related to channel types and group
direct messages. Support these first so READY begins parsing.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This change allows users to more easily create their own formatters
without having to reinvent the pagination logic themselves. Hopefully
this makes it less of a pain for people to create custom help pages.
|
| |
|
|
| |
Fixes #250.
|
| |
|
|
|
| |
I was referencing a member function that did not actually exist. So I
ported it over to a free function that could be used.
|
| |
|
|
| |
There are some badlets out there that apparently violate PEP-8.
|
| |
|
|
|
| |
This is for cases where the command has been removed already. This will
make the function have a somewhat no exception guarantee.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This was a two-fold problem. The first of which involved the overwriting
of members during a GUILD_SYNC. Since we are requesting a chunk anyway,
we have all the member references we need without actually chunking. The
second problem came from the order. We were doing a GUILD_SYNC and then
doing the chunking requests. We should do the GUILD_SYNC after the
chunking in order to just update presences.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
I didn't end up refactoring this piece of work out.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This allows users to implement converters that work similar to the ones
special cased by the `discord` classes.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This was due to an AttributeError occurring when getting the guild_id
from the channel. PrivateChannels do not have guild_ids so they should
be None.
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows you to strictly require a number of arguments. The default
behaviour in this case is still `True`, since it would be a breaking
change otherwise and is a sane default. However if someone would want
to set this to `False`, they would receive an exception of type
`TooManyArguments` if too many arguments are passed to a command.
Hopefully this removes the uses of `ctx.message.content == 'stuff'`
inside commands.
|
| | |
|
| |
|
|
|
|
|
| |
Global checks are checks that are executed before regular per-command
checks except done to every command that the bot has registered. This
allows you to have checks that apply to every command without having to
override `on_message` or appending the check to every single command.
|
| |
|
|
|
| |
This includes things like `Bot.say`, `Bot.upload`, `Bot.whisper`,
and `Bot.reply`.
|
| | |
|
| |
|
|
|
|
| |
This includes `Client.pin_message`, `Client.unpin_message` and
`Client.pins_from`. This also adds the `Message.pinned` attribute
to the `Message` object.
|
| |
|
|
| |
Forgot a keyword argument.
|