Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
pplulee committed Jul 5, 2024
1 parent 2fae6ea commit 8583715
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 13 deletions.
3 changes: 2 additions & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This project welcomes contributions and suggestions.

This project is mostly maintained by SideCloud. Your contributions will be seriously discussed by our developer team.

If you cannot code by yourself, use [issues](https://github.com/SideCloudGroup/BetterForward/issues) to let us know what you want. Your advice matters.
If you cannot code by yourself, use [issues](https://github.com/SideCloudGroup/BetterForward/issues) to let us know what
you want. Your advice matters.

contact us [by email](mailto:contact@sidecloud.cc) with any additional questions or comments.
52 changes: 43 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,79 @@
# Better Forward

[中文README](README_zh.md)

Designed for better message forwarding in Telegram.

Forward users' messages to topics in the group. Each user corresponds to a topic.

## Features

- Privacy: Admins' accounts are not exposed.
- Flexibility: Each user corresponds to an independent topic, and the experience is almost the same as private chat.
- Teamwork: Multiple admins can handle users' messages.
- Multi-language: Supports multiple languages, including English and Chinese.
- Multi-language: Supports multiple languages, including English, Chinese and Japanese.
- Auto Response: Automatically replies to users' messages with predefined messages, and supports detection with regex.

## Usage

1. Create a bot from [@BotFather](https://t.me/BotFather) and get the token.
2. Create a group with topics, and add the bot as an admin.
3. Get the group ID.
This step can be done by inviting [@tg_get_userid_bot](https://t.me/tg_get_userid_bot) to the group.
For privacy reason, remember to remove it after getting the group ID.
3. Get the group ID.
This step can be done by inviting [@tg_get_userid_bot](https://t.me/tg_get_userid_bot) to the group.
For privacy reasons, it is recommended to remove it after getting the group ID.
4. Deploy BetterForward to a server.

Any messages sent to the bot will be forwarded to the corresponding topic in the group.

More settings can be found by sending the `/help` command to the bot.

## Deployment

The following are the available language options:

- English - `en`
- Chinese - `zh_CN`
- Japanese - `ja_JP`

We welcome contributions to add more languages.

### Docker (Recommended)

```bash
docker run -d --name betterforward \
-e TOKEN=<your_bot_token> \
-e GROUP_ID=<your_group_id> \
-e LANGUAGE=en \
-e LANGUAGE=<language> \
-v /path/to/data:/app/data \
--restart unless-stopped \
pplulee/betterforward:latest
```

## Upgrade

If you deploy this project using Docker, you can use [WatchTower](https://github.com/containrrr/watchtower) to quickly
update. **Please adjust the container name yourself**. Use the following command to update:

```bash
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower -cR \
<Container Name>
```

## Admin Commands
- `/terminate [User ID]`: Ends the conversation with a specified user. When this command is issued within a conversation thread, there is no need to include the User ID; the current conversation will be terminated automatically. The user will not receive any further prompts or notifications.
- `/help`: Displays the help menu, which includes a list of available commands and instructions on how to use them.
- `/ban`: Prevents the user from sending any more messages. This command is only applicable within the specific conversation thread where it is executed.
- `/unban [User ID]`: Reinstates the ability for a user to send messages. If no User ID is specified, the command will apply to the user in the current conversation thread.

- `/terminate [User ID]`: Ends the conversation with a specified user. When this command is issued within a conversation
thread, there is no need to include the User ID; the current conversation will be terminated automatically. The user
will not receive any further prompts or notifications.
- `/help`: Displays the help menu, which includes a list of available commands and their instructions.
- `/ban`: Prevents the user from sending more messages. This command is only applicable within the specific
conversation thread where it is executed.
- `/unban [User ID]`: Reinstates the ability for a user to send messages. If no User ID is specified, the command will
apply to the user in the current conversation thread.

## Community

- Telegram Channel [@betterforward](https://t.me/betterforward)

Please use `issues` for bug reports and feature requests.
33 changes: 32 additions & 1 deletion docs/README_zh.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
# Better Forward

为更好地转发 Telegram 消息而设计。

将用户的消息转发到群组中,每个用户对应一个主题。

## 特点

- 隐私:管理员的账号不会暴露。
- 灵活性:每个用户对应一个独立的主题,对话体验几乎与私聊相同。
- 团队协作:多个管理员可以同时处理用户的消息。
- 多语言:支持多种语言,包括英语和中文。
- 自动回复:自动回复用户的消息,回复内容可预设。支持正则表达式匹配关键词。

## 使用方法

1.[@BotFather](https://t.me/BotFather) 创建一个机器人并获取 token。
2. 创建一个带有主题的群组,并将机器人添加为管理员。
3. 获取群组 ID。这一步可以通过邀请 [@tg_get_userid_bot](https://t.me/tg_get_userid_bot) 到群组中来完成。出于隐私原因,请在获取群组 ID 后将其移除。
3. 获取群组 ID。这一步可以通过邀请 [@tg_get_userid_bot](https://t.me/tg_get_userid_bot) 到群组中来完成。出于隐私原因,请在获取群组
ID 后将其移除。
4. 将 BetterForward 部署到服务器。

任何发送给机器人的消息都将转发到群组中的相应主题。

更多设置项可以通过向机器人发送 `/help` 命令来查看。

## 部署

以下是可用的语言选项:

- 简体中文 - `zh_CN`
- 英语 - `en`
- 日语 - `ja_JP`

我们欢迎贡献以添加更多语言。

### Docker (推荐)

```bash
docker run -d --name betterforward \
-e TOKEN=<your_bot_token> \
Expand All @@ -29,13 +46,27 @@ docker run -d --name betterforward \
pplulee/betterforward:latest
```

## 更新

如果您使用 Docker 进行部署此项目,可以使用[WatchTower](https://github.com/containrrr/watchtower)实现快速更新。**请您自行调整容器名
**。请使用以下命令更新:

```bash
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower -cR \
<容器名>
```

## 管理员命令

- `/terminate [用户 ID]`:结束与用户的对话。如果该命令在对话主题中发出,则无需包括用户 ID;当前的对话将自动删除。用户将不会接收到任何提示。
- `/help`:显示帮助菜单。
- `/ban`:阻止用户发送更多消息。此命令只能在对话中使用。
- `/unban [用户 ID]`:解除对用户的封禁。如果没有指定用户 ID,该命令将适用于当前对话主题中的用户。

## 交流社区

- Telegram频道 [@betterforward](https://t.me/betterforward)

请使用 `issues` 报告错误和提出功能请求。
6 changes: 4 additions & 2 deletions docs/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
## Security

SideCloud takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organization.
SideCloud takes the security of our software products and services seriously, which includes all source code
repositories managed through our GitHub organization.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, contacting us [by email](mailto:contact@sidecloud.cc) is recommended. You should receive a response within 24 hours.
Instead, contacting us [by email](mailto:contact@sidecloud.cc) is recommended. You should receive a response within 24
hours.

## Preferred Languages

Expand Down

0 comments on commit 8583715

Please sign in to comment.