Error should only pop up if the message was typed in the DMs

pull/4/head
sgoudham 4 years ago
parent b77dce3425
commit 125794529c

@ -335,7 +335,7 @@ class Modmail(commands.Cog):
# Wait for the message from the author # Wait for the message from the author
msg = await self.bot.wait_for('message', check=check, timeout=300) msg = await self.bot.wait_for('message', check=check, timeout=300)
while len(msg.content) < 50: while len(msg.content) < 50 and isinstance(msg.channel, DMChannel):
await ctx.send(embed=ErrorHandling(member)) await ctx.send(embed=ErrorHandling(member))
# Wait for the message from the author # Wait for the message from the author

Loading…
Cancel
Save