minecraft_manager/assets/bots/OreAlert.bot.py

17 lines
409 B
Python
Raw Normal View History

2018-09-20 02:56:17 +00:00
import os, sys, django
sep = os.sep
path = os.path.dirname(os.path.abspath(__file__))
path = path.split(sep)[:-3]
project = path[-1]
path = sep.join(path)
sys.path.append(path)
print("Setting path for {0}: {1}".format(project, path))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{}.settings".format(project))
django.setup()
from minecraft_manager.api.bot import OreAlert
bot = OreAlert()
bot.run_bot()