mirror of
https://github.com/runyanjake/discord.git
synced 2025-10-04 23:27:29 -07:00
Update error messages
This commit is contained in:
parent
d8d0f7f065
commit
49508a5d1c
@ -34,15 +34,22 @@ async def handle_message(client, message):
|
|||||||
case 'helloworld':
|
case 'helloworld':
|
||||||
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 for valid usage.')
|
await message.author.send('Unexpected arguments for command: `' + message.content + '`. Check list of commands (`/pws help`) for valid usage.')
|
||||||
else:
|
else:
|
||||||
await hello_world(message)
|
await hello_world(message)
|
||||||
case 'echo':
|
case 'echo':
|
||||||
if not args:
|
if not args:
|
||||||
logging.warn('Command ' + command + ' did not specify argument(s): ' + message.content + '.')
|
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:
|
else:
|
||||||
await echo(message, args)
|
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 _:
|
case _:
|
||||||
logging.warn('Invalid command ' + command + ' received.')
|
logging.warn('Invalid command ' + command + ' received.')
|
||||||
await message.author.send('Invalid command `' + command + '`. Check list of commands for valid usage.')
|
await message.author.send('Invalid command `' + command + '`. Check list of commands for valid usage.')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user