diff options
| author | Austin Hellyer <[email protected]> | 2017-01-24 12:07:41 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2017-01-24 12:07:41 -0800 |
| commit | 94131908f00a8cbb714f3a93066e2a83dfc1c5b3 (patch) | |
| tree | 86cb349c3093ab9722ae47a649deebe8da9d6c13 /src/client/rest/mod.rs | |
| parent | Properly drop on binds (diff) | |
| download | serenity-94131908f00a8cbb714f3a93066e2a83dfc1c5b3.tar.xz serenity-94131908f00a8cbb714f3a93066e2a83dfc1c5b3.zip | |
Fix docs links
Diffstat (limited to 'src/client/rest/mod.rs')
| -rw-r--r-- | src/client/rest/mod.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/rest/mod.rs b/src/client/rest/mod.rs index ff49809..66ba043 100644 --- a/src/client/rest/mod.rs +++ b/src/client/rest/mod.rs @@ -96,7 +96,9 @@ pub fn set_token(token: &str) { /// let _result = rest::accept_invite(code); /// ``` /// +/// [`Client::on_guild_create`]: ../struct.Client.html#method.on_guild_create /// [`Context::accept_invite`]: ../struct.Context.html#method.accept_invite +/// [`Guild`]: ../../model/struct.Guild.html /// [`Invite`]: ../../model/struct.Invite.html /// [`utils::parse_invite`]: ../../utils/fn.parse_invite.html pub fn accept_invite(code: &str) -> Result<Invite> { @@ -400,7 +402,7 @@ pub fn create_webhook(channel_id: u64, map: Value) -> Result<Webhook> { Webhook::decode(serde_json::from_reader(response)?) } -/// Deketes a private channel or a channel in a guild. +/// Deletes a private channel or a channel in a guild. pub fn delete_channel(channel_id: u64) -> Result<Channel> { let response = request!(Route::ChannelsId(channel_id), delete, @@ -634,7 +636,9 @@ pub fn edit_member(guild_id: u64, user_id: u64, map: Value) -> Result<()> { user_id)) } -/// Changes message content, only if owned by us. +/// Edits a message by Id. +/// +/// **Note**: Only the author of a message can modify it. pub fn edit_message(channel_id: u64, message_id: u64, map: Value) -> Result<Message> { let body = serde_json::to_string(&map)?; let response = request!(Route::ChannelsIdMessagesId(channel_id), @@ -848,6 +852,10 @@ pub fn edit_webhook_with_token(webhook_id: u64, token: &str, map: Value) -> Resu /// return; /// }, /// }; +/// +/// [`Channel`]: ../../model/enum.Channel.html +/// [`Message`]: ../../model/struct.Message.html +/// [Discord docs]: https://discordapp.com/developers/docs/resources/webhook#querystring-params pub fn execute_webhook(webhook_id: u64, token: &str, map: Value) -> Result<Message> { let body = serde_json::to_string(&map)?; let client = HyperClient::new(); |