FengLiuFeseliud/pycqBot
Fork: 28 Star: 119 (更新于 1970-01-01 00:00:00)
license: AGPL-3.0
Language: Python .
go-cqhttp python 框架,可以用于快速塔建 bot
最后发布版本: v0.5.1.1 ( 2023-04-13 01:30:36)
pycqBot
go-cqhttp python 框架,可以用于快速塔建 bot
项目文档不更新的话 请刷新浏览器缓存
项目文档 (移动至 Github Pages): https://fengliufeseliud.github.io/pycqBot/
支持 PyPy
可以使用 PyPy3 进行性能提升
pypy3 -m pip install pycqBot
# 改用 PyPy 运行
pypy3 ./main.py
演示
创建指令
from pycqBot import cqHttpApi, cqBot, cqLog
from pycqBot.data import *
cqLog()
def test(command_data, message: Message):
message.reply("你好!")
bot = cqHttpApi().create_bot()
# 创建指令 "#test"
bot.command(test, "test")
bot.start()
cqCode
from pycqBot.cqCode import image, get_cq_code
cq_code = image("https://i.pixiv.cat/img-master/img/2020/03/25/00/00/08/80334602_p0_master1200.jpg")
# 字典 与 cqCode 互转
print(cq_code, "\n\n", get_cq_code(cq_code))
事件处理
from pycqBot import cqHttpApi, cqBot, cqLog
from pycqBot.data import *
cqLog()
class myCqBot(cqBot):
# 防撤回
def notice_group_recall(self, event: Notice_Event):
message = self.cqapi.get_msg(event.data["message_id"])["data"]
self.cqapi.send_group_msg(message["group_id"], "有一条消息无了 群友还没看清楚呢! %s:%s" % (
message["sender"]["nickname"],
message["message"]
))
bot = myCqBot(cqHttpApi()).start()
最近版本更新:(数据更新于 1970-01-01 00:00:00)
2023-04-13 01:30:36 v0.5.1.1
2023-04-10 14:10:30 v0.5.1
2023-04-04 19:08:23 v0.5.0.2
2023-04-04 00:02:15 v0.5.0
2022-06-19 16:35:38 v0.4.5
2022-06-13 01:21:53 v0.4.4.1
2022-06-12 18:14:39 v0.4.4
2022-06-06 23:55:19 v0.4.3
2022-03-30 13:41:28 v0.4.2
2022-03-28 13:42:29 v0.4.1
主题(topics):
bot, chat, chatbot, go-cqhttp, python, qq, qqbot
FengLiuFeseliud/pycqBot同语言 Python最近更新仓库
2024-12-22 09:03:32 ultralytics/ultralytics
2024-12-21 13:26:40 notepad-plus-plus/nppPluginList
2024-12-21 11:42:53 XiaoMi/ha_xiaomi_home
2024-12-21 04:33:22 comfyanonymous/ComfyUI
2024-12-20 18:47:56 home-assistant/core
2024-12-20 15:41:40 jxxghp/MoviePilot