Пример #1
0
def modify_explanations(lrrbot, user, data):
	commands.explain.modify_explanations(data)
	bot.compile()
Пример #2
0
#!/usr/bin/env python3

import logging

from lrrbot import chatlog
from lrrbot.main import bot, log
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()

try:
	log.info("Bot startup")
	bot.start()
except (KeyboardInterrupt, SystemExit):
	pass
finally:
	log.info("Bot shutdown")
	logging.shutdown()
Пример #3
0
def modify_commands(lrrbot, user, data):
	commands.static.modify_commands(data)
	bot.compile()