Update Fun.py

This commit is contained in:
Sarasayed0118 2024-04-07 05:24:44 +05:30 committed by GitHub
parent c627af00b1
commit c4679c5fe2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
from .Handlers import handlemsg, handlemsg_all from .Handlers import handlemsg, handlemsg_all
import ba, _ba import ba, _ba
from tools import corelib from tools import corelib
from .. import floater
Commands = ['fly', 'invisible', 'headless', 'creepy', 'celebrate', 'speed', 'floater'] Commands = ['fly', 'invisible', 'headless', 'creepy', 'celebrate', 'speed', 'floater']
CommandAliases = ['inv', 'hl', 'creep', 'celeb', 'flo'] CommandAliases = ['inv', 'hl', 'creep', 'celeb', 'flo']
@ -44,15 +45,19 @@ def ExcelCommand(command, arguments, clientid, accountid):
floater(arguments,clientid) floater(arguments,clientid)
def floater(arguments,clientid): def floater(arguments, client_id):
try: try:
from .. import floater if not arguments:
if arguments ==[]: from ..floater import assign_flo_inputs # Import the function from floater module
floater.assignFloInputs(clientid) assign_flo_inputs(client_id) # Call the function directly
else: else:
floater.assignFloInputs(arguments[0]) from ..floater import assign_flo_inputs # Import the function from floater module
except: assign_flo_inputs(arguments[0]) # Call the function directly
pass except ImportError as e:
print(f"ImportError: {e}")
except Exception as e:
print(f"An error occurred: {e}")
def speed(arguments): def speed(arguments):
if arguments ==[] or arguments==['']: if arguments ==[] or arguments==['']:
@ -215,4 +220,4 @@ def celeb(arguments):
player = int(arguments[0]) player = int(arguments[0])
handlemsg(player, ba.CelebrateMessage()) handlemsg(player, ba.CelebrateMessage())
except: except:
return return