danparizher / Pax-Academia

General purpose utility bot for the Homework Help Discord server
MIT License
13 stars 5 forks source link

Embed Title overflow in `/define` #198

Closed danparizher closed 1 year ago

danparizher commented 1 year ago
Ignoring exception in command define:
Traceback (most recent call last):
  File "C:\Production code\Pax-Academia\venv\Lib\site-packages\discord\commands\core.py", line 124, in wrapped
    ret = await coro(arg)
          ^^^^^^^^^^^^^^^
  File "C:\Production code\Pax-Academia\venv\Lib\site-packages\discord\commands\core.py", line 978, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "C:\Production code\Pax-Academia\util\Logging.py", line 65, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Production code\Pax-Academia\cogs\Dictionary.py", line 522, in define
    await ctx.respond(embed=embed)
  File "C:\Production code\Pax-Academia\venv\Lib\site-packages\discord\commands\context.py", line 286, in respond
    return await self.followup.send(*args, **kwargs)  # self.send_followup
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Production code\Pax-Academia\venv\Lib\site-packages\discord\webhook\async_.py", line 1745, in send
    data = await adapter.execute_webhook(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Production code\Pax-Academia\venv\Lib\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 embeds.0.title: Must be 256 or fewer in length.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Production code\Pax-Academia\venv\Lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
    await ctx.command.invoke(ctx)
  File "C:\Production code\Pax-Academia\venv\Lib\site-packages\discord\commands\core.py", line 375, in invoke
    await injected(ctx)
  File "C:\Production code\Pax-Academia\venv\Lib\site-packages\discord\commands\core.py", line 132, in wrapped
    raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.title: Must be 256 or fewer in length.