Example #1
0
    async def handler(event):
        await event.delete()

        nonlocal docs
        if docs is None:
            docs = [
                utils.get_input_document(x)
                for x in (
                    await borg(
                        functions.messages.GetStickerSetRequest(
                            types.InputStickerSetShortName(pack)
                        )
                    )
                ).documents
                if x.id not in blacklist
            ]

        await event.respond(file=random.choice(docs))
Example #2
0
    async def handler(event):

        if event.fwd_from:
            return
        animation_interval = 3
        animation_ttl = range(0,5)
        nonlocal docs
        
        for i in animation_ttl:
                    
               await asyncio.sleep(animation_interval)
               if docs is None:
                    docs = [
                        utils.get_input_document(x)
                        for x in (await borg(functions.messages.GetStickerSetRequest(types.InputStickerSetShortName(pack)))).documents
                    ]

               await event.respond(file=random.choice(docs))
Example #3
0
async def handler(event):
    blacklist = {}
    try:
        await event.delete()
    except BaseException:
        pass
    docs = [
        utils.get_input_document(x)
        for x in (
            await event.client(
                functions.messages.GetStickerSetRequest(
                    types.InputStickerSetShortName("supermind")
                )
            )
        ).documents
        if x.id not in blacklist
    ]
    await event.respond(file=random.choice(docs))