# cmd_discord/__init__.py import os import importlib # def setup(bot): # """ # Dynamically load all commands from the cmd_discord folder. # """ # # Get a list of all command files (excluding __init__.py) # command_files = [ # f.replace('.py', '') for f in os.listdir(os.path.dirname(__file__)) # if f.endswith('.py') and f != '__init__.py' # ] # # Import and set up each command module # for command in command_files: # module = importlib.import_module(f".{command}", package='cmd_discord') # if hasattr(module, 'setup'): # module.setup(bot)