aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Framework: fix command arg positioningAustin Hellyer2016-11-082-46/+71
| | | | | | | | | | The command system assumed that prefixes were only one character long, so count the total length of the prefix. In addition, the `allow_whitespace` configuration added some difficulty in deciding where to count as the initial position to start splitting for arguments. Instead of fixing that, rewrite the framework to make these types of changes easier in the future.
* Add Manage Webhooks to permissions 2FA listAustin Hellyer2016-11-081-0/+2
|
* Add arguments to framework commandsAustin Hellyer2016-11-072-3/+8
|
* Add webhook supportAustin Hellyer2016-11-0712-1/+718
|
* 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>
* Remove Context::get_application{s,_info}Austin Hellyer2016-11-061-8/+0
| | | | | | These are aliases of their `http` module equivilants, so they aren't needed, especially on the Context, where they are not associated with the current context.
* Remove Context alias methodsAustin Hellyer2016-11-061-92/+9
| | | | | | Most of the longer named methods were probably never going to be used, but some of the longer aliased methods have been kept and the associated alias removed.
* Fix old ratelimit resets breaking next requestsAustin Hellyer2016-11-061-1/+10
| | | | | | | | | | | If the reset was in the past by a second, then multiplication to determine the difference in time to wait would result in somewhere around the max value of u64 being multiplied by 1000, which caused a multiplication overflow. Instead, if the retry is in the past, just ignore it, as it would have already passed, and continue on with the request, setting the remaining requests allowed by the bucket to the known limit.
* Remove Context::get_voice_regionsAustin Hellyer2016-11-061-4/+0
| | | | | This was basically an alias to http::get_voice_regions and likely had no use case.
* Add an 'allow_whitespace' framework configAustin Hellyer2016-11-062-31/+84
| | | | | | | | | | | | | | The option allows whitespace to be optional between a mention and a command. Setting it to true will allow the following scenario to occur, while false will not: ``` <@BOT_ID>about // bot process and executes the "about" command if it exists ```
* Allow non-prefixed mentionsAustin Hellyer2016-11-061-15/+20
| | | | | Allow frameworks to be made and dispatched to that listen for mentions, but not for prefixes.
* 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 some more documentationAustin Hellyer2016-11-0611-38/+129
|
* Move HTTP/ratelimiting into a separate moduleAustin Hellyer2016-11-063-5/+5
|
* Fix doc importAustin Hellyer2016-11-061-1/+1
|
* Add a prelude for userlandAustin Hellyer2016-11-0521-26/+46
| | | | | | | 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-054-82/+136
| | | | | | | | | | | | | | | | | | | | 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-059-81/+81
| | | | | | Most of the docs were linking to `enum.EnumName.html#VariantName.v`, which should have been linking to `enum.EnumName.html#variant.VariantName`.
* Support major parameters in ratelimitsAustin Hellyer2016-11-053-84/+139
| | | | | Refer to the documentation for `serenity::client::ratelimiting::Route` on how major parameters work.
* Finalize invite-related documentationAustin Hellyer2016-11-052-18/+60
|
* Add message reactionsAustin Hellyer2016-11-0511-11/+441
| | | | | | | | | | | | | | | | | | | | | | 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.
* Fix readme example to properly use frameworkAustin Hellyer2016-10-231-2/+3
|
* Abstract opcodes to enumsAustin Hellyer2016-10-223-20/+127
|
* Add ability to fully set a presenceAustin Hellyer2016-10-202-2/+27
| | | | | The full presence setting allows for manually specifying the online status and afk field.
* Initial commitAustin Hellyer2016-10-1833-0/+9672