2023-11-27 16:18:37 +01:00
..
2022-11-28 14:02:35 +01:00
2023-11-27 16:18:37 +01:00
2022-01-03 15:44:17 -06:00

A simple bot to demonstrate ruma-client functionality. Tells jokes when you ask for them.

Note on dependency versions

This example was written against pre-release versions of ruma and ruma-client-api. Check the comments in the [dependencies] section of Cargo.toml for more information.

Usage

Create a file called config and populate it with the following values in key=value format:

  • homeserver: Your homeserver URL.
  • username: The Matrix ID for the bot.
  • password: The password for the bot.

For example:

homeserver=https://example.com:8448/
username=@user:example.com
password=yourpassword

You will need to pre-register the bot account; it doesn't do registration automatically. The bot will automatically join rooms it is invited to though.

Finally, run the bot (e.g. using cargo run) from the same directory as your config file. The bot should respond to the request "Tell me a joke" in any channel that it is invited to.