diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/commands/Fun.py b/dist/ba_root/mods/chatHandle/ChatCommands/commands/Fun.py index 622b50c..38e0012 100644 --- a/dist/ba_root/mods/chatHandle/ChatCommands/commands/Fun.py +++ b/dist/ba_root/mods/chatHandle/ChatCommands/commands/Fun.py @@ -1,6 +1,7 @@ from .Handlers import handlemsg, handlemsg_all import ba, _ba from tools import corelib +from .. import floater Commands = ['fly', 'invisible', 'headless', 'creepy', 'celebrate', 'speed', 'floater'] CommandAliases = ['inv', 'hl', 'creep', 'celeb', 'flo'] @@ -44,15 +45,19 @@ def ExcelCommand(command, arguments, clientid, accountid): floater(arguments,clientid) -def floater(arguments,clientid): - try: - from .. import floater - if arguments ==[]: - floater.assignFloInputs(clientid) - else: - floater.assignFloInputs(arguments[0]) - except: - pass +def floater(arguments, client_id): + try: + if not arguments: + from ..floater import assign_flo_inputs # Import the function from floater module + assign_flo_inputs(client_id) # Call the function directly + else: + from ..floater import assign_flo_inputs # Import the function from floater module + assign_flo_inputs(arguments[0]) # Call the function directly + except ImportError as e: + print(f"ImportError: {e}") + except Exception as e: + print(f"An error occurred: {e}") + def speed(arguments): if arguments ==[] or arguments==['']: @@ -215,4 +220,4 @@ def celeb(arguments): player = int(arguments[0]) handlemsg(player, ba.CelebrateMessage()) except: - return \ No newline at end of file + return