From 915fac2ebad207e18b52d6ef46bf774aa40c097c Mon Sep 17 00:00:00 2001 From: whitney Date: Thu, 16 May 2024 15:13:01 -0700 Subject: [PATCH] Updates to logging --- pwsBot/commands/message_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwsBot/commands/message_handler.py b/pwsBot/commands/message_handler.py index c4ff22d..3ccb192 100644 --- a/pwsBot/commands/message_handler.py +++ b/pwsBot/commands/message_handler.py @@ -13,7 +13,7 @@ log_format = '%(asctime)s %(levelname)s\t%(filename)s %(message)s' logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, format=log_format) async def handle_message(client, message): - logging.info('Received message: ' + str(message.content)) + logging.info('Observed message: "' + str(message.content) + '" from user [' + str(message.author) + '].') #Ignore messages this bot has sent to avoid answering itself. if message.author == client.user: @@ -42,7 +42,7 @@ async def handle_message(client, message): logging.warn('Command ' + command + ' did not specify argument(s): ' + message.content + '.') await message.author.send('Did not specify argument(s) for command: `' + message.content + '`. Check list of commands for valid usage.') else: - await echo(message) + await echo(message, args) case _: logging.warn('Invalid command ' + command + ' received.') await message.author.send('Invalid command `' + command + '`. Check list of commands for valid usage.')