store .data_directory on bot object

This commit is contained in:
jesopo 2020-01-27 23:22:23 +00:00
parent 2bf277bbfc
commit b4deae3e2d
2 changed files with 4 additions and 3 deletions

View file

@ -113,7 +113,7 @@ if "external-modules" in config:
modules = ModuleManager.ModuleManager(events, exports, timers, config, log,
core_modules, extra_modules)
bot = IRCBot.Bot(directory, args, cache, config, database, events,
bot = IRCBot.Bot(directory, DATA_DIR, args, cache, config, database, events,
exports, log, modules, timers)
bot.add_poll_hook(cache)
bot.add_poll_hook(lock_file)

View file

@ -34,9 +34,10 @@ class ListLambdaPollHook(PollHook.PollHook):
return min(timeouts or [None])
class Bot(object):
def __init__(self, directory, args, cache, config, database, events,
exports, log, modules, timers):
def __init__(self, directory, data_directory, args, cache, config, database,
events, exports, log, modules, timers):
self.directory = directory
self.data_directory = data_directory
self.args = args
self.cache = cache
self.config = config