mirror of
https://github.com/runyanjake/discord.git
synced 2025-10-04 23:27:29 -07:00
Updates to logging
This commit is contained in:
parent
f1dbb82e1d
commit
915fac2eba
@ -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.')
|
||||
|
Loading…
x
Reference in New Issue
Block a user