def open_window(self):
""" Открыть 2 окно """
new_window = add_product_to_catalogue()
new_window.show()
def open_window(self):
""" Открыть 2 окно """
self.new_window = add_product_to_catalogue.Widget()
self.new_window.show()
class TgClient:
def __init__(self, session_file, api_id, api_hash):
...
client = TelegramClient(self.session_file, self.api_id, self.api_hash)
@client.on(events.NewMessage(incoming=True)
def handler(event):
# some action after reciving a message