None
This commit is contained in:
parent
bec8b109cf
commit
498463b00e
4
main.py
4
main.py
@ -2,11 +2,11 @@ from telegram.ext import Updater
|
|||||||
from config import TOKEN
|
from config import TOKEN
|
||||||
from func import start_handler, chat_content_handler, check_schedule
|
from func import start_handler, chat_content_handler, check_schedule
|
||||||
import schedule
|
import schedule
|
||||||
import task
|
from task import do_task
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
# schedule.every().day.at('16:20').do(task).tag('task')
|
# schedule.every().day.at('16:20').do(task).tag('task')
|
||||||
schedule.every(1).minutes.do(task).tag('task')
|
schedule.every(1).minutes.do(do_task).tag('task')
|
||||||
|
|
||||||
threading.Thread(target=check_schedule).start()
|
threading.Thread(target=check_schedule).start()
|
||||||
|
|
||||||
|
3
task.py
3
task.py
@ -11,8 +11,9 @@ from config import TOKEN
|
|||||||
|
|
||||||
bot = telegram.Bot(token=TOKEN)
|
bot = telegram.Bot(token=TOKEN)
|
||||||
|
|
||||||
r = connector.get_connection()
|
|
||||||
|
|
||||||
|
def do_task():
|
||||||
|
r = connector.get_connection()
|
||||||
key_list = r.keys()
|
key_list = r.keys()
|
||||||
group_list = []
|
group_list = []
|
||||||
for i in key_list:
|
for i in key_list:
|
||||||
|
Loading…
Reference in New Issue
Block a user