| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
| |
Update the URI to the logo in the README.
|
| |
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
Add a function to access a copy of the ratelimiting module's internal `OFFSET`
static binding.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
In the utils::is_nsfw function, an input of 'nsfw-' shouldn't return true.
Discord's (previous) NSFW detection classified 'nsfw' and anything starting with
'nsfw-' - but not including - as NSFW.
|
| |
|
|
|
|
|
|
|
| |
Removes string slicing on the input string, instead preferring to count chars
and work off that information.
Fixes channel names with unicode such as `général`.
Fixes #342.
|
| |
|
|
|
|
|
|
| |
Make the `guild` structfield on `Invite` and `RichInvite` optional.
This was done due to a change in the [docs].
[docs]: https://github.com/discordapp/discord-api-docs/commit/bc0a15bd11db72644633080903171fbc3e71b026
|
| | |
|
| |
|
|
| |
The inline aspect must be always provided.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
- Do not be lazy and DO add an example for the `_*` methods.
- Reorganize the methods so they're more coherent.
- Use the `rest` method than to rely on deref (which in turn relies on `full`).
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
Provide help-details for all visible commands
|
| | | |
|
| | | |
|
| |/ |
|
| |
|
|
|
|
| |
this allows stateless bots to drop the need for a channel->guild mapping
(cherry picked from commit 74bb8fa5a3b4b5fd43559866b4627bf09484f6ae)
|
| |
|
|
|
|
|
|
|
|
| |
Originally we had `ban_zeyla` as an april fools joke. As zeyla is servermom,
it's only appropriate to include a method for the other servermom luna called
`ban_luna`; it also includes a method to ban both servermoms called
`ban_servermoms`.
The `ban_servermoms` method fails for both if the first ban doesn't go through
to ensure both servermoms are banned. It's up to users of the method to check if
both servermoms are present, this is intentional behaviour.
|
| | |
|