aboutsummaryrefslogtreecommitdiff
path: root/src/model
Commit message (Collapse)AuthorAgeFilesLines
* Use `#[serde(default)]` on `nsfw` insteadacdenisSK2017-08-151-3/+1
|
* Deprecate `GuildId::as_channel_id` and add simulation methods for the ↵acdenisSK2017-08-042-1/+43
| | | | | | "default channel" concept Also fix a little mistake
* Make some functions accept anything that's implemented DisplayacdenisSK2017-08-041-1/+1
|
* Change to c-like enums and transmuteacdenisSK2017-08-021-164/+55
|
* Use ranges instead of guardsacdenisSK2017-08-011-9/+7
|
* Clippy and rustfmtacdenisSK2017-08-012-8/+10
|
* Provide the input and limit back to the user, and do some consistenciesacdenisSK2017-08-012-3/+8
|
* Remove the `ext` module and remove a matchacdenisSK2017-08-011-6/+2
| | | | | The `ext` has existed for a long while just for backwards compatibility. But then again, majority of people should have migrated to the current modules already; making this module useless to keep in the library.
* Reuse `num`acdenisSK2017-07-311-8/+8
|
* Improve `Action`acdenisSK2017-07-311-100/+200
|
* Change the config a bit, and a few nitpicksacdenisSK2017-07-2720-598/+508
|
* rustfmtacdenisSK2017-07-2728-1451/+1347
|
* Fix is_own codeZeyla Hellyer2017-07-251-1/+1
| | | | | The current user ID is located on the `user` structfield in the cache, and is not directly on the cache.
* Actually, rename it to "is_own" insteadacdenisSK2017-07-261-1/+1
|
* Add a util function for checking if a message was sent by the bot or someone ↵acdenisSK2017-07-261-0/+6
| | | | else
* Fix #130acdenisSK2017-07-221-1/+2
| | | | Removed action support from the builtin one as well, due to it adding some uneccassery complexity and it being only asked upon by one user
* match -> and_thenacdenisSK2017-07-211-4/+1
|
* Fix the tests (#129)Bond-0092017-07-211-1/+1
|
* Utilise the newly stabilised loop-with-break-valueacdenisSK2017-07-201-13/+7
|
* Add an actual way to fetch audit log entries from a guildacdenisSK2017-07-204-0/+248
|
* Implement the new way of knowing some channels as "nsfw"acdenisSK2017-07-181-1/+14
|
* Fix GuildChannel::permissions_for doctestsZeyla Hellyer2017-07-151-5/+5
|
* Fix more doc testsacdenisSK2017-07-142-2/+2
|
* Fix the doc on `PrivateChannel::name`acdenisSK2017-07-141-1/+1
|
* Add `ChannelId,PrivateChannel,GuildChannel::name` functionsacdenisSK2017-07-143-0/+33
|
* Improve `BanOptions` to be more efficient and remove uneccessary `Read` importsacdenisSK2017-07-136-19/+9
|
* Remove the deprecated functionsacdenisSK2017-07-1113-740/+0
| | | | It's already been enough time for people to migrate
* Rename `online_members` to `members_with_status` and compare the status ↵acdenisSK2017-07-101-3/+3
| | | | provided to the function instead
* Return an error if the reason the user provided exceeded the limitacdenisSK2017-07-102-2/+14
|
* Use a trait way of overloading the `ban` function instead of an enumacdenisSK2017-07-102-52/+37
| | | | Possibly removes some overhead introduced by enums but makes the underlaying code of the function easier to read and is more concise
* Fixed clippy warnings (#120)Kaidan2017-07-101-3/+3
|
* Make `User` and `Ban` comparable and hashableacdenisSK2017-07-102-2/+2
|
* Add a way to return all online members in a guildacdenisSK2017-07-091-0/+18
|
* Remove the note from the comment on `reason`acdenisSK2017-07-081-3/+0
| | | | Audit log works and does give a reason, so this note is just false info
* Implement attaching reasons to bansacdenisSK2017-07-082-7/+67
|
* Fix doc testsacdenisSK2017-07-025-143/+175
|
* Fixed clippy warnings (#118)Kaidan2017-06-281-1/+1
|
* Docs fixesmei2017-06-2710-32/+20
|
* Add missing ModelError variant in description implZeyla Hellyer2017-06-271-0/+1
|
* Prevent Direct Messaging other bot usersZeyla Hellyer2017-06-262-0/+19
| | | | | | The API no longer allows bot users to Direct Message other bot users, so pre-emptively check that the recipient is not a bot. If it is, return a `ModelError::MessagingBot`.
* Fix ModelError doctestZeyla Hellyer2017-06-251-0/+3
|
* Fix no-feature testsZeyla Hellyer2017-06-242-1/+14
|
* Make Message::nonce a serde_json::ValueZeyla Hellyer2017-06-233-81/+3
| | | | | | | | | | | | | | | | | | Nonces can actually be almost anything - including booleans - so just use a Value to represent it since very few users will need it. This fixes errors like: ``` WARN:serenity::internal::ws_impl: (╯°□°)╯︵ ┻━┻ Error decoding: {"t":"MESSAGE_CREATE","s":12187872,"op":0,"d":{"type":0,"tts":false,"timestamp":"2017-06-01T01:00:00.000000+00:00","pinned":false,"nonce":"","mentions":[{"username":"redacted","id":"redacted","discriminator":"redacted","avatar":"redacted"}],"mention_roles":[],"mention_everyone":false,"id":"redacted","embeds":[],"edited_timestamp":null,"content":"redacted","channel_id":"redacted","author":{"username":"redacted","id":"redacted","discriminator":"redacted","bot":true,"avatar":"redacted"},"attachments":[]}} ERROR:serenity::client: Shard handler received err: Json(ErrorImpl { code: Message("Unknown i64 value: "), line: 0, column: 0 }) ``` and: ``` WARN:serenity::internal::ws_impl: (╯°□°)╯︵ ┻━┻ Error decoding: {"t":"MESSAGE_CREATE","s":1001192,"op":0,"d":{"type":0,"tts":false,"timestamp":"2017-06-01T01:01:01.000000+00:00","pinned":false,"nonce":true,"mentions":[],"mention_roles":[],"mention_everyone":false,"id":"redacted","embeds":[],"edited_timestamp":null,"content":"bork","channel_id":"redacted","author":{"username":"redacted","id":"redacted","discriminator":"redacted","bot":true,"avatar":"redacted"},"attachments":[]}} ERROR:serenity::client: Shard handler received err: Json(ErrorImpl { code: Message("invalid type: boolean `true`, expected identifier"), line: 0, column: 0 }) ```
* Update dependenciesZeyla Hellyer2017-06-211-28/+28
|
* Add 'wait' parameter to http::execute_webhookZeyla Hellyer2017-06-201-4/+5
| | | | | | The 'wait' parameter allows you to specify waiting for the Message to be sent prior to receiving a response, which will have Discord include the JSON representation of the Message in the body.
* Fix broken docs links on Permissions structZeyla Hellyer2017-06-171-5/+5
|
* Deprecate a couple Channel methodsZeyla Hellyer2017-06-171-0/+2
| | | | | | | Deprecate `Channel::delete_messages` and `Channel::delete_permission`. These methods aren't available on all of the variants' types, so they shouldn't be on the Channel either.
* Fix broken link from ModelErrorZeyla Hellyer2017-06-141-0/+1
|
* Make EmbedFooter icon URLs optionalZeyla Hellyer2017-06-141-2/+2
|
* Add `Member::permissions`alex2017-06-141-0/+27
|