Make it possible to set slowmode in stage/voice channels (#6108)

This commit is contained in:
Jakub Kuczys 2023-05-02 22:05:51 +02:00 committed by GitHub
parent 6a53d7dcd5
commit b7c710ac04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,9 +30,6 @@ class Slowmode(MixinMeta):
Interval can be anything from 0 seconds to 6 hours.
Use without parameters to disable.
"""
if not isinstance(ctx.channel, (discord.TextChannel, discord.Thread)):
await ctx.send(_("Slowmode can only be set in text channels and threads."))
return
seconds = interval.total_seconds()
await ctx.channel.edit(slowmode_delay=seconds)
if seconds > 0: