aboutsummaryrefslogtreecommitdiff
path: root/src/model
Commit message (Collapse)AuthorAgeFilesLines
...
* Add message edit/edit_message rich embedsAustin Hellyer2016-11-151-5/+17
|
* Add send_message rich embedsAustin Hellyer2016-11-152-2/+11
|
* Add state/framework/etc. conditional compile flagsAustin Hellyer2016-11-1511-24/+165
| | | | | | | | | | | | | | | 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.
* Decode embed/role colours into Colour structAustin Hellyer2016-11-142-10/+2
| | | | | | 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.
* Allow current user to nickname themselvesAustin Hellyer2016-11-141-0/+35
| | | | | | | | | | | | | | | | | | 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.
* Add missing permission shorthandsAustin Hellyer2016-11-141-0/+16
|
* Add voice connection supportAustin Hellyer2016-11-143-61/+103
|
* Add internal moduleAustin Hellyer2016-11-1411-11/+11
| | | | | Create a general `internal` module, and move `prelude_internal` to `internal::prelude`.
* Move the builders to the utilsAustin Hellyer2016-11-133-3/+3
| | | | | | | | | 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.
* Don't overflow on message length checkAustin Hellyer2016-11-121-3/+3
|
* 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