telegram自动签到(telegram怎么订阅)

未标题-1-4 (1).png

《开源精选》是我们分享Github、Gitee等开源社区中优质项目的栏目,包括技术、学习、实用与各种有趣的内容。本期推荐的是一个跨平台 Python 异步聊天机器人框架——nonebot2。

NoneBot2 是一个现代、跨平台、可扩展的 Python 聊天机器人框架,它基于 Python 的类型注解和异步特性,能够为你的需求实现提供便捷灵活的支持。

特性开箱即用:使用 NB-CLI 快速构建属于你的机器人插件系统:插件化开发,模块化管理跨平台支持:支持多种平台,以及多样的事件响应方式异步开发:异步优先式开发,提高运行效率依赖注入:简单清晰的依赖注入系统,内置依赖函数减少用户代码应用案例milkice233/efb-qq-slave:基于 ehForwarderBot 框架的 QQ 从端

https://github.com/milkice233/efb-qq-slave

projectriri/bot-gateway:提供跨聊天平台的通用机器人 API 的机器人消息网关

https://projectriri.github.io/bot-gateway/

jqqqqqqqqqq/UnifiedMessageRelay:QQ <-> Telegram Bot Framework & Forwarder

https://github.com/jqqqqqqqqqq/UnifiedMessageRelay

Mother-Ship/caadfdsageWeb:基于 Java Web 的 osu! 游戏数据查询机器人

https://github.com/Mother-Ship/caadfdsageWeb

spacemeowx2/splatoon2-qqbot:宇宙弟一的 Splatoon2 的地图机器人

https://github.com/spacemeowx2/splatoon2-qqbot

mrthanlon/SICNUBOT:专为四川师范大学设计用于审核发布消息用的 QQ 机器人

https://github.com/mrthanlon/SICNUBOT

Bluefissure/FFXIVBOT:基于 Django Channels 的蕞终幻想 14 游戏数据查询机器人

https://github.com/Bluefissure/OtterBot

duan602728596/qqtools:基于 Nwjs 的 QQ 群工具

https://github.com/duan602728596/qqtools

UltraSoundX/SDFMU-Library:山东弟一医科大图书馆预约机器人

https://github.com/UltraSoundX/SDFMU-Library

Ninzore/Wecab:网络内容聚合机器人,支持微博、B站、Twitter 等

https://github.com/Ninzore/Wecab

Kyomotoi/ATRI: 为即时聊天工具中复现一只优秀的功能性机器人是本项目的目标

https://github.com/Kyomotoi/ATRI

KimigaiiWuyi/GenshinUID: 基于 HoshinoBot/NoneBot2/QQ 官方频道 Bot 的原神 Uid 查询/原神 Wiki/米社签到/树脂提醒插件

https://github.com/KimigaiiWuyi/GenshinUID

插件示例

命令式问答示例:

from nonebot import on_commandfrom nonebot.rule import to_mefrom nonebot.matcher import Matcherfrom nonebot.adapters import Messagefrom nonebot.params import Arg, CommandArg, ArgPlainTextweather = on_command, aliases={"天气", "天气预报"}, priority=5)@weather.handleasync def handle_first_receive): plain_text = args.extract_plain_text # 首次发送命令时跟随的参数,例:/天气 上海,则args为上海 if plain_text: matcher.set_arg # 如果用户发送了参数则直接赋值@weather.gotasync def handle_city, city_name: str = ArgPlainText): if city_name not in ["北京", "上海"]: # 如果参数不符合要求,则提示用户重新输入 # 可以使用平台的 Message 类直接构造模板消息 await weather.reject) city_weather = await get_weather await weather.finish# 在这里编写获取天气信息的函数async def get_weather -> str: return f"{city}的天气是..."

—END—

开源协议:MIT

开源地址:https://github.com/nonebot/nonebot2

开发教程:https://nb2.baka.icu/docs/tutorial/create-project

海外精品引流脚本–最强海外引流  

官网:www.facebook18.com

唯一TG:https://t.me/Facebook181818

Facebook.png

更多海外引流脚本方案

如果你需要脚本演示、部署咨询或海外获客方案,可以通过下面入口继续查看。

官网首页 | 演示视频 | TG 在线客服 | TG 频道

相关阅读

© 版权声明
广告也精彩

相关文章