From 8176a841f7b013c9d9b9e367640e46bdb288e28e Mon Sep 17 00:00:00 2001 From: augustin64 Date: Tue, 9 Apr 2024 19:36:55 +0200 Subject: [PATCH] Add IP command --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index cc8d454..ad0f005 100755 --- a/main.py +++ b/main.py @@ -222,4 +222,10 @@ async def uptime(ctx): await ctx.reply(embed=embed) +@bot.command(name="ip") +@root_required +async def get_ip(ctx): + r = requests.get("https://ifconfig.me") + await ctx.reply("Current IP: `"+ r.content.decode("utf-8")+"`") + bot.run(config.TOKEN)