skip to Main Content

pyrogram: for msg in await app.get_history(chat, limit=1): AttributeError: 'Client' object has no attribute 'get_history' – Debian

import time import pyrogram app = pyrogram.Client("my_account", api_id=********, api_hash="***********ffe01e582ef") @app.on_message(pyrogram.filters.command('start', prefixes='.') & pyrogram.filters.me) async def sms(_, msg): with app: public = await app.get_chat('@public_name') chat = public.id while True: for msg in await app.get_history(chat, limit=1): if msg.text == 'Menu:': await app.send_message(chat,…

VIEW QUESTION

Alter docker-compose.yml to add ports with python

def make_file(): read_file = r'C:Users~Desktopsample.yml' write_file = r'C:Users~Desktopsample_out.yml' f = open(read_file, 'r') lst = [line for line in f] f.close() ports = 'ports:n' for index in range(len(lst)): if "system_frontend:" in lst[index]: count_spaces = len(lst[index+1]) - len(lst[index+1].lstrip(' ')) lst.insert(index+1, ports) lst[index+1]…

VIEW QUESTION
Back To Top
Search