| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds conditional compilation for the following features, in
addition to the voice conditional compilation flag:
- extras (message builder)
- framework
- methods
- state
These 4 are enabled _by default_, while the `voice` feature flag is
disabled.
Disabling the state will allow incredibly low-memory bots.
|
| |
|
|
|
|
| |
This is for a little bit of ergonomics, and is of such a minute cost
that it is worth it to just directly decode the u32's received for
Role/Embed colours into the Colour struct.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the `PATCH /guilds/:guild_id/members/@me/nick` endpoint,
which allows the current user to edit their own nickname.
A user can only nickname themselves if they have the `Change Nickname`
permission.
This adds 4 methods:
- `serenity::client::http::edit_nickname`;
- `serenity::client::Context::edit_nickname`;
- `serenity::model::Guild::edit_nickname`;
- `serenity::model::LiveGuild::edit_nickname`.
`LiveGuild`'s implementation checks for whether the current user has
permission to change their own nickname.
|
| | |
|
| | |
|
| |
|
|
|
| |
Create a general `internal` module, and move `prelude_internal` to
`internal::prelude`.
|
| |
|
|
|
|
|
|
|
| |
The builders aren't a large enough portion of the library to deserve
their own root-level module, so move them to the `utils` module.
Additionally, split them into separate files, as the library will be
receiving more builders and the single-file pattern was getting rather
large.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Before sending a request to Discord, ensure that a message's content on
non-HTTP functions and methods meets the required length. If it exceeds
the limit, then return a
`Error::Client(ClientError::MessageTooLong(u64))`, containing the number
of unicode code points exceeding the limit.
Note that directly using the HTTP methods does not impose this limit.
|
| |
|
|
|
|
|
|
|
| |
Add the `delete_message_reactions` endpoint
(`DELETE /channels/{}/messages/{}/reactions`) and implement a method on
the `Message` struct for easy access, `delete_reactions`.
Register the `MESSAGE_REACTION_REMOVE_ALL` event and add an event
handler.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Features are handed by Discord to guilds that meet requirements which
are most likely realistically arbitrary.
The 3 features at this moment are:
- INVITE_SPLASH
- VANITY_URL
- VIP_REGIONS
On decoding of the two guild structs, map these string values to enum
variants.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds two methods to the Attachment model:
- download: uses Hyper to download the attachment and return it as a vec
of bytes;
- download_to_directory: equivilant to `download`, except it will also
save the bytes to a file named equivilant to the filename in a given
directory.
Check the documentation for Attachment for more information and
examples:
<https://docs.austinhellyer.me/serenity.rs/latest/serenity/model/struct.Attachment.html>
|
| | |
|
| |
|
|
|
|
|
| |
Users can now import all of a prelude via `use serenity::prelude::*;`,
which should provide some helpful stuff. As such, the internal
prelude is now named `serenity::prelude_internal`, and all internal uses
have been adjusted.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
```
|
| |
|
|
|
|
| |
Most of the docs were linking to `enum.EnumName.html#VariantName.v`,
which should have been linking to
`enum.EnumName.html#variant.VariantName`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add message reaction structs and an enum to differentiate between the
two types of reactions, as well as event decoding and event handlers
with dispatches.
The following is, more or less, what is added:
- `reactions` field to the `Message` struct;
- `MessageReaction` struct, which is a consolidated form of reaction,
containing the type of reaction, the number of them, and whether the
current user has performed that type of reaction;
- `Reaction`, a struct containing the information about a reaction
- `ReactionType`, an enum to differentiate between the two types of
reactions: `Custom` (a guild's custom emoji) and `Unicode` (twemoji);
- Decoding for `MESSAGE_REACTION_ADD` and `MESSAGE_REACTION_REMOVE`;
- Permission flag `ADD_REACTIONS`;
- `Message::react` method;
- Three `http` payload senders: `create_reaction`, `delete_reaction`,
and `get_reaction_users`;
- Three `Context` methods of equal names to the above.
|
| | |
|
| |
|