惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
量子位
博客园 - 叶小钗
AI
AI
T
Tor Project blog
Forbes - Security
Forbes - Security
W
WeLiveSecurity
博客园_首页
爱范儿
爱范儿
J
Java Code Geeks
B
Blog
G
GRAHAM CLULEY
aimingoo的专栏
aimingoo的专栏
Cloudbric
Cloudbric
C
CXSECURITY Database RSS Feed - CXSecurity.com
TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
H
Help Net Security
博客园 - 三生石上(FineUI控件)
C
Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 司徒正美
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
S
Secure Thoughts
Spread Privacy
Spread Privacy
F
Fortinet All Blogs
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
About on SuperTechFans
Security Latest
Security Latest
Webroot Blog
Webroot Blog
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog

丘卡饮品店

小马入坑的东扯西扯 网络上的物是人非 数独恶魔城——精雕细琢的谜题大作 数独笔记:XYZ 环 tee 心协力,tee 乐无穷——DDNet 入坑回忆 游戏推荐:图灵完备 「幻想の杂谈」放置游戏,真的“放置”吗? 找实习的心路经历 我与空竹的故事 这几年折腾博客的总结 本站 CDN 被盗刷 高性能计算课程作业 华为软件精英挑战赛感想 时间与陪伴 博客今后的方向 游戏推荐:Screeps 关于最近的一些事情 计算思维 记一次博客迁移历程 选择
QQ 机器人搭建体验
Zerol Acqua · 2023-02-18 · via 丘卡饮品店

发表于|更新于|编程学习

|总字数:635|阅读时长:2分钟|浏览量:

本文章还在施工中(多半弃坑了,因为 qq 被风控了)

使用效果

图1

参考链接

零基础搭建搭建

使用插件

商店插件

自编插件

一些问题

常见问题

可在Well404的妙妙屋中找到大部分常见报错,以下是我的一些白痴问题。

代码问题

  • 机器人搭好了怎么连接 qq?

    还要用 go-cqhttp 作为 qq 客户端

  • 怎么通过 url 发送图片消息?

  • 实例化 MessageSegment 时无法使用图片(版本相关)

  • 怎么接收图片为参数?


    get("image")

    messagesegment.data.get("url", "")
  • 获取呆站图像 url (具体应用场景,与 bot 无关)

  • 权限问题示例

    from nonebot.adapters.onebot.v11 import (
    Bot,
    Message,
    Event,
    GroupMessageEvent,
    GROUP_ADMIN,
    GROUP_OWNER
    )

    async def perssion_test(bot: Bot, event: GroupMessageEvent):
    if await SUPERUSER(bot, event):
    await xxx.send("识别到超级用户权限")
    elif await GROUP_ADMIN(bot, event):
    await xxx.send("识别到管理员权限")
    elif await GROUP_OWNER(bot, event):
    await xxx.send("识别到群主权限")
    else:

    await xxx.send("识别到普通权限")

服务器上部署(CentOS 7.6)

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 丘卡饮品店


avatar

Zerol Acqua

一只喜欢编程的小马