pechorka / adhd-reader

2 stars 0 forks source link

Update error message when trying to "/delete" with no arguments #35

Open AAKrasnova opened 1 year ago

AAKrasnova commented 1 year ago

We should offer users better feedback and help with using the bot. We need to guess which text the user wants to delete.

Algorithm to guess text to delete: a) if there is selected text - then guessedTextToDelete= the current text b) if there is no selected text - then guessedTextToDelete= the last added text

NB. I already added translations to the json and msgs.go

When a user tries to send "/delete" (delete command with no arguments)

  1. Display error message. a) If there are texts added, add an example with the guessedTextToDelete name. Use errorOnTextDeleteExampleTextMsgId with argument text_name to pass guessedTextToDelete b) Else errorOnTextDeleteMsgId
  2. If there are no texts added then display a second message that there are no texts to delete: errorOnTextDeleteNoTextsAddedMsgId
  3. Else display button to delete text. The button label should contain guessedTextToDelete name: deleteButtonWithTextNameMsgId with argument text_name to pass guessedTextToDelete

User Feedback

Кирилл Ходасевич, [18.03.2023 23:40] И да, попытался выбрать чанк, он поставил, но как ты и писала на существующую книгу не ложится, при этом не понял как удалить файл. Просто командой \delete он не скушал.

Anastasia Krasnova, [18.03.2023 23:53] команда delete обязательно требует название файла в качестве аргумента 😓 либо можно удалять кнопкой, если до неё дойдёшь =D Я чувствую, что удалять последний выбранный текст по команде /delete с пустым аргументом - может быть так себе затея. Может быть тогда выводить кнопку подтверждения... Надо подумать

Кирилл Ходасевич, [19.03.2023 0:07] такс, надо переделывать менюшку похоже, ибо я видимо в глаза продолбился...