Skip to content

Commit

Permalink
modified: Cargo.toml
Browse files Browse the repository at this point in the history
	modified:   src/bot/plugin_builder/event.rs
  • Loading branch information
Threkork committed Aug 6, 2024
1 parent 2bf2cdc commit cfac27c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kovi"
version = "0.2.0-rc1"
version = "0.2.0-rc2"
edition = "2021"
description = "A fast and lightweight OneBot V11 bot plugin framework"
license = "MPL-2.0"
Expand Down
8 changes: 8 additions & 0 deletions src/bot/plugin_builder/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ impl OnMsgEvent {

self.api_tx.send((send_msg, None)).unwrap();
}

/// 获取文本,如果没有文本则会返回空字符串
pub fn get_text(&self) -> String {
match self.text.clone() {
Some(v) => v,
None => "".to_string(),
}
}
}

#[derive(Clone)]
Expand Down

0 comments on commit cfac27c

Please sign in to comment.