|
|
|
@ -94,7 +94,6 @@ def do_create(full_user, arguments, note_obj): |
|
|
|
|
) |
|
|
|
|
return([f'{full_user}Added {arguments[0]}, ID {character_id}.',[file_id]]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def do_help(full_user): |
|
|
|
|
'''Provides a list of commands that the bot can do.''' |
|
|
|
|
return f'{full_user} Here\'s what I can do:\n \ |
|
|
|
@ -102,11 +101,6 @@ def do_help(full_user): |
|
|
|
|
- `create <name> <rarity> <weight>` Creates a character using a given image.\ |
|
|
|
|
- `help` Shows this message' |
|
|
|
|
|
|
|
|
|
def do_invalid_command(command, full_user): |
|
|
|
|
'''Generic response when an unknown or invalid command is sent''' |
|
|
|
|
return f'{full_user} Unrecognised command: {command}\n\ |
|
|
|
|
Message \'help\' to get a list of valid commands' |
|
|
|
|
|
|
|
|
|
def generate_response(parsed_command): |
|
|
|
|
'''Given a command with arguments, processes the game state and |
|
|
|
|
returns a response''' |
|
|
|
@ -120,4 +114,4 @@ def generate_response(parsed_command): |
|
|
|
|
case 'help': |
|
|
|
|
return do_help(command) |
|
|
|
|
case _: |
|
|
|
|
return do_invalid_command(command, full_user) |
|
|
|
|
return None |
|
|
|
|