ABot-Graia 瞎拼凑的多功能bot(?
-
没啥可多说的,一个基于Graia v4的bot
缝合了很多奇奇怪怪的功能
某些功能因为MAH的一些低版本(1.12.0)问题目前无法使用大多数功能可以在github查看,因为有一些我没写在readme里(
其实是我不想写Github :ABot-Graia
-
虚拟环境部署一直出现错误
-
我来顶一下、
ABot 现在能干什么:
菜单以及功能介绍
群名片修正 [被他人修改后自动触发] and 私聊群名片修正
微软文字转语音
兽语转换
小鸡词典查梗
小鸡词典文字转 emoji
汉语词典查询
点歌姬(支持 [QQ 音乐 / 网易云音乐] 以语音形式发送歌曲)
网络黑话(缩写)翻译(字母缩写,如 awsl 等)
词云生成
我的世界服务器 Motd Ping
摸头 gif 生成
涩图
风格化 logo 生成
复读姬
有点涩的词库?(
废物证申请 废物证申请
禁言套餐(如果 ABot 是管理员的情况下)
防撤回(支持内容审核,检测是否为违禁内容)
色图(随机生成色图 gif)
娱乐功能
简单的经济系统
增加游戏币 私聊充值 <qq> <数量>
所有人增加游戏币 私聊全员充值 <数量>
赠送游戏币
签到
查询当日签到率 私聊签到率查询
你画我猜
奖券
排行榜(可查看游戏币榜和发言榜)查看排行榜
(待开发中)
简易骰娘(可设置数量、面数、取最大前 n 个)
简单的作息系统(每日 0 点至 7 点半将自动关闭大部分功能)休息 and 工作
BiliBili 视频解析
听歌识曲(识别语音形式的原曲或哼唱歌曲)
白名单系统(将拒绝退出白名单外的群)私信添加白名单 <group> 取消白名单 <group>
淫文翻译机
背单词
全局黑名单控制
消息量统计 查看消息量统计
BiliBili 动态/直播 订阅推送
性能统计 查看性能统计
随机人设
以图搜图 / 以图搜番
查战绩
彩虹六号:围攻
(待开发中)
明日方舟蹲饼
低多边形图片生成
计算器(?
漂流瓶
明日方舟猜干员
定时提醒
亿些杂七杂八没整理的小功能
ABot 事件提醒
ABot 被禁言后自动退群
撤回群消息 [回复]1
(待开发中) -
我不行了,卡在这了
2021-12-26 19:50:18.166 | INFO | config:save_config:81 - 正在保存配置文件
2021-12-26 19:50:18.183 | INFO | main:<module>:30 - ABot is starting...
2021-12-26 19:50:18.226 | DEBUG | graia.saya:require:111 - require saya.DailyAttendance
2021-12-26 19:50:18.339 | INFO | graia.saya:require:134 - module loading finished: saya.DailyAttendance
2021-12-26 19:50:18.340 | DEBUG | graia.saya:require:111 - require saya.ChineseDict
/home/mirai/Abot/ABot-Graia/util/browser/init.py:36: RuntimeWarning: coroutine 'get_browser' was never awaited
get_browser()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2021-12-26 19:50:18.373 | INFO | util.browser:<module>:37 - Chromium Browser initialized
2021-12-26 19:50:18.374 | INFO | graia.saya:require:134 - module loading finished: saya.ChineseDict
2021-12-26 19:50:18.374 | DEBUG | graia.saya:require:111 - require saya.Repeater
2021-12-26 19:50:18.379 | INFO | graia.saya:require:134 - module loading finished: saya.Repeater
2021-12-26 19:50:18.379 | DEBUG | graia.saya:require:111 - require saya.Reminder
2021-12-26 19:50:18.609 | INFO | graia.saya:require:134 - module loading finished: saya.Reminder
2021-12-26 19:50:18.610 | DEBUG | graia.saya:require:111 - require saya.ChatMS
2021-12-26 19:50:18.610 | INFO | saya.ChatMS:<module>:42 - 正在初始化词库
2021-12-26 19:50:18.610 | INFO | saya.ChatMS:update_data:29 - 正在更新词库
2021-12-26 19:50:23.621 | ERROR | graia.ariadne.util:loguru_excepthook:95 - Exception:
Traceback (most recent call last):File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions
yield
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/backends/sync.py", line 76, in connect_tcp
sock = socket.create_connection(
│ └ <function create_connection at 0x7f964f6519d0>
└ <module 'socket' from '/usr/local/lib/python3.9/socket.py'>
File "/usr/local/lib/python3.9/socket.py", line 844, in create_connection
raise err
└ None
File "/usr/local/lib/python3.9/socket.py", line 832, in create_connection
sock.connect(sa)
│ │ └ ('88.198.10.254', 443)
│ └ <method 'connect' of '_socket.socket' objects>
└ <socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_transports/default.py", line 187, in handle_request
resp = self._pool.handle_request(req)
│ │ │ └ <Request [b'GET']>
│ │ └ <function ConnectionPool.handle_request at 0x7f9649139940>
│ └ <httpcore.ConnectionPool object at 0x7f963a0aed30>
└ <httpx.HTTPTransport object at 0x7f963a0aed00>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py", line 248, in handle_request
raise exc
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py", line 232, in handle_request
response = connection.handle_request(request)
│ │ └ <Request [b'GET']>
│ └ <function HTTPConnection.handle_request at 0x7f96490eeca0>
└ <HTTPConnection [CONNECTION FAILED]>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 90, in handle_request
raise exc
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 67, in handle_request
stream = self._connect(request)
│ │ └ <Request [b'GET']>
│ └ <function HTTPConnection._connect at 0x7f96490eed30>
└ <HTTPConnection [CONNECTION FAILED]>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 115, in _connect
stream = self._network_backend.connect_tcp(**kwargs)
│ │ │ └ {'host': 'raw.fastgit.org', 'port': 443, 'local_address': None, 'timeout': 5.0}
│ │ └ <function SyncBackend.connect_tcp at 0x7f964913bca0>
│ └ <httpcore.backends.sync.SyncBackend object at 0x7f963a0aedf0>
└ <HTTPConnection [CONNECTION FAILED]>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/backends/sync.py", line 76, in connect_tcp
sock = socket.create_connection(
│ └ <function create_connection at 0x7f964f6519d0>
└ <module 'socket' from '/usr/local/lib/python3.9/socket.py'>
File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
│ │ │ │ │ └ <traceback object at 0x7f963a148a80>
│ │ │ │ └ timeout('timed out')
│ │ │ └ <class 'socket.timeout'>
│ │ └ <method 'throw' of 'generator' objects>
│ └ <generator object map_exceptions at 0x7f9639f177b0>
└ <contextlib._GeneratorContextManager object at 0x7f963a0ae430>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
raise to_exc(exc)
└ <class 'httpcore.ConnectTimeout'>httpcore.ConnectTimeout: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/mirai/Abot/ABot-Graia/main.py", line 60, in <module>
saya.require(f"saya.{module.split('.')[0]}")
│ └ <function Saya.require at 0x7f964c35e280>
└ <graia.saya.Saya object at 0x7f964973f1f0>File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/graia/saya/init.py", line 120, in require
channel = self.require_resolve(module)
│ │ └ 'saya.ChatMS'
│ └ <function Saya.require_resolve at 0x7f964c35e160>
└ <graia.saya.Saya object at 0x7f964973f1f0>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/graia/saya/init.py", line 76, in require_resolve
imported_module = importlib.import_module(module, module)
│ │ │ └ 'saya.ChatMS'
│ │ └ 'saya.ChatMS'
│ └ <function import_module at 0x7f96511873a0>
└ <module 'importlib' from '/usr/local/lib/python3.9/importlib/init.py'>
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ 'saya.ChatMS'
│ │ │ └ 0
│ │ └ 'saya.ChatMS'
│ └ <function _gcd_import at 0x7f96512e4310>
└ <module 'importlib._bootstrap' (frozen)>
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removedFile "/home/mirai/Abot/ABot-Graia/saya/ChatMS/init.py", line 43, in <module>
asyncio.run(update_data())
│ │ └ <function update_data at 0x7f96479b8790>
│ └ <function run at 0x7f964fdee3a0>
└ <module 'asyncio' from '/usr/local/lib/python3.9/asyncio/init.py'>File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
│ │ └ <coroutine object update_data at 0x7f9639f114c0>
│ └ <function BaseEventLoop.run_until_complete at 0x7f964d95c8b0>
└ <_UnixSelectorEventLoop running=False closed=True debug=False>
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
│ └ <method 'result' of '_asyncio.Task' objects>
└ <Task finished name='Task-8' coro=<update_data() done, defined at /home/mirai/Abot/ABot-Graia/saya/ChatMS/init.py:27> exc...File "/home/mirai/Abot/ABot-Graia/saya/ChatMS/init.py", line 30, in update_data
root = httpx.get(
│ └ <function get at 0x7f96490ab040>
└ <module 'httpx' from '/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/__i...File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_api.py", line 189, in get
return request(
└ <function request at 0x7f9649662160>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_api.py", line 100, in request
return client.request(
│ └ <function Client.request at 0x7f96490a48b0>
└ <httpx.Client object at 0x7f963a06f640>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_client.py", line 802, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
│ │ │ │ └ False
│ │ │ └ None
│ │ └ <Request('GET', 'https://raw.fastgit.org/Kyomotoi/AnimeThesaurus/main/data.json')>
│ └ <function Client.send at 0x7f96490a4a60>
└ <httpx.Client object at 0x7f963a06f640>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_client.py", line 889, in send
response = self._send_handling_auth(
│ └ <function Client._send_handling_auth at 0x7f96490a4af0>
└ <httpx.Client object at 0x7f963a06f640>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_client.py", line 917, in _send_handling_auth
response = self._send_handling_redirects(
│ └ <function Client._send_handling_redirects at 0x7f96490a4b80>
└ <httpx.Client object at 0x7f963a06f640>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_client.py", line 954, in _send_handling_redirects
response = self._send_single_request(request)
│ │ └ <Request('GET', 'https://raw.fastgit.org/Kyomotoi/AnimeThesaurus/main/data.json')>
│ └ <function Client._send_single_request at 0x7f96490a4c10>
└ <httpx.Client object at 0x7f963a06f640>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_client.py", line 990, in _send_single_request
response = transport.handle_request(request)
│ │ └ <Request('GET', 'https://raw.fastgit.org/Kyomotoi/AnimeThesaurus/main/data.json')>
│ └ <function HTTPTransport.handle_request at 0x7f9649118820>
└ <httpx.HTTPTransport object at 0x7f963a0aed00>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_transports/default.py", line 187, in handle_request
resp = self._pool.handle_request(req)
│ │ │ └ <Request [b'GET']>
│ │ └ <function ConnectionPool.handle_request at 0x7f9649139940>
│ └ <httpcore.ConnectionPool object at 0x7f963a0aed30>
└ <httpx.HTTPTransport object at 0x7f963a0aed00>
File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
│ │ │ │ │ └ <traceback object at 0x7f963a148b40>
│ │ │ │ └ ConnectTimeout(timeout('timed out'))
│ │ │ └ <class 'httpcore.ConnectTimeout'>
│ │ └ <method 'throw' of 'generator' objects>
│ └ <generator object map_httpcore_exceptions at 0x7f9639f176d0>
└ <contextlib._GeneratorContextManager object at 0x7f963a0aec10>
File "/home/mirai/Abot/ABot-Graia/virtualenvs/abot-mahv2--qpUGc52-py3.9/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
│ └ 'timed out'
└ <class 'httpx.ConnectTimeout'>httpx.ConnectTimeout: timed out
-
不能用mirai框架还是挺不方便的