Giter Site home page Giter Site logo

moonlark-dev / xdbot2 Goto Github PK

View Code? Open in Web Editor NEW
23.0 1.0 9.0 29.8 MB

多功能 ChatBot,不止于 QQ

Home Page: https://xdbot2.itcdt.top/

License: GNU General Public License v3.0

Python 99.94% Dockerfile 0.06%
nonebot nonebot2 onebot onebot11 python3 discord-bot qqbot

xdbot2's People

Contributors

beiyaohhhc avatar chun-awa avatar github-actions[bot] avatar lzzkill avatar montmorill avatar pre-commit-ci[bot] avatar this-is-xiaodeng avatar wowstarworld avatar xiexilin2 avatar xxtg666 avatar yifanzhuzhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

xdbot2's Issues

添加回声洞风控

描述

超管可以指定风控部分用户,对应用户在提交cave投稿时需要超管审核才能正常显示否则无法被随机且索引将把内容替换为内容审核中(好好反思下这个cave为什么要审核)

原因

我不知道(x

将report修改为举报

描述

将report修改为举报,不再提示前往Github,用于举报用户的违规操作(处理结果使用messenger发送)

原因

No response

在删除cave发送cave内容

描述

/su cave remove <ID>删除cave同时将回声洞(<ID>)发送出来

原因

在超管删除cave后可以确认并恢复cave

为preview添加url别名

描述

如题,用于访问XDbot2内置的部分页面,如/preview six自动解析为/preview http://127.0.0.1:38192/six,以此类推

原因

方便操作

在线代码运行器

描述

如题,输入代码并执行(建议:在glot.io)后返回执行输出

原因

No response

st-r无法使用

描述

随机涩图(st-r)使用后报错json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0),经过排查疑似其API(lolicon)无法正常提供服务
图片

重现步骤

  1. /st-r

截图

图片

截图来自XDbot2控制中心

[添加物品] 皮炎

描述

该物品可以用1919个VimCoin购买1919个
该物品使用后会对群昵称强制去除[檎兽]前缀

原因

我是homo

随机数

描述

  • random:取随机数
    • random:在0~100间取随机数
    • random <end>:在0~<end>间取随机数
    • random <start> <end>:在<start>~<end>间取随机数

原因

No response

[添加物品] 林檎

描述

该物品可以用114个VimCoin购买114个
该物品使用后会对群昵称强制加入[檎兽]前缀

原因

我是homo

建议添加使用at查询其他用户jrrp

描述

/jrrp <QQ>指令中,添加使用at查询其他用户人品

/jrrp 1744793737等价于/jrrp @这里是小邓QwQ

原因

可以方便官版QQ用户,不再需要切换一堆页面查询他人QQ号

使用数量为0的物品时报错

描述

使用背包内数量为0(或以下)的物品时出错

报错内容

Traceback (most recent call last):
  File "/home/xdisrbq/XDbot2/src/plugins/Core/plugins/use.py", line 23, in useHandle
    Message(_userCtrl.useItem(event.get_user_id(), argument)), at_sender=True
  File "/home/xdisrbq/XDbot2/src/plugins/Core/plugins/_userCtrl.py", line 143, in useItem
    removeItemsFromBag(userID, pos, 1)
  File "/home/xdisrbq/XDbot2/src/plugins/Core/plugins/_userCtrl.py", line 57, in removeItemsFromBag
    raise NotHaveEnoughItem()
plugins._userCtrl.NotHaveEnoughItem

此处应提示物品不足而不是处理失败

重现步骤

/use 1

截图

3bed89eb92acf7ae

为6-count添加纯文本排名

描述

如题,类似ctjrrp rank,显示6-count前5名及对应数据(数量)及发送者的数据

原因

方便数据量过大时查看

vip系统

描述

添加娱乐模块vip系统,配合部分有加成的道具及功能使用

既定指令列表

  • /vip:VIP操作
    • /vip buy <level> <time>:购买vip
    • /vip renew <time>:续费vip
    • /vip upgrade <level>:升级vip

VIP有效时常最长不超过180天,使用vimcoin购买

既定算法为:VIP等级 ** 2 * 0.75 / 30

无最高等级限制

升级时天数不变,价格为(升级后VIP等级 ** 2 * 0.75 / 30 - 升级前VIP等级 ** 2 * 0.75 / 30) * 剩余天数

vip有效期内无法使用/vip new指令

