as has been discussed for ages, it's generally a better UX to edit the game message rather than deleting and sending a new one each time. this implements that, by using Javalin to run a webserver that is capable of serving the rendered images. this also improves the UX by removing the need for:
re-adding emojis each time
waiting for the attachment to send to discord
deleting a message
therefore greatly improving the speed at which match renders can be updated. the image size still matters as it's a poor UX if the preview takes long to load, but the embed is able to be edited nearly instantaneously.
current UX hurdles that still require solutions before being released:
[x] game embeds can get buried in chat -- a command or emoji to "summon" the embed to the front of chat would be nice (delete old and send new, like the old way)
added new !bump command to address this
[x] @mentions of users don't actually notify when the message is edited rather than sent new -- this mainly impacts slower paced games like Connect 4 where you may have stepped away to do something while waiting for your opponent to make a move
decided this one isn't important, users can ping their play partner themselves (and this is better anyways as it's opt-in)
[x] emojis now persist, which is a double edged sword -- while we don't HAVE to re-add them each time now, it also means that if we want to change the available emojis between rounds, we have to come up with an algorithm for resolving what emojis need to be removed/added (especially to end up with the correct order)
we can tackle this when we actually have a game that would utilize it
as has been discussed for ages, it's generally a better UX to edit the game message rather than deleting and sending a new one each time. this implements that, by using Javalin to run a webserver that is capable of serving the rendered images. this also improves the UX by removing the need for:
therefore greatly improving the speed at which match renders can be updated. the image size still matters as it's a poor UX if the preview takes long to load, but the embed is able to be edited nearly instantaneously.
current UX hurdles that still require solutions before being released:
game embeds can get buried in chat -- a command or emoji to "summon" the embed to the front of chat would be nice (delete old and send new, like the old way)!bump
command to address this@mentions
of users don't actually notify when the message is edited rather than sent new -- this mainly impacts slower paced games like Connect 4 where you may have stepped away to do something while waiting for your opponent to make a moveemojis now persist, which is a double edged sword -- while we don't HAVE to re-add them each time now, it also means that if we want to change the available emojis between rounds, we have to come up with an algorithm for resolving what emojis need to be removed/added (especially to end up with the correct order)