Add reboot command

This commit is contained in:
augustin64 2024-04-09 20:59:50 +02:00
parent 8176a841f7
commit e8494d713f

View File

@ -228,4 +228,11 @@ async def get_ip(ctx):
r = requests.get("https://ifconfig.me") r = requests.get("https://ifconfig.me")
await ctx.reply("Current IP: `"+ r.content.decode("utf-8")+"`") 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) bot.run(config.TOKEN)