summaryrefslogtreecommitdiff
path: root/wrapper_command.py
blob: dd51534c26c246e570c32808a23c2e7c188e9270 (plain)
1
2
3
4
5
6
7
8
9
10
11
from wrapper_player import *

def command(command = "help"):
    def decorator(wrapped):        
        @hook.command(command)
        def wrapper(sender, command, label, args):
            try:
                return wrapped(sender = py_players[sender], command = command, label = label, args = args)
            except:
                print(print_traceback())
    return decorator