master
Marc 2021-05-28 17:23:25 +01:00
parent f5ea899ae7
commit 6c0d9911c8
No known key found for this signature in database
GPG Key ID: 0657563F705ACAAE
1 changed files with 8 additions and 1 deletions

View File

@ -33,12 +33,19 @@ func (f *Features) handleSetSlowmode(s *discordgo.Session, m *discordgo.MessageC
for _, channel := range channels {
s.ChannelEditComplex(channel.ID, &discordgo.ChannelEdit{
Position: channel.Position,
RateLimitPerUser: slowModeTime,
})
}
}
} else {
_, err := s.ChannelEditComplex(m.ChannelID, &discordgo.ChannelEdit{
channel, err := s.Channel(m.ChannelID)
if err != nil {
return err
}
_, err = s.ChannelEditComplex(m.ChannelID, &discordgo.ChannelEdit{
Position: channel.Position,
RateLimitPerUser: slowModeTime,
})
if err != nil {