def on_user_update(peer, what_changed): _bot.on_user_update(peer, what_changed) def on_chat_update(peer, what_changed): _bot.on_chat_update(peer, what_changed) # def handle_sigint(signal, frame): # print("CTRL-C: exiting.") # tgl.safe_exit(0) print("GuardBot starting...") _bot = Bot() # !!!ENTER YOUR ID HERE!!! _bot.sudo_list = [] _bot.banned_ids = [] tgl.set_on_binlog_replay_end(on_binlog_replay_end) tgl.set_on_get_difference_end(on_get_difference_end) tgl.set_on_our_id(on_our_id) tgl.set_on_msg_receive(on_msg_receive) tgl.set_on_secret_chat_update(on_secret_chat_update) tgl.set_on_user_update(on_user_update) tgl.set_on_chat_update(on_chat_update) # signal.signal(signal.SIGINT, handle_sigint) _bot.reload_plugins() print("GuardBot started successfully.")