vip仅持有对于部分道具(如每日vimcoin礼包)及部分功能(如签到)的相对(不算太高)加成,尽量不影响平衡

原因

No response

预览网页功能

描述

类似xdbot,对非内置网页提供20s的冷却

原因

No response

添加物品:命名牌

描述

可用于修改指定物品的displayName及简介,修改后将数据发送到控制中心

原因

配合书与笔

su *log 查询参数匹配不完全

描述

有时候只写一个参数筛选不出来,需要复制粘贴114514遍…

下次我自己来改

重现步骤

/su *log -M03 -D22 会输出一堆东西

截图

No response

添加物品:书与笔

描述

类似Minecraft中的书与笔,可书写、获取、重置、保存(保存后无法再次编辑)内容,相应内容保存在物品NBT中。可丢弃,可出售,获取时不解析CQ码并在保存后发送su群.

原因

致敬Minecraft

可投稿智能回复(调教)

描述

在回复中使用正则表达式匹配消息内容,如果匹配成功则发送对应文本,可接受群员投稿,不解析CQ码,使用json格式储存

指令

想不到别的指令名了可以改改

  • /reply
  • /reply create <正则表达式,允许空格>\n<发送内容,可为json(列表)>
  • /reply view <ID>
  • /reply remove <ID>

在创建后发送项目ID,同时发送到控制中心

原因

No response

新增cave评论

描述

在刷到cave的同时发送该cave的所有评论,回复cave消息可以评论

原因

No response

错误上报过滤掉部分无意义报错

描述

su群里一大堆报错真正有几条是有用的
建议把这种 nonebot.adapters.onebot.v11.exception.NetworkError: NetWorkError(message='WebSocket call api send_msg timeout') 之类的报错不上报,在发送报错的时候做一下检查

原因

No response

查看语言详细信息

描述

用法:/lang view <lang>

展示类似以下内容

语言:zh_hans
作者:StarWorld
兼容性:100%

兼容性计算方法为:缺失条目 / 总条目数 *100%

原因

No response

添加QUICK CAlCULUS功能

描述

QUICK CALCULUS - 即:快速微积分,可以挑选一些很简单的微积分或者极限给群友做做 /狗头

原因

受到[QUICK MATH]的启发,另外QUICK CALCULUS可能会难一点,可以酌情选择3-5个消息内的正确答案的消息,或者比QUICK MATH获得的奖励更多,之类的

在部分数据缓存使用完毕后删除

描述

6-count的html缓存、setu的图片缓存(在启动时清除),使用完成后删除文件以节省空间

原因

节省服务器及备份仓库空间

为超级广播添加确认功能

描述

在发送超级广播时,不是立即发送,而是等待超管再次确认内容无误后发送

类似这样:

  • 写广播:/su notice <text>
  • 提交:/su notice submit
  • 放弃:/su notice drop

通常缓存不会保存太久,可直接存在变量中

原因

防止某些超管(比如我,理直气壮)打错字或没打完手滑点了发送

更改汇率计算

描述

我一个人把他搞通货膨胀了(

重现步骤

购买超级多20面骰

截图

NDUGOMO4BJ7L6`8FY~AZWA2

为信鸽添加下标(ID)

描述

为信鸽信件添加纯数字下标,要求不能有重复,可使用/su指令删除违规信件

/su msg rm <ID>

原因

方便超管管理,配合 #51

处理失败! TypeError: JSONDecoder.__init__() got an unexpected keyword argument 'encoding'

描述

在使用签到时提示

处理失败!
TypeError: JSONDecoder.__init__() got an unexpected keyword argument 'encoding'

日志中具体报错为


03-21 19:16:47 [ERROR] plugins | Traceback (most recent call last):
  File "/home/xdisrbq/XDbot2/src/plugins/Core/plugins/sign.py", line 24, in sign_handler
    origin_data = user.get_user_data(qq)
  File "/home/xdisrbq/XDbot2/src/plugins/Core/plugins/etm/user.py", line 12, in get_user_data
    return json.load(open("data/etm/users.json"), encoding="utf-8")[user_id]
  File "/usr/lib/python3.10/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.10/json/__init__.py", line 359, in loads
    return cls(**kw).decode(s)
TypeError: JSONDecoder.__init__() got an unexpected keyword argument 'encoding'

经测试 cave-a 也出现了该问题

重现步骤

/sign

截图

图片

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.