| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
|
|
|
|
| |
The voice module required the cache feature in order to access the
current user's Id. Instead, just copy the Id into the VoiceManager and
distribute it from there -- the memory impact will be very minimal in
comparison to the benefits of not needing to constantly unlock the Cache
and not needing the user to be forced to use the Cache.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
| |
The height and width fields for embed images and thumbnails can not be
set - whereas originally there may have been plans to - so deprecate
them and remove in v0.3.0.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Add a command builder, which can take arguments such as multiple checks,
quoted arguments, and multiple prefix support, as well as dynamic
prefixes per context.
|
| | |
|
| |
|
| |
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.
|
| |
|
|
|
|
|
|
| |
The context now exposes, through the Client, a `data` field, which can
be accessed safely across contexts. This allows for a custom "shared
state" without the need for (ab)using lazy-static.rs.
Refer to example 06 for an example on how to use shared data.
|
| |
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
The Colour value defaulted to 0x0; this is incorrect, as Discord's
default colour value is actually 0x99AAB5.
|
| | |
|
| |
|
|
|
| |
The distinct method concatenates the user's name and discriminator by
the hash (`#`) symbol.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
If a user account changes their profile settings, they'll receive a new
token; update the locally stored token for REST requests with this
token.
Additionally, the `Context::edit_profile` does not need mutability over
self.
Fixes #25.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Paginate the rest::get_guilds endpoint, which can be used to retrieve
the guilds after-or-before a certain guild's Id, with a limit of results
to return (100 is the max).
Example usage:
```rs
use serenity::client::rest::GuildPagination;
let target = GuildPagination::After(GuildId(81384788765712384));
let guilds = context.get_guilds(target, 50);
```
Additionally, add a method of `CurrentUser::guilds()`, to retrieve the
current user's guilds. A limit of 100 is set, as (most) users can not be
in more than 100 guilds.
|
| |
|
|
|
|
| |
Commands should be dispatched more quickly with this patch. This brings
down a (locally-tested) average "ping" command response from 278ms to
67ms.
|
| |
|
|
|
|
|
| |
Searches the Cache for the Id of the guild that the message was posted
to - if any - and if the guild and channel data are cached.
Requires the `cache` and `method` feature flags be enabled.
|
| | |
|
| | |
|
| | |
|