Reworked system/member property commands, fixed help system and bounds checking on tags

This commit is contained in:
Ske 2018-07-14 00:05:37 +02:00
parent ea92569d26
commit 800f537b80
4 changed files with 162 additions and 208 deletions

View file

@ -44,11 +44,11 @@ async def on_message(message):
command_items = sorted(command_items, key=lambda x: len(x[0]), reverse=True)
prefix = "pk;"
for command, (func, _, _) in command_items:
for command, (func, _, _, _) in command_items:
if message.content.startswith(prefix + command):
args_str = message.content[len(prefix + command):].strip()
args = args_str.split(" ")
# Splitting on empty string yields one-element array, remove that
if len(args) == 1 and not args[0]:
args = []