Intra League Command System - PMatthaei/ma-league GitHub Wiki

Commands

class BaseCommand:

    def __init__(self, command_type: CommandTypes, origin: int, resource: Resources, data: Any):
        self.id_ = uuid.uuid4()
        self.type = command_type
        self.origin = origin
        self.resource = resource
        self.data = data

Every command has a unique identifier. It is defined by it`s type and origin, as well as the league resource affected by the command. Changes are supplied via the data field.