Compare commits
2 Commits
0050810182
...
d65715dee6
Author | SHA1 | Date |
---|---|---|
projectmoon | d65715dee6 | |
projectmoon | 55a3bfb861 |
12
README.md
12
README.md
|
@ -46,6 +46,17 @@ 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
|
||||||
|
@ -254,3 +265,4 @@ 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
|
||||||
|
|
|
@ -23,21 +23,11 @@ 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(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue