Skip to content

send_gift() error #190

@bohd4nx

Description

@bohd4nx

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install https://github.com/TelegramPlayground/pyrogram/archive/dev.zip --force-reinstall and reproduced the issue using the latest development version

Description

InputInvoiceStarGift.__init__() got an unexpected keyword argument 'user_id'

Code example

async def _purchase(app: Client, chat_id: int, gift_id: int, quantity: int, gift_price: int) -> None:
        for i in range(quantity):
            current = i + 1
            try:
                await app.send_gift(user_id=chat_id, gift_id=gift_id, is_private=True)
                info(t("console.gift_sent", current=current, total=quantity, gift_id=gift_id, recipient=str(chat_id)))
                await send_notification(app, gift_id, user_id=chat_id, current_gift=current, total_gifts=quantity,
                                        success_message=True)
            except RPCError as ex:
                current_balance = await get_balance(app)
                await handle_error(app, ex, gift_id, chat_id, gift_price, int(current_balance))
                break

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