Compare commits
No commits in common. "e553472b7a4a6c8411f3e1a3c86661678058cf66" and "490d17790aacb6952fa04693896509e217706e31" have entirely different histories.
e553472b7a
...
490d17790a
|
@ -145,11 +145,8 @@ Examples:
|
||||||
!get myvar //will print 5
|
!get myvar //will print 5
|
||||||
```
|
```
|
||||||
|
|
||||||
Variables can be referenced in dice pool and Call of Cthulhu rolling
|
Variables can be referenced in dice pool rolling expressions, for
|
||||||
expressions, for example `!pool myvar` or `!pool myvar+3` or `!cthroll
|
example `!pool myvar` or `!pool myvar+3`.
|
||||||
myvar`. The Call of Cthulhu advancement roll also accepts variables,
|
|
||||||
and if a variable is used, and the roll is successful, it will update
|
|
||||||
the variable with the new skill.
|
|
||||||
|
|
||||||
## Running the Bot
|
## Running the Bot
|
||||||
|
|
||||||
|
|
|
@ -73,11 +73,6 @@ async fn handle_multiple_results(
|
||||||
respond_to: &str,
|
respond_to: &str,
|
||||||
room: &Joined,
|
room: &Joined,
|
||||||
) {
|
) {
|
||||||
let respond_to = format!(
|
|
||||||
"<a href=\"https://matrix.to/#/{}\">{}</a>",
|
|
||||||
respond_to, respond_to
|
|
||||||
);
|
|
||||||
|
|
||||||
let errors: Vec<(&str, &ExecutionError)> = results
|
let errors: Vec<(&str, &ExecutionError)> = results
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|(cmd, result)| match result {
|
.filter_map(|(cmd, result)| match result {
|
||||||
|
|
|
@ -76,13 +76,11 @@ pub trait ResponseExtractor {
|
||||||
impl ResponseExtractor for ExecutionResult {
|
impl ResponseExtractor for ExecutionResult {
|
||||||
/// Error message in bolded HTML.
|
/// Error message in bolded HTML.
|
||||||
fn message_html(&self, username: &str) -> String {
|
fn message_html(&self, username: &str) -> String {
|
||||||
// TODO use user display name too (element seems to render this
|
//TODO use user display name too
|
||||||
// without display name)
|
|
||||||
let username = format!(
|
let username = format!(
|
||||||
"<a href=\"https://matrix.to/#/{}\">{}</a>",
|
"<a href=\"https://matrix.to/#/{}\">{}</a>",
|
||||||
username, username
|
username, username
|
||||||
);
|
);
|
||||||
|
|
||||||
match self {
|
match self {
|
||||||
Ok(resp) => format!("<p>{}</p><p>{}</p>", username, resp.html).replace("\n", "<br/>"),
|
Ok(resp) => format!("<p>{}</p><p>{}</p>", username, resp.html).replace("\n", "<br/>"),
|
||||||
Err(e) => format!("<p>{}</p><p>{}</p>", username, e.html()).replace("\n", "<br/>"),
|
Err(e) => format!("<p>{}</p><p>{}</p>", username, e.html()).replace("\n", "<br/>"),
|
||||||
|
|
Loading…
Reference in New Issue