一个Graia-Saya的插件仓库

Overview

一个Graia-Saya的插件仓库

这是一个存储基于 Graia-Saya 的插件的仓库

如果您有这类项目,欢迎提交 Pull request 将您的项目添加到这里(注意,本仓库仅接受开源项目的仓库地址)

如何使用

本仓库中所有自带插件都在modules中

若您想单独使用,可以将其下载并放入自己的module文件夹中

若您想开箱即用,您可以直接clone整个仓库并使用 python main.py 命令执行本仓库自带的启动程序

注意,若使用本仓库自带启动程序,您需要先将 configdemo.json 文件改名为 config.json 并填入其中的必要信息

插件列表

其他

目前正在进行 SAGIRI-BOT 的重构工作,暂时无法更新插件,若您有好的插件或有好的想法,欢迎 Pr 或提 ISSUE

Comments
  • 关于broatcast插件的版本

    关于broatcast插件的版本

    用pip引入了graia.saya,graia.application, graia.broatcast,启动的时候报

    ImportError: cannot import name 'Dispatchable' from 'graia.broadcast.entities.event' (F:\mirai\python3.9\lib\site-packages\graia\broadcast\entities\event.py)

    这是 graia.broatcast版本错误?我尝试引入了几次,用最新的也是有问题,在项目代码里面也没有发现什么附注版本信息的, ps:上述报错的版本我是跑通了让graia的bot.py的环境

    opened by ljj2333 4
  • ImageSender在新建和新加入的群发送关键词后会出现错误

    ImageSender在新建和新加入的群发送关键词后会出现错误

    如果是机器人原来呆的群就没有这个问题,只有新建和新加入的群会出现

    Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\graia \broadcast_init_.py", line 326, in Executor result = await run_always_await_safely( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\graia \broadcast\utilles.py", line 20, in run_always_await_safely return await callable(*args, **kwargs) File "C:\Users\Administrator\Desktop\mirai\Application-master\chajian\saya_plugins_collecti on-master\saya_plugins_collection-master\modules\ImageSender_init_.py", line 60, in image_ sender result = (await execute_sql(sql))[0] IndexError: list index out of range

    opened by Cristina269 3
  • 关于mp3/wav转slk的功能

    关于mp3/wav转slk的功能

    参考了大佬的代码后自己学着写了一下mp3转slk的功能。请问为什么我转码之后语音的语速会变得异常快呢..比如本来是10秒的语音。在转码后只有1-2秒了

    附py代码 cmd = 'silk_v3_encoder.exe "file.wav" "file.slk" -quiet -tencent' os.system(cmd)

    opened by Mechorca 2
  • ImageSender插件启动出现错误sqlite3.OperationalError: unable to open database file

    ImageSender插件启动出现错误sqlite3.OperationalError: unable to open database file

    Traceback (most recent call last): File "main.py", line 38, in saya.require(f"modules.{module.split('.')[0]}") File "/home/user/.local/lib/python3.8/site-packages/graia/saya/init.py", line 84, in require channel = self.require_resolve(module) File "/home/user/.local/lib/python3.8/site-packages/graia/saya/init.py", line 61, in require_resolve imported_module = importlib.import_module(module, module) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/home/user/mcl/Graia-Saya/modules/ImageSender/init.py", line 15, in from .Sqlite3Manager import execute_sql File "/home/user/mcl/Graia-Saya/modules/ImageSender/Sqlite3Manager.py", line 96, in manager = Sqlite3Manager() File "/home/user/mcl/Graia-Saya/modules/ImageSender/Sqlite3Manager.py", line 28, in init self.__conn = sqlite3.connect(self.path + './modules/ImageSender/imageSenderInfo.db') sqlite3.OperationalError: unable to open database file

    目录下没有/home/user/mcl/Graia-Saya/modules/ImageSender/imageSenderInfo.db文件

    opened by mangokuma 2
  • 自带的程序似乎已无法运行

    自带的程序似乎已无法运行

    环境Python3.9 已测试多种情况均为 ModuleNotFoundError: No module named 'graia'

    PS C:\Users\Cicini> & C:/Users/Cicini/AppData/Local/Microsoft/WindowsApps/python3.9.exe c:/Users/Cicini/Desktop/KeywordDetection/main.py
    Traceback (most recent call last):
      File "c:\Users\Cicini\Desktop\KeywordDetection\main.py", line 4, in <module>
        from graia.saya import Saya
    ModuleNotFoundError: No module named 'graia'
    

    (此段为Windows 10 21H1下)

    在手动执行pip install graia-saya 后 输出为

    root@ALIVE-THEORY ~/saya # python3 main.py
    Traceback (most recent call last):
      File "main.py", line 6, in <module>
        from graia.saya.builtins.broadcast import BroadcastBehaviour
      File "/usr/local/lib/python3.7/dist-packages/graia/saya/builtins/__init__.py", line 3, in <module>
        from graia.broadcast import Listener, BaseEvent, BaseDispatcher
    ImportError: cannot import name 'BaseEvent' from 'graia.broadcast' (/usr/local/lib/python3.7/dist-packages/graia/broadcast/__init__.py)
    

    (此段为Debian 10 64x)

    opened by Cicini 1
  • ImportError: cannot import name 'BaseEvent' from 'graia.broadcast'

    ImportError: cannot import name 'BaseEvent' from 'graia.broadcast'

    报错如下 readme.md内模块确认已经安装完毕 Python版本3.9 C:\Users\Administrator\Desktop\saya_plugins_collection-master>python main.py Traceback (most recent call last): File "main.py", line 6, in from graia.saya.builtins.broadcast import BroadcastBehaviour File "C:\Program Files\python\lib\site-packages\graia\saya\builtins_init_.py", line 3, in from graia.broadcast import Listener, BaseEvent, BaseDispatcher ImportError: cannot import name 'BaseEvent' from 'graia.broadcast' (C:\Program Files\python\lib\site-packages\graia\broadcast_init_.py)

    opened by Mepuru 0
  • aiohttp 失败

    aiohttp 失败

    2021-09-07 23:35:56 I/net.mamoe.mirai-api-http: Starting Mirai HTTP Server in localhost:8080 且已经在windows防火墙放通8080端口 但仍然无法连接 [2021-09-07 23:53:36,605][INFO]: initializing app... modules.5000zhao::模块加载成功!!! modules.AbbreviatedPrediction::模块加载成功!!! modules.BangumiInfoSearcher::模块加载成功!!! modules.BilibiliBangumiSchedule::模块加载成功!!! modules.ChatBot::模块加载成功!!! modules.GarbageClassification::模块加载成功!!! modules.ImageSender::模块加载成功!!! modules.KeywordDetection::模块加载成功!!! modules.KeywordReply::模块加载成功!!! modules.LeetcodeInfoCrawer::模块加载成功!!! modules.MessagePrinter::模块加载成功!!! modules.NetworkCompiler::模块加载成功!!! modules.NiBuNengXXMa::模块加载成功!!! modules.PhantomTank::模块加载成功!!! modules.PixivImageSearcher::模块加载成功!!! modules.PornhubStyleLogoGenerator::模块加载成功!!! modules.Repeater::模块加载成功!!! modules.SteamGameSearcher::模块加载成功!!! modules.WeiboHotSearch::模块加载成功!!! modules.ZhihuHotSearch::模块加载成功!!! Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 969, in _wrap_create_connecti on return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1056, in create_connection raise exceptions[0] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1041, in create_connection sock = await self._connect_sock( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 955, in _connect_sock await self.sock_connect(sock, address) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\proactor_events.py", line 702, in sock_connect return await self._proactor.connect(sock, address) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 812, in _poll value = callback(transferred, key, ov) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 599, in finish_connect ov.getresult() ConnectionRefusedError: [WinError 1225] 远程计算机拒绝网络连接。

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "D:\mirai\main.py", line 42, in app.launch_blocking() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\graia\application_init_.py", line 1613, in launch_bloc king loop.run_until_complete(self.initialize()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\graia\application_init_.py", line 1503, in initialize await self.authenticate() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\graia\application\utilles.py", line 27, in wrapper return await func(self, *args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\graia\application_init_.py", line 301, in authenticate async with self.session.post( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1117, in aenter self._resp = await self._coro File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 520, in _request conn = await self._connector.connect( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 535, in connect proto = await self._create_connection(req, traces, timeout) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 892, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1051, in _create_direct_conne ction raise last_exc File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1020, in _create_direct_conne ction transp, proto = await self._wrap_create_connection( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 975, in _wrap_create_connecti on raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:8080 ssl:default [远程计算机拒绝网络连接。]

    opened by YuiOfAstora 2
  • KeywordDetection中部分词语无法匹配

    KeywordDetection中部分词语无法匹配

    描述大致就和这里差不太多 以下是展示截图: 上面是群内发送的,下面的是数据库中的相关词库 Snipaste_2021-04-17_23-07-33.png Snipaste_2021-04-17_23-08-56.png 按理来说屎这种应该也有提醒来着 还有这个例子: Snipaste_2021-04-17_23-16-16.png Snipaste_2021-04-17_23-10-26.png 理论来说应该显示***而非习**叭(? 词库用了战双的稍微删了点内容的词库,可以在这里下载

    ps: 导入词库的时候也发生了挺玄学的事情...用了这个插件自带的sqlite的程序写了一个python批量导入的脚本,但这种方法生成的数据库会几乎没什么词能匹配,用navicat就会出现部分词导入失败但至少绝大多数可以匹配了...x

    bug 
    opened by Amazefcc233 1
Owner
ZAPHAKIEL
vegetable chicken
ZAPHAKIEL