Skip to content

The Telegram bot of the CLIC, cleaned up and in Rust.

License

Notifications You must be signed in to change notification settings

clicepfl/roboclic

Repository files navigation

Roboclic V2

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 the ADMIN_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).

Configuration

Environment

  • 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 data
  • DATABASE_URL (optional): The url of the SQLite database. Defaults to sqlite://${DATA_DIR}/db.sqlite.
  • DIRECTUS_URL: Base url of the Directus instance used.
  • DIRECTUS_TOKEN: Token for Directus RoboCLIC user.

Deployment

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.

References

About

The Telegram bot of the CLIC, cleaned up and in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages