#unknown webhook error

1 messages · Page 1 of 1 (latest)

dreamy star
#

my script:

    embed = interactions.Embed(
        title="8ball command", 
        fields=[
            interactions.EmbedField(
                name="question",
                value=question,
                inline=True,
                ),
            interactions.EmbedField(
                name="answer",
                value=random_answer,
                inline=True,
                )],
        color=0xff0000
        )
    await ctx.send(embed)
pliant sorrelBOT
#

Hey! Once your issue is solved, press the button below to close this thread!

dreamy star
#

im trying to send embed using bot command

#

full error:

Traceback (most recent call last):
  File "C:\Users\newpc\AppData\Local\Programs\Python\Python311\Lib\site-packages\interactions\api\http\request.py", line 146, in request
    async with self._session.request(
  File "C:\Users\newpc\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "C:\Users\newpc\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client.py", line 409, in _request
    data = payload.JsonPayload(json, dumps=self._json_serialize)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\newpc\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\payload.py", line 398, in __init__
    dumps(value).encode(encoding),
    ^^^^^^^^^^^^
  File "C:\Users\newpc\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\newpc\AppData\Local\Programs\Python\Python311\Lib\json\encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\newpc\AppData\Local\Programs\Python\Python311\Lib\json\encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\newpc\AppData\Local\Programs\Python\Python311\Lib\json\encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Embed is not JSON serializable

Unknown Webhook
gritty spindle
#

...

#

dude

#

embed=embed

dreamy star
#

OH

#

i totally forgot about that lol

#

anyways thx