The goal of this Telegram bot is to provide an interface for launching a Communauto car search on Telegram. When it finds at least one car, the bot will return the number of cars found. Interaction with the bot is in french.
- /aide: View available commands.
- /chercher: Begin a discussion with the bot to set search parameters.
- /recommencer: Start a new search with the same parameters as the previous one.
To use this bot, you need to define the following system environment variables:
-
Telegram Token:
- Variable Name:
TOKEN_COMMUNAUTOSEARCH_BOT
- Description: This is the token value for Telegram.
- Example:
TOKEN_COMMUNAUTOSEARCH_BOT=your_telegram_token_value
- Variable Name:
-
Authorized Users:
- Variable Name:
AUTHORIZED_USERS_ID
- Description: This is a list of user IDs that you want to authorize to chat with the bot. The IDs should be separated by a semicolon (
;
). - Example:
AUTHORIZED_USERS_ID=id1;id2;id3
- Variable Name:
-
City ID:
- Variable Name:
CITY_ID
- Description: This is the ID of the city you want to query from. You can obtain the list of city IDs from this link.
- Example:
CITY_ID=your_city_id
- Variable Name:
Please replace your_telegram_token_value
, id1;id2;id3
, and your_city_id
with your actual values.
After that, run go run main.go
to launch the bot.
Then, search for the bot on Telegram to start a discussion with it.
Thanks to craftlion for writing all of this. I forked his project to adapt it to my needs.