Nikita Kalanakov 2 yıl önce
ebeveyn
işleme
1d1aea8048
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      actions.py

+ 3 - 3
actions.py

@@ -107,15 +107,15 @@ async def add_sticker(bot, file, emoji):
   if not pack:
     pack = await create_new_pack(bot, sticker)
   else:
+    await StickerPack.filter(id=pack.id).update(stickers_count=F('stickers_count') + 1)
+
     pack = await bot(AddStickerToSetRequest(
       stickerset=InputStickerSetID(
         id=pack.sid,
         access_hash=pack.hash
       ), 
       sticker=sticker
-    ))
-
-    await StickerPack.filter(id=pack.id).update(stickers_count=F('stickers_count') + 1)
+    ))    
     
   return get_input_document(pack.documents[-1])