async def echo(hell): if hell.fwd_from: return lsts = get_all_echos() if len(lsts) > 0: output_str = "echo enabled users:\n\n" for echos in lsts: output_str += ( f"[User](tg://user?id={echos.user_id}) in chat `{echos.chat_id}`\n" ) else: output_str = "No echo enabled users " if len(output_str) > Config.MAX_MESSAGE_SIZE_LIMIT: key = ( requests.post( "https://nekobin.com/api/documents", json={"content": output_str} ) .json() .get("result") .get("key") ) url = f"https://nekobin.com/{key}" reply_text = f"echo enabled users: [here]({url})" await edit_or_reply(hell, reply_text) else: await edit_or_reply(hell, output_str)
async def echo(cat): if cat.fwd_from: return lsts = get_all_echos() if len(lsts) > 0: output_str = "echo enabled users:\n\n" for echos in lsts: output_str += f"[User](tg://user?id={echos.user_id}) in chat `{echos.chat_id}`\n" else: output_str = "No echo enabled users " if len(output_str) > Config.MAX_MESSAGE_SIZE_LIMIT: key = requests.post('https://nekobin.com/api/documents', json={ "content": output_str }).json().get('result').get('key') url = f'https://nekobin.com/{key}' reply_text = f'echo enabled users: [here]({url})' await edit_or_reply(cat, reply_text) else: await edit_or_reply(cat, output_str)