- Enables secure communication with users without sharing accounts.
- Facilitates team communication for multiple support agents.
- Golang installed
- PostgreSQL server installed
- Clone the repository:
git clone https://github.com/ti-bone/feedbackBot.git cd feedbackBot
- Copy the example configuration file:
cp src/config.json.example config.json
- Edit the
config.json
file with your configuration details. - Build the application:
rm -rf build mkdir build cd src go build -o ../build/feedbackBot . cd ../build
- Run the PostgreSQL server as described in the PostgreSQL documentation.
- Create new user and database and specify them under
db_dsn
field in yourconfig.json
file. - Obtain a Telegram bot token:
- Follow Telegram's instructions on creating new bot to create a new bot and get the token.
- Set the Telegram bot token in the
bot_token
field inside yourconfig.json
file. - Add the bot to your Telegram group, you can set
logs_id
to0
, until you obtained the ID. - Enable topics in the group:
- Follow Telegram's introduction to topics to do so.
- Run the application:
./feedbackBot
- It automatically creates the required database tables and indexes.
- Obtain ID of the Telegram group where the bot is added:
- Send
/id
command to the group chat. - Copy the ID and set it in your
config.json
file.
- Send
- Restart the application.
- Start the bot by sending
/start
command to the bot in DM. - Set your
is_admin
totrue
in your database(it's required for anyone, who needs to reply to users):- Connect to your database using
psql
or any other client. - Obtain your user ID by sending
/id
command to the bot in DM. - Run the following query:
Otherwise, you won't be able to reply to users via your group.
UPDATE users SET is_admin = true WHERE id = <your_user_id>;
- Connect to your database using