aboutsummaryrefslogtreecommitdiff
path: root/src/model
Commit message (Collapse)AuthorAgeFilesLines
* Rename `Guild::permissions_for`->`permissions_in`Zeyla Hellyer2017-10-304-7/+18
| | | | | | Rename `Guild::permissions_for` to `Guild::permissions_in`, deprecating `Guild::permissions_for` which is only an inline method to `permissions_in`.
* Guild::has_perms: use Guild::member_permissionsZeyla Hellyer2017-10-301-22/+14
| | | | | | Make `Guild`'s internal method `has_perms` go through `Guild::member_permissions` to check permissions, since all method that use it don't need channel-specific permissions.
* Add Guild::member_permissionsZeyla Hellyer2017-10-301-0/+51
| | | | | | Add a method on the Guild for calculating only a member's guild-only permissions, not including the permissions for either the default channel or any specific channel.
* Add some docs to `BanOptions`acdenisSK2017-10-301-0/+1
|
* Fall back to `str::parse` if `parse_username` failsacdenisSK2017-10-241-3/+4
|
* Fix User::has_roleZeyla Hellyer2017-10-241-1/+5
| | | | | | | | | Fix the return value of the function by properly checking whether the user has the role in the given guild. The function made the erraneous mistake of simply checking if the given guild had the role by Id, not whether the _member in the given guild_ had the role by Id.
* Properly update emojis, fix shard retries, fix csLakelezz2017-10-231-1/+3
| | | | | | | * If a guild's emojis are being altered, Serenity will straight up use the new `HashMap` instead of just extending. If `connect()` returns an `Err`, it will retry connecting. Cleaned up `help_command.rs`.
* Deprecate some text-only Channel methodsZeyla Hellyer2017-10-191-0/+11
| | | | | | | | | | | | | | | | | | | Some methods on `model::Channel` are only for text channels. Methods on Channel should be applicable to all channel types. Deprecates the following methods on `model::Channel`: - `create_reaction` - `delete_message` - `delete_reaction` - `edit_message` - `message` - `messages` - `reaction_users` - `say` - `send_files` - `send_message` - `unpin`
* Implement changing a role's position (#201)Ken Swenson2017-10-192-0/+41
|
* Use the underlaying integer value of a `ChannelType` variantacdenisSK2017-10-171-1/+1
|
* defer to `delete_message` if there's just one message to deleteacdenisSK2017-10-162-4/+8
|
* Hash and do equality on just the id for `User`acdenisSK2017-10-151-1/+17
|
* Add try_opt macro for substituteMei Boudreau2017-10-121-4/+1
|
* Optimize Member::rolesMei Boudreau2017-10-121-21/+11
|
* Fix clippy lintsZeyla Hellyer2017-10-114-48/+48
|
* Variety of methods to search for `Member`. (#187)Lakelezz2017-10-101-12/+218
|
* Generate `Default` for CurrentUser and use it in `Cache::default`acdenisSK2017-10-082-2/+2
|
* Add an impl for `&str`acdenisSK2017-10-081-0/+4
|
* Find `Member` via substrings, allow case-insensitivity on ↵Lakelezz2017-10-071-4/+54
| | | | `members_containing` and `members_starting_with` (#184)
* Help-commands filtering and Member-prefix-search (#182)Lakelezz2017-10-071-0/+18
|
* Fix a typoacdenisSK2017-10-051-1/+1
|
* Add an andacdenisSK2017-10-051-1/+1
|
* Use an as_ref hackacdenisSK2017-10-053-3/+10
|
* Replace slice parametres by IntoIterator (#177)François Triquet2017-10-054-4/+4
| | | Fixes #174
* Fix most clippy warningsMaiddog2017-10-042-2/+2
|
* Replace Vec parameters by IntoIterator (#176)François Triquet2017-10-045-5/+5
|
* Revert "Use the de-generification trick."acdenisSK2017-10-039-190/+55
| | | | Makes the compiliation time just a bit worse
* Use the de-generification trick.acdenisSK2017-10-029-55/+190
| | | | Fixes #168
* `to_owned` -> `to_string`acdenisSK2017-10-0111-29/+29
|
* Fix User::tag and CurrentUser::tag discrim outputZeyla Hellyer2017-09-281-1/+1
| | | | | The output in a tag may result in "username#304" instead of the correct "username#0304".
* Use `request_client!` for attachment downloading (#165)Benjamin Cheng2017-09-261-1/+1
|
* Refactor display impls for idsacdenisSK2017-09-246-24/+7
|
* Update bitflags, other dependenciesZeyla Hellyer2017-09-219-78/+87
| | | | | | | | | | | | | | | | | | | | | | | Bitflags changed its macro codegen from creating constants to associated constants on structs. Upgrade path: Update code from: ```rust use serenity::model::permissions::{ADD_REACTIONS, MANAGE_MESSAGES}; foo(vec![ADD_REACTIONS, MANAGE_MESSAGES]); ``` to: ```rust use serenity::model::Permissions; foo(vec![Permissions::ADD_REACTIONS, Permissions::MANAGE_MESSAGES]); ```
* Apply rustfmtZeyla Hellyer2017-09-1823-375/+244
|
* Fix compiles of a variety of feature combinationsZeyla Hellyer2017-09-1817-74/+92
| | | | | This fixes compilation errors and warnings when compiling a mixture of non-default feature targets.
* Apply rustfmtZeyla Hellyer2017-09-181-1/+3
|
* Gate ChannelCategory impl behind 'model' featureZeyla Hellyer2017-09-181-0/+1
| | | | | The rest of the models in the model module have their implementations gated behind the "model" feature, so do the same here.
* if let -> and_then/mapacdenisSK2017-09-171-5/+1
|
* Apply rustfmtZeyla Hellyer2017-09-141-11/+11
|
* Revamp `CacheEventsImpl`acdenisSK2017-09-121-0/+611
|
* serde rename `kind` to `type`acdenisSK2017-09-091-0/+1
|
* Apply rustfmt + fix testsZeyla Hellyer2017-09-096-11/+31
|
* `parent_id` -> `category_id`acdenisSK2017-09-092-4/+6
|
* Implement categoriesacdenisSK2017-09-096-2/+154
|
* Update `Guild::ban` to use `BanOptions`acdenisSK2017-09-062-9/+11
| | | | Also update `Member::permissions` to the default channel change
* match to map/?acdenisSK2017-09-041-4/+1
|
* Fix the PRESET_GENERAL permission constantZeyla Hellyer2017-09-031-1/+1
| | | | | These bits were completely wrong and even gave the Administrator permission.
* Remove more non-bot user endpointsZeyla Hellyer2017-09-013-50/+0
| | | | | | | | | | | | These include the following functions removed: - `http::get_application_info` - `http::get_applications` - `http::get_emoji` - `http::get_emojis` - `model::Guild::{emoji, emojis}` - `model::GuildId::{emoji, emojis}` - `model::PartialGuild::{emoji, emojis}`
* Make role references attainable via nameLakelezz2017-08-292-0/+69
|
* Prevent malformed opus data from crashing the bot process (#149)Maiddog2017-08-272-54/+60
|