Commit Graph

49 Commits

Author SHA1 Message Date
doryan f81bc8d3ce feat(msg): remove redundant message 2024-08-31 23:29:29 +04:00
doryan c387c0497a feat(help): add help to the ban command 2024-08-21 23:11:47 +04:00
doryan 1044f7a434 feat(ver): change version number 2024-08-21 23:10:54 +04:00
doryan 20b1e78aa3 uhm... 2024-08-21 20:58:34 +04:00
doryan d45ebcc682 feat(imports): format imports 2024-08-21 20:58:21 +04:00
doryan f41e012f8e refactor: add append_command macro 2024-08-21 20:57:43 +04:00
doryan e333e401f3 feat(fn): all_admin_member is slice 2024-08-21 20:56:45 +04:00
doryan 352514d2b0 refactor: format code 2024-08-21 20:56:11 +04:00
doryan 46183842bd fix(on reply): prevent unmute action with REPLY 2024-08-21 20:55:28 +04:00
doryan 1bcbb3d456 refactor: rename file
dice.rs -> dice_handler.rs
2024-08-21 20:52:08 +04:00
doryan b557bf5832 feat(imports): format imports 2024-08-21 20:50:38 +04:00
doryan 311187b6eb refactor(bot): dice and command endpoints; feat(ban): add ban endpoint; and etc. 2024-07-09 23:05:29 +04:00
doryan 3fda2620e3 feat(attributes): add #[allow(dead_code)] for target user and #[derive(Clone)] for handler_entity 2024-07-09 23:03:49 +04:00
doryan cca1b86772 refactor(folder name): rename from 'handlers' to 'endpoints' 2024-07-09 23:01:33 +04:00
doryan 7576859907 refactor(bot actions): move bot actions from src/handlers to src/ 2024-07-09 23:00:01 +04:00
doryan ec2ff44e36 refactor(utils): sort, rename and refactor utils 2024-07-09 22:57:37 +04:00
doryan e0a5e3a0bb feat(ban): add ban command help info 2024-07-09 22:56:36 +04:00
doryan 8928a21e1e fix(spell): remove stupid spelling mistake 2024-07-09 22:20:05 +04:00
doryan be6c68dcf2 feat(ban): add ban command help info 2024-07-09 22:18:16 +04:00
doryan d9d65e8d58 feat(new command): add privacy command 2024-07-08 09:51:04 +04:00
doryan b621a3af66 fix(unrestrict_date): stupid mistake that doesn't let return unrestrict date in any of TimeMetric enumeration except Days 2024-06-18 18:34:10 +04:00
doryan f9a6c9645b fix(TimeMetrics Struct): parser of time metric from command argument 2024-06-18 18:16:18 +04:00
doryan da5edc1aac fix(TimeMetrics Struct): parser of time metric from command argument 2024-06-18 18:15:10 +04:00
doryan c76364c8b4 fix(admin check): check for admin if a member doesn't ha the admins privileges but have prefix 2024-06-18 00:17:24 +04:00
doryan f9abd1592e refactor(Cargo.toml file): redundant crate (Actix-web) has been removed 2024-06-18 00:06:31 +04:00
doryan b5a9315a2d Tried to add dependencies only for "dev" profile, but not successful. Conditional compiling has been added 2024-06-09 03:26:48 +04:00
doryan 6bde201ca2 Message text corrections 2024-06-08 03:17:12 +04:00
doryan 7b31cccf31 Now the admin_check function gets a second argument in the form of user_id, and this function is used in try_restrict 2024-06-08 03:12:16 +04:00
doryan 0ec0c94501 Function for checks for the existence of target user have been implemented for enum TargetUser 2024-06-08 03:09:17 +04:00
doryan 89119936c8 Сheck for the existence of target user have been added 2024-06-08 03:08:00 +04:00
doryan ac9fbcf344 Admin checks have been implemented in "Inner middleware" 2024-06-08 03:04:34 +04:00
doryan d803f6931f Unnecessary target checks have been removed 2024-06-08 03:02:53 +04:00
doryan a9ab73ec72 Some corrections to the command help text 2024-06-08 03:00:47 +04:00
doryan 2e02d9df47 Help response text has been moved to html file 2024-06-08 02:58:39 +04:00
doryan 9a64001926 Merge pull request 'Reformat output chat messages' (#1) from dogma/gluon:fix-messages into main
Reviewed-on: #1
2024-06-07 11:47:41 +03:00
Dogma Toscarina 2f0ae08d4f handlers/{actions,command_handlers}: reformat messages
Avoid interactivity, make messages short.
2024-06-07 10:45:49 +03:00
Dogma Toscarina 06b3a473ed middlewares/admin_check_middleware: shorten error message 2024-06-07 10:41:53 +03:00
Dogma Toscarina 6e59ee1eb8 utils/telegram/try_do: shorten DEMOTE_FAILURE_MESSAGE
It would be annoying to get this long message spamming the chat window.

Such error messages should describe what has gone wrong, but not give
any guidances, advices or directions; they belong elsewhere
(documentation, wiki, etc).
2024-06-07 10:41:53 +03:00
Dogma Toscarina 18b938bf95 handlers/dice_handler/dice: make message short and concise. 2024-06-07 10:41:53 +03:00
Dogma Toscarina 9f5174c442 types/enums/time_metrics: fix grammar 2024-06-07 10:41:53 +03:00
Dogma Toscarina c6222d42f8 assets: fix help messages (mute, unmute)
There are quite some problems with the way commands are explained:

* Interactivity - command arguments gets explained as if one is
  following a guide ("insert this, enter that"). Better explain them
  without any "guidance"; use present tense to describe commands.

* Duplicity - the purpose of the command is explained over and over
  when arguments are being described.

* Separation - there is no need to divide required and optional
  command arguments into their respective sections. Their amount did
  not grow up that much for this to make sense.

* mute_command_help.html: i64 would be sufficient for developers, but
  not end users. It does not stop anyone from specifying overflowing
  integer, after all.
2024-06-07 10:41:36 +03:00
doryan e52d6042a3 some fixes 2024-06-05 14:21:12 +04:00
doryan 009a42990a DELETED: useless function for HTML parsing 2024-06-05 14:13:24 +04:00
doryan 00f59465b3 CHANGED: help command text 2024-06-02 14:31:37 +04:00
doryan f625fc7960 FIXED: Finish message after bot action 2024-06-02 14:22:30 +04:00
doryan 820fa21878 REFACTORED: mute and ban action 2024-06-02 03:56:04 +04:00
doryan 561d2deb70 REFACTORED: mute and ban action 2024-06-02 03:34:56 +04:00
doryan 8f43d91f5c DONE: unmute command 2024-06-02 02:30:52 +04:00
doryan 7ec67cb6e4 reinit git 2024-05-31 00:37:47 +04:00