TransGG / uncute-rina

Python transplace bot with fancy funky features
MIT License
0 stars 1 forks source link

Simplified reminder list can be too long, causing it to cut off: Add page menu #3

Closed MysticMia closed 1 year ago

MysticMia commented 1 year ago

If you type /reminder reminders, and you have too long messages for your reminders, it will convert the list to a simplified version. But if you also end up having 45 reminders running at the same time, the simplified version may also become too long. This would result in a message of more than 2000 characters. To prevent this, it is cut off at 1995 characters, but simultaneously causes the user to miss the last information about the reminders. A fix would be to use pages and page buttons.

On the other hand, a work-around is that all reminders can be seen with /reminder reminders item:ID where ID is the id of the reminder (starting at 0). In this case, id "50" would refer to the 51st reminder. I'll see what I'll do with this.

MysticMia commented 1 year ago

Will put this on hold, since according to a string length calculator, the max size a string would be with 50 reminders would be about 1890 characters (counting "\n" as one), so it might not pass the limit. ~Otherwise, we'll likely get an error on the log anyway, as it tries to send too-big messages, so we can catch who it was in the first place anyway. ...~ On second thought, limiting it to 1980 characters would prevent this, but I guess if you have that many reminders, then the "you have 345 reminders" would already tell you which IDs to look for, even if they do get cut off. So yeah.

MysticMia commented 1 year ago

I guess this was closed between 8 and 18 October then..