Python

send_modal

ra

rampaka
답변 대기중
30 XP
await interaction.response.send_modal(WalletInput(title="지갑", amount=_amount, coin=self.children[0].value))

위 코드에서 아래와 같은 오류가 발생합니다.

Ignoring exception in modal <cogs.buttons.AmountInput object at 0x109d90310>:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/ui/modal.py", line 341, in dispatch
    await value.callback(interaction)
  File "/Users/jeongjiwon/Desktop/bitgate/cogs/buttons.py", line 73, in callback
    await interaction.response.send_modal(WalletInput(title="지갑", amount=_amount, coin=self.children[0].value))
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/interactions.py", line 1056, in send_modal
    await self._locked_response(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/interactions.py", line 1090, in _locked_response
    await coro
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/discord/webhook/async_.py", line 221, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In type: Value must be one of {4, 5, 6, 7, 10}.

어디가 문제인지 이해가 안되어 질문 올려봅니다.


불러오는 중...