Commented on_raw_update event

This commit is contained in:
Profitroll 2022-08-30 14:01:12 +02:00
parent 91a1d7e349
commit da97606bb4

View File

@ -385,14 +385,16 @@ def callback_query_unblock(app, clb): # type: ignore
clb.answer(text=locale("sub_unblock", "callback", locale=user_locale).format(fullclb[2]), show_alert=True)
#===========================================================================================================================================
@app.on_raw_update()
def fwd_got(app, update, users, chats):
if isinstance(update, UpdateChannelMessageForwards):
logWrite(f'Forward count increased to {update["forwards"]} on post {update["id"]} in channel {update["channel_id"]}')
logWrite(str(users), debug=True)
logWrite(str(chats), debug=True)
# else:
# logWrite(f"Got raw update of type {type(update)} with contents {update}", debug=True)
# Work in progress
# Handle new forwards
# @app.on_raw_update()
# def fwd_got(app, update, users, chats):
# if isinstance(update, UpdateChannelMessageForwards):
# logWrite(f'Forward count increased to {update["forwards"]} on post {update["id"]} in channel {update["channel_id"]}')
# logWrite(str(users), debug=True)
# logWrite(str(chats), debug=True)
# # else:
# # logWrite(f"Got raw update of type {type(update)} with contents {update}", debug=True)
for entry in configGet("time", "posting"):
schedule.every().day.at(entry).do(send_content)