diff options
| author | acdenisSK <[email protected]> | 2017-07-08 00:43:09 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-07-08 00:43:09 +0200 |
| commit | 420f9bdaa5a5022ff1d769f1d44a689a6fea12a4 (patch) | |
| tree | 03a2e6002dfd626a8827cc43d24fa49263c107a5 /src/http | |
| parent | Actually, use `unreachable!` instead of `panic!` (diff) | |
| download | serenity-420f9bdaa5a5022ff1d769f1d44a689a6fea12a4.tar.xz serenity-420f9bdaa5a5022ff1d769f1d44a689a6fea12a4.zip | |
Implement attaching reasons to bans
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs index 1ab2441..382f264 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -132,13 +132,14 @@ pub fn add_member_role(guild_id: u64, user_id: u64, role_id: u64) -> Result<()> /// [`Guild`]: ../model/struct.Guild.html /// [`User`]: ../model/struct.User.html /// [Ban Members]: ../model/permissions/constant.BAN_MEMBERS.html -pub fn ban_user(guild_id: u64, user_id: u64, delete_message_days: u8) -> Result<()> { +pub fn ban_user(guild_id: u64, user_id: u64, delete_message_days: u8, reason: &str) -> Result<()> { verify(204, request!(Route::GuildsIdBansUserId(guild_id), put, - "/guilds/{}/bans/{}?delete_message_days={}", + "/guilds/{}/bans/{}?delete_message_days={}&reason={}", guild_id, user_id, - delete_message_days)) + delete_message_days, + reason)) } /// Broadcasts that the current user is typing in the given [`Channel`]. |