[Mutes] Don't send dms to bots (#5071)

This commit is contained in:
aleclol 2021-05-23 10:24:08 -04:00 committed by GitHub
parent c4a9d97a4b
commit 820b21dccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -516,6 +516,9 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
reason: Optional[str], reason: Optional[str],
duration=None, duration=None,
): ):
if user.bot:
return
if not await self.config.guild(guild).dm(): if not await self.config.guild(guild).dm():
return return