You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
572 B
Python

from os import listdir
from core.main import *
from utils.logging.log import *
import commands
def loadSingle(command, func):
if command+".py" in listdir("commands"):
try:
if command in CommandMap.keys():
return "Cannot reload modules"
else:
className = command.capitalize()
__import__("commands.%s" % command)
eval("commands.%s.%s(func)" % (command, className))
return True
except Exception as err:
return err