From 093f97f2bc0cacaa71a7e6df0e088142f103b981 Mon Sep 17 00:00:00 2001 From: Chris Rhodes Date: Mon, 28 Dec 2015 20:43:27 -0800 Subject: [PATCH] Implement GuildBanCreateAndDeleteComments --- restapi.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/restapi.go b/restapi.go index a906eb8..8faafec 100644 --- a/restapi.go +++ b/restapi.go @@ -284,6 +284,17 @@ func (s *Session) GuildBanCreate(guildID, userID string) (err error) { return } +// GuildBanCreateAndDeleteComments bans the given user from the given guild +// and deletes all of their comments younger than a number of days. +// guildID : The ID of a Guild. +// userID : The ID of a User +// days : The number of days of comments to delete +func (s *Session) GuildBanCreateAndDeleteComments(guildID, userID string, days int) (err error) { + + _, err = s.Request("PUT", fmt.Sprintf("%v?delete-message-days=%v", GUILD_BAN(guildID, userID), days), nil) + return +} + // GuildBanDelete removes the given user from the guild bans // guildID : The ID of a Guild. // userID : The ID of a User