is a support bot for telegram bots, using the Telegraf framework (by @dotcypress). It lets users create tickets which will be send to a staff group and can be answered by a reply.
![]() |
![]() |
|---|
telegram-support-bot was built on top of Telegraf libary.
Install Node ( > 8 ) and npm ( > 3.38.0 ).
Run it
git clone https://github.com/bostrot/telegram-support-bot.git
cd telegram-support-bot
npm i
cp config-sample.js config.js
npm runYou can get your ID with /id. The first number will be yours the second the one from the group you are in (if you are in one; including the minus).
You need to set your bot token and chat ids in config.js:
module.exports = {
bot_token: "YOUR_BOT_TOKEN", // support bot token
staffchat_id: "SUPERGROUP_CHAT_ID", // telegram staff group chat id eg. -123456789
owner_id: "YOUR_TELEGRAM_ID",
startCommandText: "Welcome in our support chat! Ask your question here.",
faqCommandText: "Check out our FAQ here: Address to your FAQ",
};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.
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 (userid)- lists some stuff from the database about the user/ban- ban a person from writing to your chat
User commands:
/start- tells the user how to use this bot/faq- shows the FAQ
Features:
- File forwarding from and to user
- Database for handling open and closed tickets
- Restrict users
- Simple anti spam system
This you should only care about when you intend to "support" another bot e.g. salesbot with this. This would enable "ANTI-CRASH" and commands like start and stop. Remember to use this only when you have two bots.
Admin/Owner commands:
* /root - Starts the listener and prevents the bot from crashing (restarts it and sends the log into the staff chat); Also this will open up a dashboard where the admin/owner can control the bot with following Update, Restart, Log, Stop.
(Removed after commit 8dabfabdc18b39d11c48f022836d0c824e3adafb)
docker build -t bostrot/telegram-support-bot .
docker-compose up -d
To use the Telegram Bot API, you first have to get a bot account by chatting with BotFather.
BotFather will give you a token, something like 123456789:AbCdfGhIJKlmNoQQRsTUVwxyZ.
Telegraf bot framework for building a bot
You can also ask this bot on Telegram: @bostrot_bot
You are welcome to contribute with pull requests, bug reports, ideas and donations. Join the forum if you have any general purpose questions: bostrot.com
Hosting: Get $50 free VPS credit on Vultr

