1
0
forked from bot/app

新增启动时对本地仓库的检测

This commit is contained in:
2024-06-01 15:26:13 +08:00
parent 62928e47eb
commit 4cdf29557c
3 changed files with 13 additions and 4 deletions

View File

@ -29,7 +29,7 @@ if get_config("debug", False):
Handler for code file changes
"""
def on_modified(self, event):
if event.src_path.endswith(src_excludes_extensions) or event.is_directory:
if event.src_path.endswith(src_excludes_extensions) or event.is_directory or "__pycache__" in event.src_path:
return
nonebot.logger.debug(f"{event.src_path} modified, reloading bot...")
Reloader.reload()