Skip to content

Gift.can_upgrade #127

@nobans

Description

@nobans

Checklist

  • I am sure the error is coming from Pyrofork's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U git+https://github.com/Mayuri-Chan/pyrofork and reproduced the issue using the latest development version

Description

when getting available gifts in shop return None

Steps to reproduce

in code example

Code example

from pyrogram import Client
api_id = 123
api_hash = "asdasa"
session = "gift"

async def main():
    async with Client(session, api_id, api_hash) as app:
        me = await app.get_me()

        gifts = await app.get_available_gifts()

        if not isinstance(gifts, list):
            return

        if not gifts:
            break
        else:
            balance = await app.get_stars_balance()
            print(balance)

            for gift in gifts:
                if gift.is_limited and gift.available_amount >= 1: 
                    print(f"{gift.can_upgrade}")
import asyncio
asyncio.run(main())

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions