Update message_handler

This commit is contained in:
whitney 2025-01-28 16:33:04 -08:00
parent 49508a5d1c
commit d7b1a0288f
2 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,7 @@ Simple Discord bot that does some useful things.
### Running ### Running
Build and run the docker container with a few commands: Build and run the docker container with a few commands:
`docker stop pwsBot && docker system prune && docker-compose build && docker-compose up -d && docker logs -f pwsBot` `docker-compose down && docker system prune -af && docker-compose build && docker-compose up -d && docker logs -f pwsBot`
### Functions ### Functions

View File

@ -43,8 +43,7 @@ async def handle_message(client, message):
await message.author.send('Did not specify argument(s) for command: `' + message.content + '`. Check list of commands (`/pws help`) for valid usage.') await message.author.send('Did not specify argument(s) for command: `' + message.content + '`. Check list of commands (`/pws help`) for valid usage.')
else: else:
await echo(message, args) await echo(message, args)
case 'help': case 'help' | 'commands':
case 'commands':
if args: if args:
logging.warn('Command ' + command + ' got unexpected arguments: ' + message.content + '.') logging.warn('Command ' + command + ' got unexpected arguments: ' + message.content + '.')
await message.author.send('Unexpected arguments for command: `' + message.content + '`. Check list of commands (`/pws help`) for valid usage.') await message.author.send('Unexpected arguments for command: `' + message.content + '`. Check list of commands (`/pws help`) for valid usage.')