From d97109e5b83778587e4ffd5d1c62bd72b4e1aca2 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 23 Jun 2020 15:25:03 +0100 Subject: [PATCH] Dm messages sent by the owner are sent in #general Dm sent by anyone else are sent in #enso-chan-commands --- EnsoBot.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/EnsoBot.py b/EnsoBot.py index 2c0c55b3..25fbf5b3 100644 --- a/EnsoBot.py +++ b/EnsoBot.py @@ -248,20 +248,17 @@ async def marry(ctx, member: discord.Member): # Allows the bot to echo the dm's that it receives @client.event async def on_message(message): - if commands.is_owner(): - channel = client.get_channel(663651584399507481) - else: - # Get the channel id of the channel it wants to push messages to - channel = client.get_channel(721449922838134876) - - # If the channel that the message is sent in is private + # Checking if the message is not sent in server if message.guild is None: - if message.author.id == 578919370697342977: - # Echo the message contents to the channel specified + # Checking if the owner is sending the message + if commands.is_owner(): + # Send message to #general + channel = client.get_channel(663651584399507481) await channel.send(message.content) else: - # Do nothing - return + # Send message to #enso-chan~commands + channel = client.get_channel(721449922838134876) + await channel.send(message.content) await client.process_commands(message)