This commit is contained in:
shenjack 2024-02-22 14:30:56 +08:00
parent 42eec7532b
commit cfcac8f1c9
Signed by: shenjack
GPG Key ID: 7B1134A979775551
4 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "ica-rs"
version = "0.4.4"
version = "0.4.5"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -55,6 +55,9 @@ class NewMessage:
@property
def is_from_self(self) -> bool:
...
@property
def is_reply(self) -> bool:
...
class IcaClient:

View File

@ -81,6 +81,6 @@ def bmcl(msg: NewMessage, client: IcaClient) -> None:
def on_message(msg: NewMessage, client: IcaClient) -> None:
if not msg.is_from_self:
if msg.content == "/bmcl-rs":
if not (msg.is_from_self or msg.is_reply):
if msg.content == "/bmcl":
bmcl(msg, client)

View File

@ -139,6 +139,10 @@ impl NewMessagePy {
pub fn get_is_from_self(&self) -> bool {
self.msg.is_from_self()
}
#[getter]
pub fn get_is_reply(&self) -> bool {
self.msg.is_reply()
}
}
impl NewMessagePy {