mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 04:31:05 +08:00
0.7.3
This commit is contained in:
parent
ef3fb5a8cc
commit
e5ff010a69
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -659,7 +659,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ica-rs"
|
name = "ica-rs"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ica-rs"
|
name = "ica-rs"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
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
|
||||||
|
|
|
@ -29,8 +29,8 @@ pub type MainStatus = status::BotStatus;
|
||||||
pub type StopGetter = tokio::sync::oneshot::Receiver<()>;
|
pub type StopGetter = tokio::sync::oneshot::Receiver<()>;
|
||||||
|
|
||||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
pub const ICA_VERSION: &str = "1.6.3";
|
pub const ICA_VERSION: &str = "1.6.4";
|
||||||
pub const TAILCHAT_VERSION: &str = "1.2.3";
|
pub const TAILCHAT_VERSION: &str = "1.2.4";
|
||||||
|
|
||||||
const HELP_MSG: &str = r#"/bot-rs
|
const HELP_MSG: &str = r#"/bot-rs
|
||||||
展示 rust 侧信息
|
展示 rust 侧信息
|
||||||
|
@ -73,7 +73,7 @@ pub fn version_str() -> String {
|
||||||
|
|
||||||
/// 是否为稳定版本
|
/// 是否为稳定版本
|
||||||
/// 会在 release 的时候设置为 true
|
/// 会在 release 的时候设置为 true
|
||||||
pub const STABLE: bool = true;
|
pub const STABLE: bool = false;
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! async_callback_with_state {
|
macro_rules! async_callback_with_state {
|
||||||
|
|
|
@ -149,6 +149,10 @@ impl SendMessagePy {
|
||||||
pub fn set_img(&mut self, file: Vec<u8>, file_type: String, as_sticker: bool) {
|
pub fn set_img(&mut self, file: Vec<u8>, file_type: String, as_sticker: bool) {
|
||||||
self.msg.set_img(&file, &file_type, as_sticker);
|
self.msg.set_img(&file, &file_type, as_sticker);
|
||||||
}
|
}
|
||||||
|
pub fn remove_reply(&mut self) -> Self {
|
||||||
|
self.msg.reply_to = None;
|
||||||
|
self.clone()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SendMessagePy {
|
impl SendMessagePy {
|
||||||
|
|
|
@ -72,6 +72,12 @@ impl TailchatClientPy {
|
||||||
pub fn get_tailchat_version(&self) -> String { crate::TAILCHAT_VERSION.to_string() }
|
pub fn get_tailchat_version(&self) -> String { crate::TAILCHAT_VERSION.to_string() }
|
||||||
#[getter]
|
#[getter]
|
||||||
pub fn get_startup_time(&self) -> SystemTime { crate::MainStatus::get_startup_time() }
|
pub fn get_startup_time(&self) -> SystemTime { crate::MainStatus::get_startup_time() }
|
||||||
|
#[pyo3(signature = (content, converse_id, group_id = None))]
|
||||||
|
pub fn new_message(&self, content: String, converse_id: ConverseId, group_id: Option<GroupId>) -> TailchatSendingMessagePy {
|
||||||
|
TailchatSendingMessagePy {
|
||||||
|
message: SendingMessage::new(content, converse_id, group_id, None),
|
||||||
|
}
|
||||||
|
}
|
||||||
pub fn debug(&self, content: String) {
|
pub fn debug(&self, content: String) {
|
||||||
debug!("{}", content);
|
debug!("{}", content);
|
||||||
}
|
}
|
||||||
|
@ -132,6 +138,10 @@ impl TailchatSendingMessagePy {
|
||||||
self.message.content = content;
|
self.message.content = content;
|
||||||
self.clone()
|
self.clone()
|
||||||
}
|
}
|
||||||
|
pub fn clear_meta(&mut self) -> Self {
|
||||||
|
self.message.meta = None;
|
||||||
|
self.clone()
|
||||||
|
}
|
||||||
pub fn set_img(&mut self, file: Vec<u8>, file_name: String) {
|
pub fn set_img(&mut self, file: Vec<u8>, file_name: String) {
|
||||||
let file = SendingFile::Image {
|
let file = SendingFile::Image {
|
||||||
file,
|
file,
|
||||||
|
|
22
news.md
22
news.md
|
@ -1,5 +1,27 @@
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
## 0.7.3
|
||||||
|
|
||||||
|
添加了一些新的 api
|
||||||
|
|
||||||
|
### ica 1.6.4
|
||||||
|
|
||||||
|
- 给 `SendMessagePy`
|
||||||
|
- 添加了 `remove_reply` 方法
|
||||||
|
- 用于取消回复状态
|
||||||
|
- 删除了 `Room` 的 `auto_download` 和 `download_path` 字段
|
||||||
|
- 因为这两个字段也没啥用
|
||||||
|
|
||||||
|
### tailcaht 1.2.4
|
||||||
|
|
||||||
|
- 给 `TailchatClientPy`
|
||||||
|
- 添加了 `new_message` 方法
|
||||||
|
- 用于创建新的消息
|
||||||
|
- 给 `TailchatSendingMessagePy`
|
||||||
|
- 添加了 `clear_meta` 功能
|
||||||
|
- 用于清除 `meta` 字段
|
||||||
|
- 可以用来取消回复状态
|
||||||
|
|
||||||
## 0.7.2
|
## 0.7.2
|
||||||
|
|
||||||
- 修复了一些 ica 和 tailchat 表现不一致的问题(捂脸)
|
- 修复了一些 ica 和 tailchat 表现不一致的问题(捂脸)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user