added some usefull commands tha cli api seems to be pretty solid i dont know about registering cli commands at runtime havent tested yet or from another cog...
#Api used mainly for plugins so getting uptime, loading, unloading, reloading plugins, getting status of plugins, get plugin info, stopping the bot, getting bot name and tag, getting cpm/commands per minute, get if there is web plugin, if there is web plugin register api, get if plugin supports web and so on..
#Api used mainly for plugins so getting uptime, loading, unloading, reloading plugins, getting status of plugins, get plugin info, stopping the bot, getting bot name and tag, getting cpm/commands per minute, get if there is web plugin, if there is web plugin register api, get if plugin supports web and so on..
@ -127,22 +136,7 @@ class CLI:
self.api.logger("wrn",f"Command {command} could not be removed as it doesnt exist.")
self.api.logger("wrn",f"Command {command} could not be removed as it doesnt exist.")
print(f"The uptime of the bot is {uptime} HH:MM:SS.")
cli.register_command("uptime",cli_uptime,"Shows the uptime of the bot in seconds.")
#info
defcli_info(self):
print(f"You are running version 0.0.0 - Pre Release. Created by supopur under the GNUv3 license. Git repo: https://git.nazev.eu:8443/ Our discord link: https://discord.gg/dVVVSM4z")
cli.register_command("info",cli_info,"Shows the info about the bot.")
#shutdown
defcli_sd(self):
print("Shutting down the bot. You still must do CTRL+C to exit this terminal!!")
try:
sys.exit("Terminated from the cli..")
except:pass
cli.register_command("stop",cli_sd,"Terminates the bot.")
defcli_clear(self):
os.system('cls'ifos.name=='nt'else'clear')
cli.register_command("clear",cli_clear,"Clears the terminal output")