aboutsummaryrefslogtreecommitdiff
path: root/src/client/dispatch.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a message builder for Context::send_messageAustin Hellyer2016-11-151-1/+1
| | | | | | | | | | | | | | | | 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)); ```
* State: on update, return old instancesAustin Hellyer2016-11-151-52/+33
| | | | | | | | | 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.
* Add voice connection supportAustin Hellyer2016-11-141-1/+1
|
* Add internal moduleAustin Hellyer2016-11-141-1/+1
| | | | | Create a general `internal` module, and move `prelude_internal` to `internal::prelude`.
* Add delete_message_reactions + register eventAustin Hellyer2016-11-111-0/+12
| | | | | | | | | 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.
* Add webhook supportAustin Hellyer2016-11-071-0/+10
|
* Fix framework locking on MessageCreate dispatchAustin Hellyer2016-11-061-2/+3
| | | | | | 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.
* Add a prelude for userlandAustin Hellyer2016-11-051-1/+1
| | | | | | | 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 reactionsAustin Hellyer2016-11-051-0/+24
| | | | | | | | | | | | | | | | | | | | | | 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.
* Initial commitAustin Hellyer2016-10-181-0/+657