From 49508a5d1ce9426eb94957ac37a13a95b33b4cbe Mon Sep 17 00:00:00 2001 From: whitney Date: Tue, 28 Jan 2025 16:29:44 -0800 Subject: [PATCH] Update error messages --- pwsBot/commands/message_handler.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pwsBot/commands/message_handler.py b/pwsBot/commands/message_handler.py index 3ccb192..22eea63 100644 --- a/pwsBot/commands/message_handler.py +++ b/pwsBot/commands/message_handler.py @@ -34,15 +34,22 @@ async def handle_message(client, message): case 'helloworld': if args: logging.warn('Command ' + command + ' got unexpected arguments: ' + message.content + '.') - await message.author.send('Unexpected arguments for command: `' + message.content + '`. Check list of commands for valid usage.') + await message.author.send('Unexpected arguments for command: `' + message.content + '`. Check list of commands (`/pws help`) for valid usage.') else: await hello_world(message) case 'echo': if not args: 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.') + await message.author.send('Did not specify argument(s) for command: `' + message.content + '`. Check list of commands (`/pws help`) for valid usage.') else: await echo(message, args) + case 'help': + case 'commands': + if args: + 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.') + else: + await message.author.send('**Commands**\n- /pws helloworld\n- /pws echo\n- /pws help\n- /pws commands') case _: logging.warn('Invalid command ' + command + ' received.') await message.author.send('Invalid command `' + command + '`. Check list of commands for valid usage.')