| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
Update the default value for each method on the builder, as well as making the
list of default values in the `Default` implementation's documentation
up-to-date.
|
| | |
|
| |
|
|
|
|
| |
Fix the dispatch functionality potentially deadlocking when a deadlock has
occurred elsewhere (or a read/write lock is forever held elsewhere), and log
when it happens, WARNing the user that a possible deadlock has happened.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
When the cache is enabled, don't delay the Ready until all guilds have been
received.
This never really worked in the first place and duplicates the "cached" logic
that fires when all guilds have been received.
This presumably fixes the "silent death" bug, as this appears to stall the
thread on certain conditions.
|
| | |
|
| |
|
|
|
| |
Add more `impl From<T> for Game` implementations, and make `Into<Game>` trait
bounds for all function parameters accepting a Game.
|
| |
|
|
|
|
|
|
|
| |
Move the unit tests into the relevant source files. There's no need for them to
be seprate, especially when the `tests` directory is meant to be for integration
tests.
The deserialization tests that include JSON files are still in the `tests` dir,
along with the public prelude re-export tests.
|
| | |
|
| |
|
|
| |
This method won't exist in v0.6.x.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
- use `?` rather than unwrap
- Remove the `PartialEq<TokenKind> impl; it's not needed anymore.
- Inline `at_end` because why not.
- Split the second part of the while condition as an if inside the body.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Some lints were not resolved due to causing API changes. Most lints in the
framework were left unfixed.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Abstract the implementations for each of Channel's variants' `Mentionable`
implementations by using the underlying impl.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Minimize assumptions that `no_prefix` would work everywhere.
|
| |
|
|
| |
Fixes #339
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Instead, using the structfield is preferred, since that comes from gateway
events directly now anyway.
|
| |
|
|
|
|
| |
Add a method for specifying custom ffmpeg arguments.
Closes #266.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an API for message caching. By default this caches 0 messages per
channel.
This can be customized when instantiating:
```rust
use serenity::cache::{Cache, Settings};
let mut settings = Settings::new();
// Cache 10 messages per channel.
settings.max_messages(10);
let cache = Cache::new_with_settings(settings);
```
After instantiation:
```rust
use serenity::cache::Cache;
let mut cache = Cache::new();
cache.settings_mut().max_messages(10);
```
And during runtime through the global cache:
```rust
use serenity::CACHE;
CACHE.write().settings_mut().max_messages(10);
```
|
| | |
|
| |
|
|
| |
Implements `From<&Id>` for all `Id` types, e.g. `From<&RoleId> for RoleId`.
|
| |
|
|
|
|
| |
Add associated constants to the `utils::Colour` struct for all of the colour
presets. Additionally, deprecate the method equivalents, preferring to use
associated constants instead.
|
| |
|
|
| |
Unicode characters usually span out to more than 1-length. This would cause crashes when they appeared at the end
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit makes the Cache Update API public, allowing users to manually update
the cache, as well as implementing the caching API on their own types to work
with mutating the cache.
The motivation for this indirectly comes from a message cache: if a user has
multiple processes that can receive cache updates (either splitting a bot's
shards into multiple processes or other processes like web panels or pub/sub
channels), then this will allow them to easily mutate the cache and feed all
types implementing the CacheUpdate trait into `Cache::update`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit monomorphizes all functions, turning functions like:
```rust
fn foo<T: Into<Bar>>(baz: T) {
baz = baz.into();
// function here
}
```
Into functions like:
```rust
fn foo<T: Into<Bar>>(baz: T) {
_foo(baz.into())
}
fn _foo(baz: Bar) {
// function here
}
```
This avoids binary bloat and improves build times, by reducing the amount of
code duplication.
|