| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a message builder to `send_message`. Often only one field - i.e.
`content` - needs to be specified, and the rest can be ignored.
This is a preliminary patch to add rich embed support to messages.
This message builder is used via:
```rust
// assuming in a context with a `channel_id` bound
context.send_message(channel_id, |m| m
.content("TTS ping!")
.tts(true));
```
|
| |
|
|
|
|
|
|
|
| |
When updating the State, return the old instance of removed/updated
fields where possible, so that they can be used to send to event
handlers as a "this is what it used to look like, this is what it looks
like now" type of thing.
Very descriptive, I know.
|
| | |
|
| |
|
|
|
| |
Create a general `internal` module, and move `prelude_internal` to
`internal::prelude`.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
The framework will lock on checking if it's initialized, and will not
be able to unlock a second time from within the same scope. Fix this
by unlocking it once and binding it.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|