Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 9443e79e rédigé par celogeek's avatar celogeek
Parcourir les fichiers

fix display of packs with sticker-import --list

parent 85813b22
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -138,11 +138,12 @@ async def main(args: argparse.Namespace) -> None: ...@@ -138,11 +138,12 @@ async def main(args: argparse.Namespace) -> None:
if args.list: if args.list:
stickers: AllStickers = await client(GetAllStickersRequest(hash=0)) stickers: AllStickers = await client(GetAllStickersRequest(hash=0))
index = 1 index = 1
width = len(str(stickers.sets)) width = len(str(len(stickers.sets)))
print("Your saved sticker packs:") print("Your saved sticker packs:")
for saved_pack in stickers.sets: for saved_pack in stickers.sets:
print(f"{index:>{width}}. {saved_pack.title} " print(f"{index:>{width}}. {saved_pack.title} "
f"(t.me/addstickers/{saved_pack.short_name})") f"(t.me/addstickers/{saved_pack.short_name})")
index += 1
elif args.pack[0]: elif args.pack[0]:
input_packs = [] input_packs = []
for pack_url in args.pack[0]: for pack_url in args.pack[0]:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter