aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Add functions to reorder a guild's channelsZeyla Hellyer2018-01-273-0/+44
| | | | | Add `http::edit_guild_channel_positions`, `Guild::reorder_channels`, and `GuildId::reorder_channels`.
* Check message ID count in `delete_messages`Zeyla Hellyer2018-01-274-13/+29
| | | | | | In models' `delete_messages` methods, check the number of messages being deleted. If 0 or more than 100, return a `ModelError::BulkDeleteAmount`, as this amount would result in an invalid request.
* Add `Message::member`Zeyla Hellyer2018-01-271-0/+13
| | | | | | | | | Add a `member` function on `model::channel::Message` to retrieve a clone of the author's Member instance in the channel's guild. If the message was not sent in a guild, the guild could not be found in the cache, or the member instance could not be found in the cache, then `None` is returned.
* Account for guild owners in member hierarchy checkZeyla Hellyer2018-01-271-0/+15
| | | | | | When using `Guild::greater_member_hierarchy`, check if both user IDs are the same (returning None) or if one of them is the guild owner, in which case the guild owner's ID is returned.
* Add a way to register middleware functions directly in `CreateCommand`acdenisSK2018-01-253-7/+74
|
* Fix voice websocket loop terminationNikita Pekin2018-01-241-1/+1
| | | | | | | The websocket loop for voice events is terminated whenever a websocket message is successfully sent. This is caused by a bug that was introduced in https://github.com/zeyla/serenity/commit/c8536c111117f26833fb1bceff734ac1abc55479#diff-6a8a0bad68abd05790cdc2c2ba043ec6L457, due to an improperly implemented clippy lint.
* Strip RTP header extensions from voice streamNikita Pekin2018-01-241-2/+24
| | | | | Add code to strip RTP header extensions from an incoming voice stream, if they are present. See https://tools.ietf.org/html/rfc5285 for more info.
* Trim after splitting at the mention-end. (#256)Lakelezz2018-01-221-2/+3
|
* Fix skipping for emote prefixes (#255)Uninteresting Account2018-01-211-3/+2
|
* Bump to v0.5.0v0.5.0Zeyla Hellyer2018-01-201-1/+1
|
* Fix compilation for some feature combinationsZeyla Hellyer2018-01-203-1/+7
|
* Fix no-cache compilationacdenisSK2018-01-201-0/+1
|
* Fix multibyte character based prefixes (#253)Uninteresting Account2018-01-202-10/+11
|
* Fix doc comment indentationZeyla Hellyer2018-01-191-1/+1
|
* Add an `EditMessage` builderZeyla Hellyer2018-01-188-36/+79
| | | | | | When editing messages, not all fields are applicable. Attachments, TTS, and reactions are not applicable. To help with this distinction, separate message editing into a different builder.
* Update readme exampleZeyla Hellyer2018-01-181-4/+7
|
* Expose a client voice managerZeyla Hellyer2018-01-1810-207/+289
|
* Use an InterMessage to communicate over gatewayZeyla Hellyer2018-01-1812-35/+71
| | | | | | | Instead of communicating over the gateway in a split form of a `serde_json::Value` or a `client::bridge::gateway::ShardClientMessage`, wrap them both into a single enum for better interaction between the client, gateway, and voice modules.
* Create unset member instances on presence updatesZeyla Hellyer2018-01-171-0/+19
| | | | | | | | If a presence update for a guild comes in and their associated member instance is not present (e.g. in a large guild that wasn't member chunked), then create one with the infomation known out of the presence update. This includes their user information, guild ID, nickname, and roles, but not their `deaf`, `joined_at`, and `mute` state.
* Define `A` only onceacdenisSK2018-01-111-20/+10
|
* Fix ShardManager doctestZeyla Hellyer2018-01-101-11/+14
|
* Revert "Add `Client::user_id`"Zeyla Hellyer2018-01-101-9/+3
| | | | | | | | | | | This reverts commit 062ea86d5b0d9932207636d4a44a5357b079e79a. This change had the unintended side-effect of making tests with the Client impossible without hitting Discord's REST API for every test (even worse, while unauthorized). Knowing the user's ID on creation isn't _too_ important, and what was being done with that knowledge can be deferred to connection start.
* Simplify ShardManager creationZeyla Hellyer2018-01-103-119/+54
| | | | | | Instead of creating different `new` functions for every bridged feature combination, accept a struct of options. Structs can have conditional fields, unlike functions which can not have conditional arguments.
* Fix no-model compiler warningsZeyla Hellyer2018-01-103-3/+3
|
* Add `Client::user_id`Zeyla Hellyer2018-01-101-3/+10
| | | | | Add the user ID to the client. This can be used when initializing the framework on connection start, as well as the future voice manager.
* Fix docs for User::has_roleNikita Pekin2018-01-101-3/+4
| | | | | | | | Update the docs for `User::has_role` to reflect that `Into<GuildContainer>` is only implemented for `PartialGuild`, `GuildId`, and `u64`, not `Guild`. (cherry picked from commit 00deef894ec458ac8abff914ed864ea63c47eda6)
* Remove `is_bot` boolean from frameworkZeyla Hellyer2018-01-103-9/+9
| | | | | The framework no longer needs the `is_bot` boolean state, since serenity now only supports bot users.
* Add missing `correct roles`-checks in help-commands (#249)Lakelezz2018-01-102-4/+62
|
* Allow channels to be moved in and out of a category (#248)Kyle Clemens2018-01-084-8/+30
|
* Fix compilationZeyla Hellyer2018-01-062-6/+5
|
* Add some role position hierarchy checksZeyla Hellyer2018-01-063-8/+36
|
* Add Guild::greater_member_hierarchyZeyla Hellyer2018-01-061-0/+47
| | | | | Add a function to determine which of two members has the higher role hierarchy.
* Add Member::highest_role_infoZeyla Hellyer2018-01-061-0/+40
|
* Compare Instants in Shard::latencyZeyla Hellyer2018-01-061-4/+6
| | | | | | | When calculating the latency between when a heartbeat was sent and a heartbeat acknowledgement was received, ensure that the heartbeat acknowledgement was received after the heartbeat was sent. This avoids a panic. Otherwise, return None.
* Further generic-ify `reaction_users` `after` paramZeyla Hellyer2018-01-056-49/+52
| | | | | | | | | | | | | | | | | | Further generic-ify the `after` parameter on the `reaction_users` method of the following structs: - `ChannelId` - `Group` - `GuildChannel` - `Message` - `Channel` - `GuildChannel` Do this by changing the `U` trait bound from `Into<UserId>` to `Into<Option<UserId>>`. This resolves problems determining types when passing `None` as the argument, as reported in #247.
* Fix permission overwrites in permission buildingZeyla Hellyer2018-01-051-1/+11
| | | | | | | | | | | | | | While building permissions in the `Guild::permissions_in` function - which is relied upon by most model functions to check CurrentUser permissions - the channel overwrites of the given channel were iterated over incorrectly. The channel overwrites were iterated over in a non-specified order, resulting in overwrites being applied in a random order. However, Discord operates by applying permissions from a down-top order: role ID 0 is below role ID 1, which is below role ID 2, etc. This means that prior to applying permissions we must first sort by position so that lower positioned roles are iterated over first.
* Fix help-commands' `plain`Lakelezz2018-01-061-4/+37
|
* Convert embed footers for CreateEmbed::from (#244)Derrick Lee2018-01-041-0/+12
|
* Remove GameType::WatchingZeyla Hellyer2018-01-031-32/+0
| | | | | | According to [this commit], the game type has been removed. [this commit]: https://github.com/discordapp/discord-api-docs/commit/50999182f307ffda9ac7208a48570586ea446c08#diff-b307d936b736f302bc7cc153f0d8a0a3L779
* Move `VecMap` to `utils`acdenisSK2018-01-0217-24/+21
| | | | This also fixes no-builder compilation
* Remove builder re-export in utilsZeyla Hellyer2018-01-023-6/+2
|
* Resolve no-framework client compilationZeyla Hellyer2018-01-021-2/+2
|
* Update dispatch.rsZeyla Hellyer2018-01-021-1/+1
|
* Fix no-framework dispatchingZeyla Hellyer2018-01-021-1/+1
|
* Implement or derive Serialize on all modelsZeyla Hellyer2018-01-0126-115/+442
|
* Give hyper Response in HTTP errorsZeyla Hellyer2018-01-012-32/+15
| | | | | | | | Remove the `Error::UnknownStatus` variant, and change `Error::InvalidRequest(StatusCode)` to `Error::UnsuccessfulRequest(hyper::Response)`. This is done to give the user more information on why a request was unsuccessful, as before the user did not have access to the response body or headers.
* Add an event for shard updatesZeyla Hellyer2018-01-016-47/+106
| | | | | Add an event in the EventHandler to be called when a shard updates its Connection Stage.
* Expose a method of retrieving shard status/latencyZeyla Hellyer2018-01-014-1/+52
| | | | | | This exposes a method of retrieving a shard's status and latency through the Shard Manager, as part of the existing Shard Runner Info struct. The Shard Runner will update this whenever it notices a change.
* Derive Hash, impl Display on ConnectionStageZeyla Hellyer2018-01-011-1/+17
| | | | Implement `Display` and derive `Hash` on `gateway::ConnectionStage`.
* Add missing 'num' implementations on modelsZeyla Hellyer2017-12-273-0/+40
| | | | | | | Add missing 'num' implementations from the following models: - `channel::{ChannelType, MessageType}` - `gateway::GameType`