| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
The context is now strictly in relation to the context of the current
channel related to the event, if any. See Context::say for a list of
events that the context can be used for.
|
| |
|
|
|
| |
The endpoint to create a role no longer returns an empty role which
must be PATCHed, and can be completed in the initial request.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
The struct only has one field (`value`) anyway.
|
| | |
|
| | |
|
| |
|
|
| |
Resume doesn't have a heartbeat_interval, so don't try to decode it.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
If the avatar hash begins with "a_", then the avatar is animated and is
a GIF. Otherwise, use WEBP.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Abstract the logic from simply `Event::decode` and `VoiceEvent::decode`
to each individual event variant struct, in the form of associated
`decode` functions.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Instead of mentioning the channel, role, or user on an Id display
format, format its inner u64 instead. Instead, use `Id::mention()` to
accomplish the equivilant.
|
| |
|
|
|
| |
User::avatar_url was formatting the user's Id as a mention, rather than
the inner u64.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement command groups
* change to ref mut
* Implement framework API.
* Remove commands field
* Make it all work
* Make example use command groups
* Requested changes
* Implement adding buckets
* Add ratelimit check function
* Finish everything
* Fix voice example
* Actually fix it
* Fix doc tests
* Switch to result
* Savage examples
* Fix docs
* Fixes
* Accidental push
* 👀
* Fix an example
* fix some example
* Small cleanup
* Abstract ratelimit bucket logic
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds multiple configurations to the command builder, and adds methods
to various structs.
Context::get_current_user is a shortcut to retrieve the current user
from the cache.
Message::get_member retrieves the member object of the message, if sent
in a guild. Message::is_private checks if the message was sent in a
Group or PrivateChannel.
User::member retrieves the user's member object in a guild by Id;
Adds 6 configurations to the command builder:
- dm_only: whether the command can only be used in direct messages;
- guild_only: whether the command can only be used in guilds;
- help_available: whether the command should be displayed in the help
list;
- max_args: specify the maximum number of arguments a command must be
given;
- min_args: specify the minimum number of arguments a command must be
given;
- required_permissions: the permissions a member must have to be able
to use the command;
|
| |
|
|
| |
Additionally, flag imports behind feature flags to avoid unused imports.
|
| | |
|
| |
|
| |
This breaks compatibility with < 1.13, but we didn't support that anyway.
|
| |
|
|
|
| |
Add EmojiIdentifier, allow User, UserId, Role, RoleId, EmojiIdentifier,
Channel and ChannelId to be used as arguments for commands and add more
parsing functions to utils
|
| |
|
|
|
| |
Remove the obsolete Mention struct as well as related methods, improve
the way mentioning works, fix the message builder, add a test for all
this.
|
| |
|
|
|
| |
Add more documentation to most of the Context methods, also clarifying
which permission/s are required for each method.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Add a colour method to retrieve the member's top role with a unique
colour, or the default colour if none can be applied.
|
| |
|
|
|
|
|
|
|
| |
Roles can now be compared directly. This is a heirarchy check.
This checks the following between two roles, A and B:
- A's position is greater than B;
- if not, then A's Id is greater than B;
if these two conditions are false, then B is greater than A. If the two
conditions are both true, then they are of equivilance.
|