aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove cache feature dependency for frameworkAustin Hellyer2016-12-162-55/+77
|
* Make 'voice' feature not require 'cache'Austin Hellyer2016-12-166-8/+19
| | | | | | | | The voice module required the cache feature in order to access the current user's Id. Instead, just copy the Id into the VoiceManager and distribute it from there -- the memory impact will be very minimal in comparison to the benefits of not needing to constantly unlock the Cache and not needing the user to be forced to use the Cache.
* Simplify gateway identify compressionAustin Hellyer2016-12-161-7/+2
|
* Framework: format argument number on parse errorIllia2016-12-161-2/+9
|
* Fix framework owners_only checkIllia2016-12-161-6/+8
|
* Fix User::avatar_url + add Id display testsAustin Hellyer2016-12-151-2/+2
| | | | | User::avatar_url was formatting the user's Id as a mention, rather than the inner u64.
* Plain help: put groups on their own lineAustin Hellyer2016-12-141-0/+2
|
* Fix plain help command usage outputAustin Hellyer2016-12-141-0/+2
|
* Framework blocks, disabled commands, improvementsIllia2016-12-144-48/+205
|
* Slightly rework framework bucketsAustin Hellyer2016-12-146-207/+200
|
* Don't mutate token for bots on profile changezeyla2016-12-131-2/+4
|
* Implement command groups and bucketsIllia2016-12-1311-88/+712
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement command groups * change to ref mut * Implement framework API. * Remove commands field * Make it all work * Make example use command groups * Requested changes * Implement adding buckets * Add ratelimit check function * Finish everything * Fix voice example * Actually fix it * Fix doc tests * Switch to result * Savage examples * Fix docs * Fixes * Accidental push * 👀 * Fix an example * fix some example * Small cleanup * Abstract ratelimit bucket logic
* Add emoji URL generation methodsAustin Hellyer2016-12-122-0/+16
|
* Cleanup gateway prepAustin Hellyer2016-12-121-4/+1
|
* More config for CreateCommand, add various methodsIllia2016-12-1021-176/+376
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds multiple configurations to the command builder, and adds methods to various structs. Context::get_current_user is a shortcut to retrieve the current user from the cache. Message::get_member retrieves the member object of the message, if sent in a guild. Message::is_private checks if the message was sent in a Group or PrivateChannel. User::member retrieves the user's member object in a guild by Id; Adds 6 configurations to the command builder: - dm_only: whether the command can only be used in direct messages; - guild_only: whether the command can only be used in guilds; - help_available: whether the command should be displayed in the help list; - max_args: specify the maximum number of arguments a command must be given; - min_args: specify the minimum number of arguments a command must be given; - required_permissions: the permissions a member must have to be able to use the command;
* Fix no-cache+method conditional compilesAustin Hellyer2016-12-109-30/+38
| | | | Additionally, flag imports behind feature flags to avoid unused imports.
* Deprecate embed image/thumbnail height/widthAustin Hellyer2016-12-091-36/+10
| | | | | | The height and width fields for embed images and thumbnails can not be set - whereas originally there may have been plans to - so deprecate them and remove in v0.3.0.
* Abstract command fields to typesAustin Hellyer2016-12-094-29/+33
|
* Add installation notesAustin Hellyer2016-12-091-0/+17
|
* Fix some clippy lintsAustin Hellyer2016-12-095-13/+13
|
* Command builder, quoted args, and multi-prefixesIllia2016-12-095-32/+324
| | | | | Add a command builder, which can take arguments such as multiple checks, quoted arguments, and multiple prefix support, as well as dynamic prefixes per context.
* Implement From<Embed> for CreateEmbedAustin Hellyer2016-12-081-1/+70
|
* Change all try's into ?sacdenisSK2016-12-0720-501/+496
| | | This breaks compatibility with < 1.13, but we didn't support that anyway.
* Allow mentionable structs to be used as command argumentsIllia2016-12-074-1/+186
| | | | | Add EmojiIdentifier, allow User, UserId, Role, RoleId, EmojiIdentifier, Channel and ChannelId to be used as arguments for commands and add more parsing functions to utils
* Improve Mentions, fix MessageBuilderIllia2016-12-066-101/+48
| | | | | Remove the obsolete Mention struct as well as related methods, improve the way mentioning works, fix the message builder, add a test for all this.
* Add a ShareMap across contextsAustin Hellyer2016-12-054-42/+101
| | | | | | | | The context now exposes, through the Client, a `data` field, which can be accessed safely across contexts. This allows for a custom "shared state" without the need for (ab)using lazy-static.rs. Refer to example 06 for an example on how to use shared data.
* Add more Context docs+permission requirementsAustin Hellyer2016-12-043-27/+194
| | | | | Add more documentation to most of the Context methods, also clarifying which permission/s are required for each method.
* Add documentation for modelsIllia2016-12-044-6/+20
|
* Use proper comments on inline ratelimit commentsAustin Hellyer2016-12-041-2/+2
|
* Fix signature of Context::move_memberAustin Hellyer2016-12-031-2/+2
|
* Import this import _again_Austin Hellyer2016-12-031-0/+2
|
* Make Member::colour() return an optional colourAustin Hellyer2016-12-032-20/+8
|
* Derive Eq/Ord on ColourAustin Hellyer2016-12-031-1/+14
|
* Add Member::colourIllia2016-12-032-12/+37
| | | | Add a colour method to retrieve the member's top role with a unique colour, or the default colour if none can be applied.
* Add Role Eq/Ord implsAustin Hellyer2016-12-031-0/+33
| | | | | | | | | Roles can now be compared directly. This is a heirarchy check. This checks the following between two roles, A and B: - A's position is greater than B; - if not, then A's Id is greater than B; if these two conditions are false, then B is greater than A. If the two conditions are both true, then they are of equivilance.
* Fix Shard::set_presence exampleAustin Hellyer2016-12-031-1/+1
|
* Make the default Colour value the actual defaultAustin Hellyer2016-12-031-2/+2
| | | | | The Colour value defaulted to 0x0; this is incorrect, as Discord's default colour value is actually 0x99AAB5.
* Add Member.colourIllia2016-12-031-0/+11
|
* Add User::distinctIllia K2016-12-031-0/+5
| | | | | The distinct method concatenates the user's name and discriminator by the hash (`#`) symbol.
* Add CurrentUser::editAustin Hellyer2016-12-031-1/+46
|
* Fix rest::get_guilds doctestAustin Hellyer2016-12-031-3/+4
|
* s/rose_water/rosewaterAustin Hellyer2016-12-031-1/+1
|
* Make rest::edit_profile set new tokenAustin Hellyer2016-12-032-4/+22
| | | | | | | | | | | If a user account changes their profile settings, they'll receive a new token; update the locally stored token for REST requests with this token. Additionally, the `Context::edit_profile` does not need mutability over self. Fixes #25.
* Add rose water colourIllia2016-12-031-0/+2
|
* Paginate rest::get_guilds and add helper methodsAustin Hellyer2016-12-023-9/+74
| | | | | | | | | | | | | | | | | | | | Paginate the rest::get_guilds endpoint, which can be used to retrieve the guilds after-or-before a certain guild's Id, with a limit of results to return (100 is the max). Example usage: ```rs use serenity::client::rest::GuildPagination; let target = GuildPagination::After(GuildId(81384788765712384)); let guilds = context.get_guilds(target, 50); ``` Additionally, add a method of `CurrentUser::guilds()`, to retrieve the current user's guilds. A limit of 100 is set, as (most) users can not be in more than 100 guilds.
* Encase the event storage in an Arc<RwLock>Austin Hellyer2016-12-022-77/+77
| | | | | | Commands should be dispatched more quickly with this patch. This brings down a (locally-tested) average "ping" command response from 278ms to 67ms.
* Add Message::guild_id()Austin Hellyer2016-12-011-0/+17
| | | | | | | Searches the Cache for the Id of the guild that the message was posted to - if any - and if the guild and channel data are cached. Requires the `cache` and `method` feature flags be enabled.
* Add 'fooyoo' to Colour structIsaac Dickinson2016-12-011-1/+3
|
* Add fabled_pink to Colour structKen Swenson2016-12-011-0/+2
|
* Fix a typoAustin Hellyer2016-12-012-2/+2
|