Praxis_Bot/Command_Management_Module.py
Alex Orid 0d6e26a2a5 Revert "logging"
This reverts commit b106eaa9dd.
2021-04-27 18:55:23 -04:00

46 lines
1.3 KiB
Python

from main import user_module_init
import config as config
import db
import user_module
import commands.loader as command_loader
from commands.command_base import AbstractCommand
import credentials
class Command_Management_Module():
def __init__(self):
super().__init__()
self.dbCredential: credentials.DB_Credential
def main_test(self):
print("[TEST Module]> test")
tempModule = user_module.User_Module()
#tempModule.commands = command_loader.load_commands_new(AbstractCommand.CommandType.Praxis)
print(self.getCommandsList(tempModule.commands))
def getCommandsList(self, targetModuleCommands):
print(type(targetModuleCommands))
commandsList = "\n"
for cmd in targetModuleCommands:
targetCommand = targetModuleCommands[cmd]
print(targetCommand.command)
print(targetCommand.isCommandEnabled)
return commandsList
def getUserPermission():
pass
if __name__ == "__main__":
testModule = Command_Management_Module()
credentials_manager = credentials.Credentials_Module()
credentials_manager.load_credentials()
testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname)
testModule.main_test()