aboutsummaryrefslogtreecommitdiff
path: root/src/model
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a check for message content lengthAustin Hellyer2016-11-121-6/+83
| | | | | | | | | | 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 delete_message_reactions + register eventAustin Hellyer2016-11-112-2/+43
| | | | | | | | | 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.
* Fix some clippy lintsAustin Hellyer2016-11-103-14/+2
|
* Add a Feature enumAustin Hellyer2016-11-091-1/+1
| | | | | | | | | | | | | | 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.
* Map op codes via a macroAustin Hellyer2016-11-091-2/+2
|
* Add Manage Webhooks to permissions 2FA listAustin Hellyer2016-11-081-0/+2
|
* Add webhook supportAustin Hellyer2016-11-076-1/+259
|
* Add Attachment::download{,to_directory}Austin Hellyer2016-11-071-0/+144
| | | | | | | | | | | | | | | 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>
* Add some more documentationAustin Hellyer2016-11-063-7/+8
|
* Add a prelude for userlandAustin Hellyer2016-11-0510-10/+10
| | | | | | | 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 doc anchors to named anchorsAustin Hellyer2016-11-051-6/+13
| | | | | | | | | | | | | | | | | | | | 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 ```
* Fix doc links to enum variantsAustin Hellyer2016-11-054-24/+24
| | | | | | Most of the docs were linking to `enum.EnumName.html#VariantName.v`, which should have been linking to `enum.EnumName.html#variant.VariantName`.
* Finalize invite-related documentationAustin Hellyer2016-11-051-16/+41
|
* Add message reactionsAustin Hellyer2016-11-055-9/+254
| | | | | | | | | | | | | | | | | | | | | | 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.
* Abstract opcodes to enumsAustin Hellyer2016-10-221-12/+21
|
* Initial commitAustin Hellyer2016-10-1811-0/+3685