GithubHelp home page GithubHelp logo

jiut / nonebot_plugin_kawaii_robot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lgc-nb2dev/nonebot-plugin-kawaii-robot

0.0 0.0 0.0 127 KB

使用Kyomotoi / AnimeThesaurus的nonebot2的回复(文i)插件

License: GNU Affero General Public License v3.0

Python 100.00%

nonebot_plugin_kawaii_robot's Introduction

nonebot

nonebot_plugin_kawaii_robot

使用Kyomotoi / AnimeThesaurus的nonebot2的回复(文i)插件

本插件更新到3.0版本,配置项较2.x前有改动,建议升级后重新配置。

群聊复读姬

现在可以复读啦!谁不喜欢+1呢

当然也可以打断复读...谁不喜欢打断复读呢

具体详见配置条目

个性化词库

把你自己的词库(json文件)扔到resource文件夹里就可以加载啦!

可以加载多个json文件。

如果扔进了奇怪的东西大概会加载失败,然后。。。跳过,继续加载下一个文件。

不要把奇怪的东西扔进资源里呀kora

顺便一提,自己的词库是最优先的。

注意:词库要符合json格式 如果报解码错误先检查自己的词库是不是 无 BOM 的 UTF-8 编码格式

词库格式

参考Kyomotoi / AnimeThesaurus json字典格式,键是字符串,值是列表

{
    "key":[
        "value"
        ]
}

安装

pip install nonebot_plugin_kawaii_robot

使用

nonebot.load_plugin('nonebot_plugin_kawaii_robot') 

配置

# nonebot_plugin_kawaii_robot
LEAF_PERMISSION = "ALL"     # 配置回复权限,"ALL"就是全部聊天都会触发回复,"GROUP"就是仅群聊。
LEAF_IGNORE = ()            # 配置忽略词,元素为str。
LEAF_REPLY_TYPE = 1         # 配置at回复
LEAF_POKE_RAND = 5          # 配置戳一戳回复文字概率
LEAF_REPEATER_LIMIT = [3,6] # 配置复读次数
LEAF_INTERRUPT = 6          # 配置打断概率

LEAF_PERMISSION 配置回复权限

"ALL" 全部聊天

"GROUP" 仅群聊。


LEAF_IGNORE 配置忽略词

指令以LEAF_IGNORE中的元素开头不会触发回复。

元素为str

# 例如忽略 .指令 #指令 你好
LEAF_IGNORE = (".","#","你好")

LEAF_REPLY_TYPE 配置at回复

-1 关闭全部at回复

0 仅启用字典

1 开启所有回复


LEAF_POKE_RAND 配置戳一戳回复

-1 关闭戳一戳回复

0 戳一戳回复戳一戳

1 戳一戳回复文字

5 配置戳一戳回复文字概率(5就是1/5概率回复文字,4/5概率戳回去)


LEAF_REPEATER_LIMIT 配置复读次数

[3,6] 群内复读3~6次数后触发复读或打断


LEAF_INTERRUPT 配置打断概率

-1 关闭复读/打断

0 全部复读

1 全部打断

6 配置打断概率(6就是1/6概率打断,5/6概率复读)


其他

改编nonebot_plugin_smart_reply:使用了青云客api的的智能回复插件

复读姬借鉴nonebot_plugin_repeater:群聊复读机

源里的leaf.json是咱自制的bot的词库

WARMING:高二次元浓度警告

nonebot_plugin_kawaii_robot's People

Contributors

karisaya avatar jiut avatar cheshire-nya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.