Skip to content

Commit

Permalink
README redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
bostrot committed Mar 23, 2023
1 parent 03b52d3 commit 667efb7
Showing 1 changed file with 65 additions and 59 deletions.
124 changes: 65 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<h1 align="center">Welcome to Telegram Support Bot 👋</h1>

[![Bot API Version](https://img.shields.io/badge/Bot%20API-v6.6-f36caf.svg?style=for-the-badge)](https://core.telegram.org/bots/api)
[![NPM Version](https://img.shields.io/npm/v/grammy.svg?style=for-the-badge)](https://www.npmjs.com/)
[![node](https://img.shields.io/node/v/grammy.svg?style=for-the-badge)](https://www.npmjs.com/package/)
![js-google-style](https://img.shields.io/badge/code%20style-google-brightgreen.svg?style=for-the-badge)
[![Documentation](https://img.shields.io/badge/DOCUMENTATION-WIKI-green?style=for-the-badge)](https://github.com/bostrot/telegram-support-bot/wiki)

[![Bot API Version](https://img.shields.io/badge/Bot%20API-v4.8-f36caf.svg?style=flat-square)](https://core.telegram.org/bots/api)
[![NPM Version](https://img.shields.io/npm/v/telegraf.svg?style=flat-square)](https://www.npmjs.com/)
[![node](https://img.shields.io/node/v/telegraf.svg?style=flat-square)](https://www.npmjs.com/package/)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)
[![pipeline status](https://gitlab.com/botty-group/erics-container-repo/badges/main/pipeline.svg)](https://gitlab.com/botty-group/erics-container-repo/-/pipelines)

# [Telegram Support Bot](https://github.com/bostrot/telegram-support-bot) (Ticketing system for Telegram)
is a support bot for telegram bots, using the ~Telegraf framework (by [@dotcypress](https://github.com/dotcypress))~ [grammY Framework](https://grammy.dev/). It lets users create tickets which will be send to a staff group and can be answered by a reply.

Telegram ticketing implementation:
> TSB is a support bot for telegram bots, using the [grammY Framework](https://grammy.dev/). It lets users create tickets which will be send to a staff group and can be answered by a reply.
<table>
<tr>
Expand All @@ -18,64 +15,57 @@ Telegram ticketing implementation:
</tr>
</table>

If you need help or need a hosted solution of this check out <a href="https://botspace.bostrot.com">Botspace</a> for a one-click setup.

## Documentation
> 🚀 **Hosted solution**: Get it [here at botspace](https://botspace.bostrot.com)!
See the [WIKI](https://github.com/bostrot/telegram-support-bot/wiki) for more detailed information.
## ✨ Features

`telegram-support-bot` was built on top of [`Telegraf`](https://github.com/telegraf/telegraf) libary.

[Telegraf documentation](http://telegraf.js.org).
When a user sends a message to the support chat it will create a ticket which will be forwarded to the staff group. Any admin in the staff group may answer that ticket by just replying to it. Salutation is added automatically. Photos will be forwared too.

- [x] File forwarding from and to user
- [x] Database for handling open and closed tickets
- [x] Restrict users
- [x] Simple anti spam system
- [x] Send tickets to different staff groups
- [x] Private reply to user
- [x] Anonymize users
- [x] Auto reply based on keywords [beta]
- [x] Web chat [beta]]

## Features

When a user sends a message to the support chat it will create a ticket which will be forwarded to the staff group. Any admin in the staff group may answer that ticket by just replying to it. Salutation is added automatically. Photos will be forwared too.
## 📜 Commands

Currently the support chat offers these commands (staff commands):
* `/open` - lists all open tickets (messages where noone has replied yet)
* `/close` - close a ticket manually (in case someone writes 'thank you')
* `/id` - returns your telegram id and the group chat id (1234567 -1234567890)
* `/ban` - ban a person from writing to your chat

- `/open` - lists all open tickets (messages where noone has replied yet)
- `/reopen` - reopen a closed ticket
- `/close` - close a ticket manually (in case someone writes 'thank you')
- `/ban` - ban a person from writing to your chat

User commands:
* `/start` - tells the user how to use this bot
* `/help` - an overview over the commands or some explanation for the user
* `/faq` - shows the FAQ

Features:
* File forwarding from and to user
* Database for handling open and closed tickets
* Restrict users
* Simple anti spam system
* Send tickets to different staff groups
* Private reply to user
* Anonymize users
* Auto reply based on keywords [beta]
* Web chat
- `/start` - tells the user how to use this bot
- `/help` - an overview over the commands or some explanation for the user
- `/faq` - shows the FAQ
- `/id` - returns your telegram id and the group chat id (1234567 -1234567890)

## Installation
## 📦 Install

See the [WIKI](https://github.com/bostrot/telegram-support-bot/wiki) for more detailed information.
See the [wiki](https://github.com/bostrot/telegram-support-bot/wiki) for more detailed instructions.

```bash
mv config/config-sample.yaml config.yaml
docker-compose up -d
```

**Docker** container:
## 📝 Upgrading from older versions

Either with docker-compose:

```
docker-compose up -d
```
There are some breaking changes in the new versions. Please read the following instructions carefully when updating.

## Notes about v4.0.0
<details>
<summary>click here to show</summary>

Since version v4 this bot uses the grammY Telegram Bot Framework instead of the telegraf framework for various reasons.

## Upgrading to v4.0.0 or to master
### Upgrading to v4.0.0

Make sure you add the new settings strings to your config.yaml file. Check the config-sample.yaml for all configs.
Here are some of the new settings that you should add when migrating:
Expand All @@ -91,27 +81,43 @@ Start it.

The old database should work with the new version without changing anything.


## Upgrading to v3.0.0
### Upgrading to v3.0.0

The latest version uses a new config file in YAML format which would break old versions.

In order to make old versions work with the master you would need to use the new config.yaml file instead of the config.ts file from before. The easiest would be if you copy the config-sample.yaml to config.yaml (both in the config folder) and edit the settings similar to your old config.ts file. There is no need to delete the database file so old tickets can be kept open.

## Telegram token
</details>

You might also want to check out the [wiki](https://github.com/bostrot/telegram-support-bot/wiki) for more info.

## Author

👤 **Eric Trenkel**

- Website: [erictrenkel.com](erictrenkel.com)
- Github: [@bostrot](https://github.com/bostrot)
- LinkedIn: [@erictrenkel](https://linkedin.com/in/erictrenkel)

👥 **Contributors**

[![Contributors](https://contrib.rocks/image?repo=bostrot/telegram-support-bot)](https://github.com/bostrot/telegram-support-bot/graphs/contributors)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/bostrot/telegram-support-bot/issues). You can also take a look at the [contributing guide](https://github.com/bostrot/telegram-support-bot/blob/master/CONTRIBUTING.md).

To use the [Telegram Bot API](https://core.telegram.org/bots/api),
you first have to [get a bot account](https://core.telegram.org/bots)
by [chatting with BotFather](https://core.telegram.org/bots#6-botfather).
## Show your support

BotFather will give you a *token*, something like `123456789:AbCdfGhIJKlmNoQQRsTUVwxyZ`.
Give a ⭐️ if this project helped you!

## Help
## 📝 License

You are welcome to contribute with pull requests, bug reports, ideas and donations.
Copyright © 2023 [Eric Trenkel](https://github.com/bostrot).<br />
This project is [GPL-3.0](https://github.com/bostrot/telegram-support-bot/blob/master/LICENSE) licensed.

If you need help or need a hosted solution of this check out <a href="https://botspace.bostrot.com">Botspace</a> for a one-click setup.
---

## Custom requests
_Not found what you were looking for? Check out the [Wiki](https://github.com/bostrot/telegram-support-bot/wiki)_

Hit me up for hosting or other custom solutions [@bostrot_bot](http://t.me/bostrot_bot)
If you need help or need a hosted solution of this check out [Botspace](https://botspace.bostrot.com) for a one-click setup.

0 comments on commit 667efb7

Please sign in to comment.