From e8494d713f0f6ca3f8d16f8c6a3ac3c744dd4f04 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Tue, 9 Apr 2024 20:59:50 +0200 Subject: [PATCH] Add reboot command --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index ad0f005..425a523 100755 --- a/main.py +++ b/main.py @@ -228,4 +228,11 @@ async def get_ip(ctx): r = requests.get("https://ifconfig.me") await ctx.reply("Current IP: `"+ r.content.decode("utf-8")+"`") + +@bot.command(name="reboot") +@root_required +async def reboot(ctx): + await ctx.message.add_reaction("🆗") + os.system("reboot") + bot.run(config.TOKEN)