Commit ebb3a867 authored by zeroone2numeral2's avatar zeroone2numeral2
Browse files

Procfile

parent 0653c4f5
bot: python3 main.py
import logging
import importlib
from bot import updater
from bot import dispatcher
logging.basicConfig(format='[%(asctime)s][%(name)s] %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
def main():
for modname in ["sed", "help", "yesno"]:
module = getattr(importlib.import_module('bot.modules.{}'.format(modname)), "module")
logger.info("module imported: %s (handlers: %d)", module.name, len(module.handlers))
for handler in module.handlers:
dispatcher.add_handler(handler)
updater.start_polling(clean=True)
updater.idle()
if __name__ == '__main__':
main()
import logging
import importlib
from bot import updater
from bot import dispatcher
logging.basicConfig(format='[%(asctime)s][%(name)s] %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
def main():
for modname in ["sed", "help", "yesno"]:
module = getattr(importlib.import_module('bot.modules.{}'.format(modname)), "module")
logger.info("module imported: %s (handlers: %d)", module.name, len(module.handlers))
for handler in module.handlers:
dispatcher.add_handler(handler)
updater.start_polling(clean=True)
updater.idle()
if __name__ == '__main__':
main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment