mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 12:41:05 +08:00
0.4.5
This commit is contained in:
parent
42eec7532b
commit
cfcac8f1c9
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ica-rs"
|
name = "ica-rs"
|
||||||
version = "0.4.4"
|
version = "0.4.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
|
@ -55,6 +55,9 @@ class NewMessage:
|
||||||
@property
|
@property
|
||||||
def is_from_self(self) -> bool:
|
def is_from_self(self) -> bool:
|
||||||
...
|
...
|
||||||
|
@property
|
||||||
|
def is_reply(self) -> bool:
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
class IcaClient:
|
class IcaClient:
|
||||||
|
|
|
@ -81,6 +81,6 @@ def bmcl(msg: NewMessage, client: IcaClient) -> None:
|
||||||
|
|
||||||
|
|
||||||
def on_message(msg: NewMessage, client: IcaClient) -> None:
|
def on_message(msg: NewMessage, client: IcaClient) -> None:
|
||||||
if not msg.is_from_self:
|
if not (msg.is_from_self or msg.is_reply):
|
||||||
if msg.content == "/bmcl-rs":
|
if msg.content == "/bmcl":
|
||||||
bmcl(msg, client)
|
bmcl(msg, client)
|
||||||
|
|
|
@ -139,6 +139,10 @@ impl NewMessagePy {
|
||||||
pub fn get_is_from_self(&self) -> bool {
|
pub fn get_is_from_self(&self) -> bool {
|
||||||
self.msg.is_from_self()
|
self.msg.is_from_self()
|
||||||
}
|
}
|
||||||
|
#[getter]
|
||||||
|
pub fn get_is_reply(&self) -> bool {
|
||||||
|
self.msg.is_reply()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NewMessagePy {
|
impl NewMessagePy {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user