feat: Implement commands (help,rank,maxskill)

This commit is contained in:
Naruse
2024-11-18 16:22:42 +08:00
parent c9870f5d66
commit b8998ee11d
8 changed files with 254 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import importlib
import os
import sys
folder = "game_server/game/chat/command"
sys.path.append(os.path.dirname(folder))
for filename in os.listdir(folder):
if filename.endswith(".py") and filename != "__init__.py":
module_name = filename[:-3]
module_path = f"game_server.game.chat.command.{module_name}"
try:
importlib.import_module(module_path)
except Exception as e:
print(f"Error importing module '{module_path}': {e}")