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
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
return