diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d7c61c..8046c8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,16 @@ # Change Log All notable changes to this project will be documented in this file. -## [UNRELEASED] - 11.10.2021 +## [0.2.0] - 26.10.2021 ### Added -- Inline Query for `join`, `leave` & `everyone` -- Banned users +- Inline Mode for `join`, `leave` & `everyone` +- Banned users environment variable - Buttons for `start` message ### Changed - Code quality improvements - `start` text +- mongodb data structure +- group name max length to 40 ### Deleted - `/silent` command ## [0.1.0] - 06.10.2021 diff --git a/README.md b/README.md index d37470f..7493542 100755 --- a/README.md +++ b/README.md @@ -1,26 +1,101 @@ -#
[everyone-mention-telegram-bot](http://t.me/everyone_mention_bot) +#
[everyone-mention-telegram-bot](http://t.me/everyone_mention_bot)
# Contents
* [Description](#description)
-* [Getting started.](#getting-started)
- * [Requirements](#requirements)
- * [Installation](#installation)
- * [Logs](#logs)
- * [Env files](#env-files)
* [Commands](#commands)
* [`/join`](#join)
* [`/leave`](#leave)
* [`/everyone`](#everyone)
* [`/groups`](#groups)
* [`/start`](#start)
+ * [Example command flow](#example-command-flow)
+* [Inline Mode](#inline-mode)
+ * [Usage](#usage)
+* [Getting started.](#getting-started)
+ * [Requirements](#requirements)
+ * [Installation](#installation)
+ * [Logs](#logs)
+ * [Env files](#env-files)
## Description
Everyone Mention Bot is simple, but useful telegram bot to gather group members attention.
You can create groups per chat to mention every user that joined the group by calling one command instead of mentioning them one by one.
+## Commands
+*Important*: `{group-name}` is not required, if not given, it will be set to `default`.
+### `/join`
+Joins the group (if group did not exist before, it will be created).
+```
+/join {group_name}
+```
+*Examples*
+
+without group name
+
+
+
+with group name
+
+
+
+### `/leave`
+Leaves the group (and deletes if no members are left).
+```
+/leave {group_name}
+```
+*Examples*
+
+without group name
+
+
+
+with group name
+
+
+
+### `/everyone`
+Mention everyone that joined requested group.
+```
+/everyone {group-name}
+```
+
+*Examples*
+
+without group name
+
+
+
+with group name
+
+
+
+
+### `/groups`
+Will display available groups for this chat as well with members count.
+
+
+### `/start`
+Start & Help message
+
+
+
+### Example command flow
+
+
+## Inline Mode
+Using Inline Mode is recommended because policy of bots with privacy mode enabled (https://core.telegram.org/bots/faq#what-messages-will-my-bot-get) says that command trigger is sent (without mentioning the bot) only to the last mentioned bot. So if you do have multiple bots in current chat, I might not receive your command!
+
+### Usage
+To use inline mode, type `@everyone_mention_bot` in telegram message input or click on the `Inline Mode` button from `/start` command.
+
+
+
+Type in your group name (you can leave it blank for `default` group name), then click on one of the three following options.
+
+
## Getting started
### Requirements
- `docker-compose` in version `1.25.0`
@@ -68,40 +143,4 @@ docker/logs
Inline Mode
is recommended because policy of bots with privacy mode enabled says that command trigger is sent (without mentioning the bot) only to the last mentioned bot. So if you do have multiple bots in current chat, I might not receive your command!
+Usage:
+Users that joined the group by /join
command, can be mentioned after calling /everyone
command.
+
+Commands:
+/join {group-name}
+Joins (or creates if group did not exist before) group.
+
+/leave {group-name}
+Leaves (or deletes if no other users are left) the group
+
+/everyone {group-name}
+Mentions everyone that joined the group.
+
+/groups
+Show all created groups in this chat.
+
+/start
+Show start & help text
-Available commands:
Please note
{group-name}
is not required, default
if not given.
-Join
-Joins (or creates if group did not exist before) group.
-/join {group-name}
-
-Leave
-Leaves (or deletes if no other users are left) the group
-/leave {group-name}
-
-Everyone
-Mentions everyone that joined the group.
-/everyone {group-name}
-
-Groups
-Show all created groups in this chat.
-/groups
-
-Start
-Show start & help text
-/start
-
-Reach out to Creator in case of any issues/questions regarding my usage.
+If your chat does have multiple bots I might not receive your command according to policy of bots with privacy mode enabled - use Inline Mode
to avoid this.
"""
diff --git a/src/validator/groupNameValidator.py b/src/validator/groupNameValidator.py
index 4c89902..c910ae6 100644
--- a/src/validator/groupNameValidator.py
+++ b/src/validator/groupNameValidator.py
@@ -4,7 +4,7 @@ from exception.invalidArgumentException import InvalidArgumentException
class GroupNameValidator:
- MAX_GROUP_NAME_LENGTH: int = 20
+ MAX_GROUP_NAME_LENGTH: int = 40
@staticmethod
def validate(group: str) -> None: