Merge branch 'bans' into develop

This commit is contained in:
Chris Rhodes 2015-12-28 21:18:52 -08:00
commit db77e987e9

View file

@ -275,15 +275,26 @@ func (s *Session) GuildBans(guildID string) (st []User, err error) {
return
}
// GuildBanAdd bans the given user from the given guild.
// GuildBanCreate bans the given user from the given guild.
// guildID : The ID of a Guild.
// userID : The ID of a User
func (s *Session) GuildBanAdd(guildID, userID string) (err error) {
func (s *Session) GuildBanCreate(guildID, userID string) (err error) {
_, err = s.Request("PUT", GUILD_BAN(guildID, userID), nil)
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("%s?delete-message-days=%d", 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