TripSit / TripBot

The discord bot on TripSit.Me
22 stars 12 forks source link

Added char limit to talk-to-mods feedback popup & warn user of limit #803

Closed theimperious1 closed 1 month ago

theimperious1 commented 1 month ago

I can't test this currently but this should fix it. Note the interaction is replied to with .reply() instead of .editReply() as I'm not sure what reply there would be to edit here. If that is the wrong way to do it, let me know and I'll fix it.

Speaking of which I see other interactions in this function that use .editReply() directly above my edit. Do those work properly?

Lastly, it would be nice to verify that this looks fine on the UI in both mobile and desktop, "What is your issue? Be super detailed! (2000 character limit)". I like how short it was before but wasn't sure how else to notify them, and this looked better to me than editing the placeholder below it. It would be frustrating for a user if someone wrote 3000 characters of feedback, didn't copy it, then the request failed and they lost their 3000 chars of feedback, hence the warning.

This should fix issue #659.

LunaUrsa commented 1 month ago

I see other interactions in this function that use .editReply() directly above my edit. Do those work properly?

Great question, i want to say yes, because after the modal has been submitted the original "interaction" has already been responded to, so you'd need to edit that reply, but we should test

Def agree with the last part, i feel terrible every time this error pops up

LunaUrsa commented 1 month ago

Could you please instead use .setMaxLength(2000) to make it so that the user doesn't have the ability to submit anything longer than 2k characters? This would stop the frustration of the submission being sent into the void

theimperious1 commented 1 month ago

Could you please instead use .setMaxLength(2000) to make it so that the user doesn't have the ability to submit anything longer than 2k characters? This would stop the frustration of the submission being sent into the void

yeah sure! I didnt know that existed. I'll fix it in a little bit. That also fixes having to notify them, which lets that UI text be back to as clean as it was before. Much better solution!