| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Some lints were not resolved due to causing API changes. Most lints in the
framework were left unfixed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
| |
Fix broken links caused by the `model` module changes in v0.5.0, which
split up the module into sub-modules for better organization.
|
| |
|
|
|
|
|
|
|
|
| |
Adds an animated structfield to `Emoji` and `ReactionType`'s `Custom`
variant, which defaults to false if not present.
A test has been added for deserializing it, taken from a REST API GET
Emojis response.
(cherry picked from commit 5286949f424e824784344ebb7b7af4e52fb819c3)
|
| | |
|
| |
|
|
|
| |
Fix clippy lints and subsequently accept references for more function
parameters.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `model` module has historically been one giant module re-exporting
all of the model types, which is somewhere around 100 types. This can be
a lot to look at for a new user and somewhat overwhelming, especially
with a large number of fine-grained imports from the module.
The module is now neatly split up into submodules, mostly like it has
been internally since the early versions of the library. The submodules
are:
- application
- channel
- error
- event
- gateway
- guild
- id
- invite
- misc
- permissions
- prelude
- user
- voice
- webhook
Each submodule contains types that are "owned" by the module. For
example, the `guild` submodule contains, but not limited to, Emoji,
AuditLogsEntry, Role, and Member. `channel` contains, but not limited
to, Attachment, Embed, Message, and Reaction.
Upgrade path:
Instead of glob importing the models via `use serenity::model::*;`,
instead glob import via the prelude:
```rust
use serenity::model::prelude::*;
```
Instead of importing from the root model module:
```rust
use serenity::model::{Guild, Message, OnlineStatus, Role, User};
```
instead import from the submodules like so:
```rust
use serenity::model::channel::Message;
use serenity::model::guild::{Guild, Role};
use serenity::model::user::{OnlineStatus, User};
```
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Makes the compiliation time just a bit worse
|
| |
|
|
| |
Fixes #168
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Also not quite sure if they goofed rustfmt or something, but its changes it did were a bit bizarre.
|
| | |
|
| | |
|
| |
|
|
| |
This commit does NOT interfere with the "accept Display" change to the builder
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Allow `push` and `push_safe` to use a flexible syntax for formatting.
|
| |
|
|
|
|
| |
Add new methods to MessageBuilder to push content similar to the other
methods, except with the addition of appending a newline afterwards.
This should help prettify some MessageBuilder usage.
|
| |
|
|
|
| |
Add examples to some functions, and update some of the old examples to
use the `?` operator instead of unwrapping.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Instead of mentioning the channel, role, or user on an Id display
format, format its inner u64 instead. Instead, use `Id::mention()` to
accomplish the equivilant.
|
| | |
|
| | |
|
| |
|
|
|
| |
Add documentation for some missing methods - such as Game methods - and
add more methods to the Message Builder.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert all of the non-named anchors in docs to named anchors.
Example:
```md
Kicks a [`Member`](../model/struct.Member.html) from the specified
[`Guild`](../model/struct.Guild.html) if they are in it.
```
is now written as:
```md
Kicks a [`Member`] from the specified [`Guild`] if they are in it.
[`Guild`]: ../model/struct.Guild.html
[`Member`]: ../model/struct.Member.html
```
|
| |
|