aboutsummaryrefslogtreecommitdiff
path: root/src/model
Commit message (Collapse)AuthorAgeFilesLines
* Add Member::user_idZeyla Hellyer2018-09-051-0/+14
| | | | | Adds a `user_id` method to `Member`, which is a shortcut for retrieving the member's user ID.
* Old message on update (#368)Adelyn2018-08-261-25/+32
|
* Properly link to User in Game docsZeyla Hellyer2018-08-241-0/+2
|
* Add support for session start info in BotGatewayZeyla Hellyer2018-08-241-0/+16
| | | | | Add support for the new information describing the current session start ratelimits given in the GET /gateway/bot endpoint.
* Fix GuildChannel::_permissions_for on no-cacheZeyla Hellyer2018-08-151-1/+2
| | | | | Fix the compilation of `GuildChannel::_permissions_for` when the `cache` feature is disabled.
* Use `to_`- and `as_`-methods instead of `get` and `find` on Id newtypesLakelezz2018-08-1213-48/+169
|
* Fix all the dead links in the docsErk-2018-08-0925-440/+441
|
* Decringe an old commentacdenisSK2018-08-081-2/+1
|
* Fix compilation + tests on certain feature combosZeyla Hellyer2018-08-072-68/+104
| | | | | | | | On certain feature combinations, compilation and tests would not function correctly. This commit goes through a number of feature combinations and gates some tests behind the required features and fixes other compilation errors.
* Fix some documentation spacingZeyla Hellyer2018-08-071-17/+11
|
* Fixes all of the dead links in permissions. (#359)Erk-2018-08-071-75/+75
|
* Added support for the new PRIORITY_SPEAKER permission (#360)Erk-2018-08-071-0/+8
|
* Fix Game From impls on no-model compilationZeyla Hellyer2018-08-051-2/+10
|
* Add From impls for Game, generify Game paramsZeyla Hellyer2018-08-012-1/+52
| | | | | Add more `impl From<T> for Game` implementations, and make `Into<Game>` trait bounds for all function parameters accepting a Game.
* Move unit tests into sourceZeyla Hellyer2018-08-014-0/+345
| | | | | | | | | Move the unit tests into the relevant source files. There's no need for them to be seprate, especially when the `tests` directory is meant to be for integration tests. The deserialization tests that include JSON files are still in the `tests` dir, along with the public prelude re-export tests.
* Make GuildId::member use the cache when possible (#356)Maiddog2018-07-311-1/+11
|
* Add note about cache in UserId::get docsZeyla Hellyer2018-07-291-2/+3
|
* Add `impl AsRef<MessageId> for Message` (#355)Adelyn2018-07-251-0/+6
|
* Fix `ChannelId::send_message`'s dead linksacdenisSK2018-07-251-3/+3
|
* Fix some clippy lintsZeyla Hellyer2018-07-158-55/+54
| | | | | Some lints were not resolved due to causing API changes. Most lints in the framework were left unfixed.
* typosZeyla Hellyer2018-07-141-2/+2
|
* Abstract impls in Channel's Mentionable implZeyla Hellyer2018-07-141-4/+4
| | | | | Abstract the implementations for each of Channel's variants' `Mentionable` implementations by using the underlying impl.
* Implement Mentionable for GroupZeyla Hellyer2018-07-141-0/+6
|
* Implement Mentionable for PrivateChannelZeyla Hellyer2018-07-141-0/+6
|
* Implement Mentionable for ChannelCategoryZeyla Hellyer2018-07-141-1/+7
|
* Fix doc links with no anchorZeyla Hellyer2018-07-112-0/+7
|
* impl Mentionable for GuildChannel (#348)Adelyn2018-07-101-0/+4
|
* Deprecate Message::guild_id()Zeyla Hellyer2018-07-091-14/+11
| | | | | Instead, using the structfield is preferred, since that comes from gateway events directly now anyway.
* Add a message cache API (#345)zeyla2018-07-091-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an API for message caching. By default this caches 0 messages per channel. This can be customized when instantiating: ```rust use serenity::cache::{Cache, Settings}; let mut settings = Settings::new(); // Cache 10 messages per channel. settings.max_messages(10); let cache = Cache::new_with_settings(settings); ``` After instantiation: ```rust use serenity::cache::Cache; let mut cache = Cache::new(); cache.settings_mut().max_messages(10); ``` And during runtime through the global cache: ```rust use serenity::CACHE; CACHE.write().settings_mut().max_messages(10); ```
* impl Form<&$ID> for $IDZeyla Hellyer2018-07-081-0/+6
| | | | Implements `From<&Id>` for all `Id` types, e.g. `From<&RoleId> for RoleId`.
* Monomorphize all functionsZeyla Hellyer2018-07-0411-56/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit monomorphizes all functions, turning functions like: ```rust fn foo<T: Into<Bar>>(baz: T) { baz = baz.into(); // function here } ``` Into functions like: ```rust fn foo<T: Into<Bar>>(baz: T) { _foo(baz.into()) } fn _foo(baz: Bar) { // function here } ``` This avoids binary bloat and improves build times, by reducing the amount of code duplication.
* Fix dead doc-links and add missing ones. (#347)Lakelezz2018-07-041-33/+40
|
* Make guild optional on InvitesZeyla Hellyer2018-06-271-8/+20
| | | | | | | | Make the `guild` structfield on `Invite` and `RichInvite` optional. This was done due to a change in the [docs]. [docs]: https://github.com/discordapp/discord-api-docs/commit/bc0a15bd11db72644633080903171fbc3e71b026
* feature: add guild_id to Message, per g250k changesChristopher F2018-06-171-0/+5
| | | | | | this allows stateless bots to drop the need for a channel->guild mapping (cherry picked from commit 74bb8fa5a3b4b5fd43559866b4627bf09484f6ae)
* Remove extraneous spaces at the end of linesZeyla Hellyer2018-06-177-16/+16
|
* Add methods to check whether `Message` is mentioning `User` (#323)Lakelezz2018-05-291-0/+15
|
* Remove deadlocking in Member::highest_role_infoZeyla Hellyer2018-05-271-8/+6
| | | | | | Instead of calling `parking_lot::RwLock::read` on the member's guild, call `parking_lot::RwLock::try_read` and return None early if it would cause a deadlock.
* impl From<{,&'a }CurrentUser> for UserZeyla Hellyer2018-05-231-0/+24
| | | | | Implementation `From<CurrentUser> for User` and `From<&'a CurrentUser> for User`.
* Implement Mentionable for CurrentUserZeyla Hellyer2018-05-231-0/+6
|
* Add `Message::member` structfieldZeyla Hellyer2018-05-212-2/+23
| | | | | Adds the `Message::member` structfield, which contains a partial amount of member data (deaf and mute status, role IDs, and joined_at).
* Fix "Guild Member Chunk" deserializationZeyla Hellyer2018-04-251-2/+11
|
* Remove empty whitespace at ends of linesZeyla Hellyer2018-04-251-1/+1
|
* Get rid of a spurious import warningacdenisSK2018-04-201-4/+3
|
* make `Options`'s fields optional (#305)Kyle Clemens2018-04-121-15/+60
|
* Turn the number-like properties of `Options` into `u64`acdenisSK2018-04-111-38/+45
|
* Handle (de)serializing `target_id` from/to a stringacdenisSK2018-04-111-2/+37
|
* Fix nsfw related docs (#299)Lakelezz2018-04-044-15/+15
|
* Refactor imports/exports to use nested groups and better formattingacdenisSK2018-03-2914-30/+107
|
* Change the way ids and some enums are made (#295)Leah2018-03-237-172/+271
| | | | | This makes them easier to be found by tools like rls. Also update struct inits to use the shorthand version for `x: x`.
* Remove useless clones (#292)Maiddog2018-03-172-4/+4
|