minatoaquacrews / nonebot_plugin_antiflash Goto Github PK
View Code? Open in Web Editor NEWAnti flash in groups for nonebot2
License: MIT License
Anti flash in groups for nonebot2
License: MIT License
.env.prod里添加了默认配置.
ANTI_FLASH_ON=true # 全局开关
ANTI_FLASH_GROUP=[ ] # 默认开启的群聊,但可通过指令开关
ANTI_FLASH_PATH="your-path-to-config.json" # 配置文件路径,默认同插件代码路径
启动还是报错了
07-04 14:27:28 [ERROR] nonebot | Failed to import "nonebot_plugin_antiflash"
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\bot\NB\venv\Scripts\nb.exe_main.py", line 7, in
sys.exit(main())
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "C:\bot\NB\venv\lib\site-packages\nb_cli\commands\main.py", line 30, in run
run_bot(file, app)
File "C:\bot\NB\venv\lib\site-packages\nb_cli\handlers\deploy.py", line 20, in run_bot
module = importlib.import_module(module_name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib_init.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\bot\NB\LittlePaimon.\bot.py", line 26, in
nonebot.load_from_toml("pyproject.toml")
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\load.py", line 119, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\load.py", line 53, in load_all_plugins
return manager.load_all_plugins()
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\manager.py", line 172, in load_all_plugins
return set(
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\manager.py", line 173, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\manager.py", line 144, in load_plugin
module = importlib.import_module(name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\manager.py", line 237, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\bot\NB\venv\lib\site-packages\nonebot_plugin_antiflash_init.py", line 7, in
from .config import handler
File "C:\bot\NB\venv\lib\site-packages\nonebot_plugin_antiflash\config.py", line 83, in
handler = AntiFlashHandler(config)
File "C:\bot\NB\venv\lib\site-packages\nonebot_plugin_antiflash\config.py", line 29, in init
with open(self.path, "w", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'your-path-to-config.json\config.json'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.