word_cloud_bot/main.py

21 lines
531 B
Python
Raw Normal View History

2021-05-05 02:59:30 +00:00
from telegram.ext import Updater
from config import TOKEN
2021-05-05 08:13:28 +00:00
from func import start_handler, chat_content_handler, check_schedule
import schedule
import task
import threading
# schedule.every().day.at('16:20').do(task).tag('task')
schedule.every(1).minutes.do(task).tag('task')
threading.Thread(target=check_schedule).start()
2021-05-05 02:59:30 +00:00
updater = Updater(token=TOKEN, use_context=True)
dispatcher = updater.dispatcher
dispatcher.add_handler(start_handler)
2021-05-05 03:10:01 +00:00
dispatcher.add_handler(chat_content_handler)
2021-05-05 02:59:30 +00:00
updater.start_polling()
updater.idle()