diff --git a/app.py b/app.py index 8bca97d..aa85279 100644 --- a/app.py +++ b/app.py @@ -37,13 +37,15 @@ async def on_message(message): logger.info(f"Ping by {message.author.name}") await message.channel.send(f"{message.author.mention} 👋") return + + messagearray = message.content.split() + + if not (isinstance(message.channel, discord.channel.DMChannel)) and not (messagearray[0] == client.user.mention): + return # Handle @Bot mention - messagearray = message.content.split() if messagearray[0] == client.user.mention: messagearray.pop(0) - else: - return command = messagearray[0].lower()