def __init__(self, channel, bot, settings=None, data=None, logger=None, chat=None):
    self.channel = channel
    self.bot = bot
    if chat:
        self.chat = chat
    else:
        self.chat = Chat(self.bot, self.channel)
    self.settings = settings
    self.logger = logger
    self.commands = {}
    self.timers = []
    self.datasource = DataSource(channel, bot, data)
    self.commands_last_executed = {}
    self.lua = lupa.LuaRuntime(unpack_returned_tuples=False)
    self._inject_globals()
def __init__(self, channel, bot, settings=None, data=None, logger=None, chat=None):
    self.channel = channel
    self.bot = bot
    if chat:
        self.chat = chat
    else:
        self.chat = Chat(self.bot, self.channel)
    self.settings = settings
    self.logger = logger
    self.commands = {}
    self.timers = []
    self.datasource = DataSource(channel, bot, data)
    self.commands_last_executed = {}
    self.lua = lupa.LuaRuntime(unpack_returned_tuples=False)
    self._inject_globals()