async def to_yaml_(message: Message): """yaml-ify""" await message.edit_or_send_as_file( yamlify(convert(clean_obj(message.reply_to_message or message, True))), filename="YAML.txt", caption="Too Large", )
async def to_json_(message: Message): """Json-ify""" msg = message.reply_to_message or message if "-c" in message.flags: msg = clean_obj(msg, True) await message.edit_or_send_as_file(text=str(msg), filename="Json.txt", caption="Too Large")
"header": "Voice Chat info", "examples": "{tr}vc_info", "flags": { "-d": "Detailed User info" }, }, allow_channels=False, allow_private=False, allow_via_bot=False, ) async def vcinfo_(message: Message): if not (group_call := (await get_group_call(message))): return gc_data = await userge.send(GetGroupCall(call=group_call)) gc_info = {} gc_info["ℹ️ INFO"] = clean_obj(gc_data.call, convert=True) if len(gc_data.users) != 0: if "-d" in message.flags: gc_info["👥 Participants"] = [ clean_obj(x, convert=True) for x in gc_data.participants ] else: gc_info["👥 Users"] = [{ "Name": x.first_name, "ID": x.id } for x in gc_data.users] await message.edit_or_send_as_file( text="🎙 **Voice Chat**\n\n" + yamlify(gc_info), filename="group_call.yaml", caption="Group_Call_Info", )