discord-roombot
discord-roombot copied to clipboard
Improve room response embed
This PR addresses two issues in room response embed:
- Too many members
The bot will send the following errors if the
Players
field exceeds 1024 bytes due to too many members:
Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embed.fields.0.value: Must be 1024 or fewer in length.
This PR addressess this by capping the amount of member shown to 5, and add in a "and ... more" message. This comes with some minor refactoring.
- Incorrect capitalisation Some field name in the room response embed is not capitalised correctly. This PR also improves this as well.
PR updated to draft due to a similar bug glossed over due to lack of testing.