| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
It's already been enough time for people to migrate
|
| |
|
|
| |
provided to the function instead
|
| | |
|
| |
|
|
| |
Possibly removes some overhead introduced by enums but makes the underlaying code of the function easier to read and is more concise
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Audit log works and does give a reason, so this note is just false info
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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`.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 })
```
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Switch from using `#[doc(hidden)]` to hide some internal functions to
`pub(crate)`.
The library now requires rustc 1.18.
|
| |
|
| |
Use the client ID instead of the user ID.
|
| |
|
|
| |
All codepaths result in Some value, so it doesn't need to be optional.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Negative message nonces caused deserialization errors, as serde would
not deserialize integers into strings.
To fix this, change `Message::nonce` into an `Option<Snowflake>` from an
`Option<String>`. This new `Snowflake` is a wrapper around an `i64`. Use
a new `I64Visitor` to deserialize i64s, u64s, and strs into the wanted
i64.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Instead of accepting a `&str`, make `User::direct_message` and
`User::dm` accept a `CreateMessage` builder for consistency with related
functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Chrono is easier to use than timestamped strings, so they should be
automatically deserialized and available for the user, instead of having
the user deserialize the strings themselves.
These fields have been changed to use a type of `DateTime<FixedOffset>`:
- `ChannelPinsUpdateEvent.last_pin_timestamp`
- `Group.last_pin_timestamp`
- `Guild.joined_at`
- `GuildChannel.last_pin_timestamp`
- `Invite.created_at`
- `Member.joined_at`
- `Message.edited_timestamp
- `Message.timestamp`
- `MessageUpdateEvent.edited_timestamp`
- `MessageUpdateEvent.timestamp`
- `PrivateChannel.last_pin_timestamp`
`Member.joined_at` is now also an `Option`. Previously, if a Guild
Member Update was received for a member not in the cache, a new Member
would be instantiated with a default String value. This is incorrect
behaviour, and has now been replaced with being set to `None` in that
case.
Id methods' `created_at()` method now return a `chrono::NaiveDateTime`
instead of a `time::Timespec`, and `User::created_at` has been updated
to reflect that.
Additionally, drop `time` as a direct dependency and use chrono for
internals.
|
| |
|
|
|
| |
These functions return the user's avatar URL, or their default avatar
URL as a fallback.
|
| | |
|
| |
|
|
|
|
| |
Helper methods such as `GuildChannel::send_files` linked to the
documentation for `ChannelId::send_file`, when they should be linking
to `ChannelId::send_files`.
|
| |
|
|
|
| |
With the way AttachmentType is meant to be used by `http::send_files`,
none of the values need to be moved, they only need to be borrowed.
|
| |
|
|
|
| |
Instead of fully qualifying the namespace when using
`std::mem::replace`, use just `mem::replace`.
|
| |
|
|
|
|
| |
The logic for the `User` and `CurrentUser` avatar methods (`avatar_url`,
`default_avatar_url`, `static_avatar_url`) were duplicated, so move the
logic out and have each method simply call the related function.
|