| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the client's close handle. This was eclipsed by the
`client::bridge::gateway::ShardManager`, which is a public interface
giving full control over connected shards owned by the instance of the
client (as opposed to the purpose of the handle which was a simple
"shutdown" signal).
Additionally, more documentation has been added to
`Client::shard_manager`, now including a sample scenario of how to
shutdown the bot after some amount of time has passed.
Upgrade path:
Refer to the documentation for `Client::shard_manager` on a sample
scenario on how to switch from the close handle to the ShardManager.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Fixes #224
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement Deserialize for `model::event::GatewayEvent` and
`model::event::VoiceEvent`, and derive it for `model::event::Event`.
Due to the natural potential slowness of deserializing into`Event`
(attempting to deserialize into each variant until successful), a
function named `model::event::deserialize_event_with_type` is provided
for quickly deserializing into a known type if the dispatch type is
known.
|
| | |
| |
| |
| |
| |
| | |
Add a `user` method to `Reaction::user`, which retrieves the User who
made the reaction. This will check the cache for the user and, if either
disabled or not found, falls back to hitting the REST API.
|
| | |
| |
| |
| |
| |
| | |
Adds a `channel` method to `model::Reaction`, which retrieves the
channel the reaction was made in from the Cache, falling back to hitting
the REST API if one was not found (or the cache is disabled).
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Documents that the following `model::Reaction` methods hit the REST API:
- `message`
- `users`
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes the following doctests for the changes introduced in commit
[f10b9d7]:
- client::Client::with_framework
- framework::standard::configuration::Configuration::disabled_commands
- framework::standard::configuration::Configuration::dynamic_prefix
[f10b9d7]: f10b9d77f0b94864fa20688e3c99de6cec7ca6f9
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Instead of executing framework commands in the shard runner thread
(potentially blocking the shard runner from reading new messages over
the websocket and heartbeating), dispatch framework commands to the
shard runner's threadpool.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
`ShardManager::public` has been made public to allow direct user
interaction, but should be used with caution due to the fact this can
internally cause an invalid state when used improperly.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Fix the re-exports for `parking_lot::{Mutex, RwLock}` no longer
functioning due to the conditional compilation gate removal
(`parking_lot` is now always compiled).
Tests have been updated to ensure the functionality of these re-exports.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\| |
|
| | | |
|
| | |
| |
| |
| |
| | |
There were a few doctests in the cache module that relied on the client
module, so instead feature-gate the doctests.
|
| | |
| |
| |
| |
| |
| | |
Fixes compilation without the `parking_lot` crate compiled. The prelude
re-exposed `parking_lot`'s `Mutex` and `RwLock`, but didn't do so
conditionally.
|
| | |
| |
| |
| |
| | |
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.
|