9 releases (4 breaking)

Uses new Rust 2024

new 0.4.0 Jun 12, 2025
0.3.1 Dec 30, 2024
0.2.0 Nov 25, 2024
0.1.0 Oct 30, 2024
0.0.5 Oct 26, 2024

#784 in Network programming

Download history 11/week @ 2025-02-26 6/week @ 2025-04-16 10/week @ 2025-05-07 134/week @ 2025-06-11

134 downloads per month
Used in kovi-plugin-siliconflow

MPL-2.0 license

46KB
1K SLoC

kovi-plugin-expand-napcat

Kovi 的 Napcta Api 拓展插件。

Napcta Api文档不齐全,如果出错请及时提交 issue 。

使用 cargo kovi add expand-napcat -p <PLUGIN_NAME> or cargo add kovi-plugin-expand-napcat -p <PLUGIN_NAME> 添加此拓展。

懒得写了,直接看 napcat 的文档就行了: napcat

合并转发例子:

use kovi::{Message, PluginBuilder as p};
// 两个 trait,第一个用于 RuntimeBot,第二个用于 Vec
use kovi_plugin_expand_napcat::{NapCatApi, NapCatVec};

#[kovi::plugin]
async fn main() {
    let bot = p::get_runtime_bot();

    let mut nodes = Vec::new();

    nodes.push_node_from_id("10000");

    bot.send_private_msg(bot.main_admin, nodes);

    // 伪造
    let fake_nodes = Vec::new().add_fake_node_from_content("10000", "测试用户", Message::from("测试"));

    bot.send_private_msg(bot.main_admin, fake_nodes);
}

Dependencies

~10–21MB
~253K SLoC