'' 'import json время импорта из datetime импорт datetime, date, time импорт pprint импорт telegram.ext из telegram.ext импорт Updater, CommandHandler, MessageHandler, фильтры
with open("data.json") as json_file:
database = json.load(json_file)
pass
def notify(update, context):
context.bot.send_message(chat_id=chat_id,
text="Set successful")
context.job_queue.run_daily(callback_minute,time=time(15,35,00) ,
days=(0, 1, 2, 3, 4, 5, 6),context=update.message.chat_id)
pass
def callback_minute(context):
chat_id=context.job.context
for i in range(len(database)):
if database[i]['D/M/Y'] == current_time:
context.bot.send_message(chat_id=chat_id,
text='{}'.format((database[i])))
pass
def main():
updater = Updater(token=,use_context=True)
dp = updater.dispatcher
dp.add_handler(CommandHandler("daily",notify,pass_job_queue=True,pass_update_queue=True))
updater.start_polling()
updater.idle()
if __name__ == '__main__':
main()
' ''