TheHamkerCat %!s(int64=5) %!d(string=hai) anos
pai
achega
f55b1cd6eb
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      .github/workflows/main.yml
  2. 2 2
      wbb/modules/stickers.py

+ 1 - 1
.github/workflows/main.yml

@@ -6,7 +6,7 @@ jobs:
     name: Build
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@dev
+    - uses: actions/checkout@master
     - name: send custom message with args
       uses: appleboy/telegram-action@master
       with:

+ 2 - 2
wbb/modules/stickers.py

@@ -6,7 +6,7 @@ from wbb.utils.errors import capture_err
 from wbb.utils.files import resize_file_to_sticker_size, upload_document, get_document_from_file_id
 from wbb.utils.stickerset import get_sticker_set_by_name, create_sticker, add_sticker_to_set, create_sticker_set
 from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from pyrogram.errors.exceptions.bad_request_400 import PeerIdInvalid, StickerPngNopng
+from pyrogram.errors.exceptions.bad_request_400 import PeerIdInvalid, StickerPngNopng, UserIsBlocked
 
 __MODULE__ = "Stickers"
 __HELP__ = """/sticker_id - To Get File ID of A Sticker.
@@ -112,7 +112,7 @@ async def kang(client, message):
                     sticker_emoji
                     )
                 )
-    except PeerIdInvalid:
+    except (PeerIdInvalid, UserIsBlocked):
         keyboard = InlineKeyboardMarkup(
             [[InlineKeyboardButton(text="Start", url=f"t.me/{BOT_USERNAME}")]])
         await msg.edit("Contact Me In Pm First", reply_markup=keyboard)