Compare commits

..

No commits in common. "d65715dee683c38d4dea1e60b9bdb6bc7ed8e5e5" and "0050810182c9fe05131c27115a24ed9cac788b20" have entirely different histories.

2 changed files with 10 additions and 12 deletions

View File

@ -46,17 +46,6 @@ root of the repository.
After pulling or building the image, see [instructions on how to use After pulling or building the image, see [instructions on how to use
the Docker image](#running-the-bot). the Docker image](#running-the-bot).
### Install from crates.io
The project can be from [crates.io][crates-io]. To install it, execute
`cargo install tenebrous-dicebot`. This will make the following
executables available on your system:
* `dicebot`: Main dicebot executable.
* `dicebot-cmd`: Run dicebot commands from the command line.
* `dicebot_migrate`: Standalone database migrator (not required).
* `tonic_client`: Test client for the gRPC connection (not required).
### Build from Source ### Build from Source
Precompiled executables are not yet available. Clone this repository Precompiled executables are not yet available. Clone this repository
@ -265,4 +254,3 @@ support added for Chronicles of Darkness and Call of Cthulhu.
[main-repo]: https://git.agnos.is/projectmoon/tenebrous-dicebot [main-repo]: https://git.agnos.is/projectmoon/tenebrous-dicebot
[github-repo]: https://github.com/ProjectMoon/matrix-dicebot [github-repo]: https://github.com/ProjectMoon/matrix-dicebot
[roadmap]: https://git.agnos.is/projectmoon/tenebrous-dicebot/wiki/Roadmap [roadmap]: https://git.agnos.is/projectmoon/tenebrous-dicebot/wiki/Roadmap
[crates-io]: https://crates.io/crates/tenebrous-dicebot

View File

@ -23,11 +23,21 @@ async fn create_client(
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = create_client("example-key").await?; let mut client = create_client("example-key").await?;
// let request = tonic::Request::new(GetVariableRequest {
// user_id: "@projectmoon:agnos.is".into(),
// room_id: "!agICWvldGfuCywUVUM:agnos.is".into(),
// variable_name: "stuff".into(),
// });
// let response = client.get_variable(request).await?.into_inner();
let request = tonic::Request::new(UserIdRequest { let request = tonic::Request::new(UserIdRequest {
user_id: "@projectmoon:agnos.is".into(), user_id: "@projectmoon:agnos.is".into(),
}); });
let response = client.rooms_for_user(request).await?.into_inner(); let response = client.rooms_for_user(request).await?.into_inner();
// println!("RESPONSE={:?}", response);
// println!("User friendly response is: {:?}", response.value);
println!("Rooms: {:?}", response.rooms); println!("Rooms: {:?}", response.rooms);
Ok(()) Ok(())
} }