| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| | |
Documents that the following `model::Reaction` methods hit the REST API:
- `message`
- `users`
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\| |
|
| | | |
|
| | |
| |
| |
| |
| | |
There were a few doctests in the cache module that relied on the client
module, so instead feature-gate the doctests.
|
| | |
| |
| |
| |
| | |
The names of environment variable tokens in the examples differed, so
this makes them all use the same name.
|
| | |
| |
| |
| |
| |
| | |
Fixes what is realistically a bug where `Member::permissions` would
retrieve the permissions for the Member in the default channel of the
guild. This now only returns the guild-level permissions of the member.
|
| | |
| |
| |
| |
| |
| | |
Rename `Guild::permissions_for` to `Guild::permissions_in`, deprecating
`Guild::permissions_for` which is only an inline method to
`permissions_in`.
|
| | |
| |
| |
| |
| |
| | |
Make `Guild`'s internal method `has_perms` go through
`Guild::member_permissions` to check permissions, since all method that
use it don't need channel-specific permissions.
|
| | |
| |
| |
| |
| |
| | |
Add a method on the Guild for calculating only a member's guild-only
permissions, not including the permissions for either the default
channel or any specific channel.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The client now returns a Result in preparation of a future commit.
Upgrade path:
Handle the case of an error via pattern matching, or unwrap the Result.
|
| | | |
|
| | | |
|
| | | |
|
| |\ \ |
|
| | |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix the return value of the function by properly checking whether the
user has the role in the given guild.
The function made the erraneous mistake of simply checking if the given
guild had the role by Id, not whether the _member in the given guild_
had the role by Id.
|
| | |
| |
| |
| |
| |
| |
| | |
* If a guild's emojis are being altered, Serenity will straight up use the new `HashMap` instead of just extending.
If `connect()` returns an `Err`, it will retry connecting.
Cleaned up `help_command.rs`.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some methods on `model::Channel` are only for text channels. Methods on
Channel should be applicable to all channel types.
Deprecates the following methods on `model::Channel`:
- `create_reaction`
- `delete_message`
- `delete_reaction`
- `edit_message`
- `message`
- `messages`
- `reaction_users`
- `say`
- `send_files`
- `send_message`
- `unpin`
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
It was voted that the `on_` prefix is unnecessary, so these have been
dropped.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the `field` and `fields` methods on `builder::CreateEmbed` to not
accept a `CreateEmbedField` builder.
The embed field builder realistically only had (and most likely, only
will) have one optional argument, so the parameters may as well be on
`CreateEmbed::field`.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Builders would keep a `serde_json::Map<String, Value>`, which would
require re-creating owned strings for the same parameter multiple times
in some cases, depending on builder defaults and keying strategies.
This commit uses a `std::collections::HashMap<&'static str, Value>`
internally, and moves over values to a `serde_json::Map<String, Value>`
when it comes time to sending them to the appropriate `http` module
function.
This saves the number of heap-allocated string creations on most
builders, with specific performance increase on `builder::CreateMessage`
and `builder::CreateEmbed` & co.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When Discord adds new features, the Feature enum will not be able to
serialize the new values until updated, causing the entire Guild
deserialization to fail.
Due to the fact that these features can be added at any time, the
`features` vector on Guild and PartialGuild have been changed to be a
`Vec<String>`.
Upgrade path:
Instead of matching on variants of Feature like so:
```rust
use serenity::model::Feature;
for feature in guild.features {
if feature == Feature::VipRegions {
// do work with this info
}
}
```
Instead opt to check the string name of the feature:
```rust
for feature in guild.features {
if feature == "VIP_REGIONS" {
// do work with this info
}
}
```
|
| |\| |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
`members_containing` and `members_starting_with` (#184)
|
| | | |
|
| | | |
|
| | | |
|