@bot.event
async def on_button_click(interaction ):
if interaction.component.custom_id == "Qiwi":
async with p2p:
global new_bill
new_bill = await p2p.bill( lifetime=2)
await interaction.send(f'{new_bill.bill_id} {new_bill.pay_url}', ephemeral = True)
elif interaction.component.custom_id == "Qiwip":
async with p2p:
await interaction.send(await p2p.check(bill_id=new_bill.bill_id).status)
библиотека pyqiwip2p
Вот ошибка:
RuntimeWarning: Enable tracemalloc to get the object allocation traceback Ignoring exception in on_button_click
Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\disnake\client.py", line 700, in _run_event
await coro(*args, **kwargs)
File "C:\Users\user\PycharmProjects\sadreatournaments\sadreaaaa.py", line 617, in on_button_click
await p2p.check(new_bill).status
AttributeError: 'coroutine' object has no attribute 'status'
C:\Users\user\AppData\Roaming\Python\Python310\site-packages\disnake\client.py:705: RuntimeWarning: coroutine 'AioQiwiP2P.check' was never awaited
await self.on_error(event_name, *args, **kwargs)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback