This repository was archived by the owner on Oct 24, 2022. It is now read-only.
This repository was archived by the owner on Oct 24, 2022. It is now read-only.
Handle no content also being an empty string and not just None
#76
Open
Description
It's possible, with a combination of embeds, for the content to be "" (empty content). This causes discord to error when sending the embed.
Sentry Issue: MESSAGE-MANAGER-BOT-1
HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.fields.2.value: This field is required
File "discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/admin/bot/message-bot/cogs/messages.py", line 520, in edit
success = await confirm(
File "/home/admin/bot/message-bot/cogs/messages.py", line 102, in confirm
msg_id = await send_message_components(
File "src/interactions.py", line 621, in send_message_components
response = await state.http.request(r, json=payload)
File "discord/http.py", line 254, in request
raise HTTPException(r, data)
CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.fields.2.value: This field is required
File "discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
Ignoring exception in command edit: