mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2025-04-20 05:39:54 +08:00
添加新 api,我感觉可以发版了
This commit is contained in:
parent
3d08a7da91
commit
86ab23e45d
|
@ -70,6 +70,23 @@ impl IcaStatusPy {
|
||||||
pub fn get_rooms(&self) -> Vec<IcaRoomPy> {
|
pub fn get_rooms(&self) -> Vec<IcaRoomPy> {
|
||||||
MainStatus::global_ica_status().rooms.iter().map(|r| r.into()).collect()
|
MainStatus::global_ica_status().rooms.iter().map(|r| r.into()).collect()
|
||||||
}
|
}
|
||||||
|
#[getter]
|
||||||
|
/// 获取所有管理员
|
||||||
|
///
|
||||||
|
/// 添加自 2.0.1
|
||||||
|
pub fn get_admins(&self) -> Vec<UserId> {
|
||||||
|
MainStatus::global_config().ica().admin_list.clone()
|
||||||
|
}
|
||||||
|
#[getter]
|
||||||
|
/// 获取所有被屏蔽的人
|
||||||
|
///
|
||||||
|
/// (好像没啥用就是了, 反正被过滤的不会给到插件)
|
||||||
|
///
|
||||||
|
/// 添加自 2.0.1
|
||||||
|
pub fn get_filtered(&self) -> Vec<UserId> {
|
||||||
|
MainStatus::global_config().ica().filter_list.clone()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for IcaStatusPy {
|
impl Default for IcaStatusPy {
|
||||||
|
|
|
@ -21,3 +21,11 @@
|
||||||
|
|
||||||
- `def new_message_to(self, content: str) -> IcaSendMessage`
|
- `def new_message_to(self, content: str) -> IcaSendMessage`
|
||||||
- 用于创建一条指向这个房间的消息
|
- 用于创建一条指向这个房间的消息
|
||||||
|
|
||||||
|
> 添加了 Ica 侧的相关配置获取
|
||||||
|
|
||||||
|
- `IcaStatus` 添加了 `admins(self) -> list[UserId]` 方法
|
||||||
|
- 用于获取当前所有的管理员
|
||||||
|
|
||||||
|
- `IcaStatus` 添加了 `blocked(self) -> list[UserId]` 方法
|
||||||
|
- 用于获取当前所有的被屏蔽的人
|
||||||
|
|
Loading…
Reference in New Issue
Block a user