The Telegram bot of the CLIC, cleaned up and in Rust.
The available commands are:
/help
: Displays a help message./authenticate <token> <name>
: Authenticate as an admin user using theADMIN_TOKEN
provided in the environment variables and a name (can be any).- Group restricted commands:
/bureau
: Creates a poll querying who is at the desk (in INN132)./poll
: Creates a quiz where you need to find the committee behind a quote./stats
: Display the stats of the committee (number of polls).
- Admin restricted commands:
/adminlist
: List the admins./adminremove <name>
: Remove an admin./authorize <command>
: Authorize the current chat to use the given command (must be one of the command from the list above)./unauthorize <command>
: Unauthorize the current chat to use the given command (must be one of the command from the list above).
BOT_TOKEN
: The token provided by @BotFather to authenticate the bot in API calls.ADMIN_TOKEN
: The token used to authenticate admin users.DATA_DIR
: The directory where the bot will read/write dataDATABASE_URL
(optional): The url of the SQLite database. Defaults tosqlite://${DATA_DIR}/db.sqlite
.DIRECTUS_URL
: Base url of the Directus instance used.DIRECTUS_TOKEN
: Token for Directus RoboCLIC user.
The bot can be run either using cargo, or the provided Docker image.
The latter is preferred, since it allows off-the-shelf use. The configuration required is the same as specified above, the config file can directly be mounted in the container.