Exemple #1
0
def modify_commands(lrrbot, user, data):
    commands.static.modify_commands(data)
    bot.compile()
Exemple #2
0
def modify_commands(lrrbot, user, data):
	commands.static.modify_commands(data)
	bot.compile()
Exemple #3
0
def modify_explanations(lrrbot, user, data):
	commands.explain.modify_explanations(data)
	bot.compile()
Exemple #4
0
#!/usr/bin/env python3

import logging

from lrrbot import bot, log, chatlog, twitchsubs
from common.config import config


logging.basicConfig(level=config['loglevel'], format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s")
if config['logfile'] is not None:
	fileHandler = logging.FileHandler(config['logfile'], 'a', 'utf-8')
	fileHandler.formatter = logging.root.handlers[0].formatter
	logging.root.addHandler(fileHandler)

import lrrbot.commands
import lrrbot.serverevents
bot.compile()

chatlog.createthread()
twitchsubs.createthread()

try:
	log.info("Bot startup")
	bot.start()
except (KeyboardInterrupt, SystemExit):
	pass
finally:
	log.info("Bot shutdown")
	logging.shutdown()
	chatlog.exitthread()