From fb3fadd5da3e38c5964620b7d400b47406e4d9bc Mon Sep 17 00:00:00 2001 From: pilot1782 Date: Wed, 11 May 2022 14:22:57 -0600 Subject: [PATCH 1/2] added help command --- dis-bot.pyw | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dis-bot.pyw b/dis-bot.pyw index 78e12f1..2cb77b7 100644 --- a/dis-bot.pyw +++ b/dis-bot.pyw @@ -187,6 +187,24 @@ async def status(ctx: interactions.CommandContext, ip: str): await ctx.send("Scanning finished.\n{1} out of {0} are up.\nThe following Errors occured:\n{2}".format(len(data), u, er)) print("Scanning finished.\n{1} out of {0} are up.\nThe following Errors occured:\n{2}".format(len(data), u, er)) +#Help command +@bot.command( + name="help", + description="Show the help message", +) +async def help(ctx: interactions.CommandContext): + await ctx.send(""" +################################################################################ +/server scan +scans the ip range and returns the status of the servers + +/server status +returns the status of the server + +/server help +shows this message +################################################################################ +""") #Startup def startup(): From 6b4bd75cc99e282783badf55e64526c4f2acd693 Mon Sep 17 00:00:00 2001 From: pilot1782 Date: Thu, 12 May 2022 12:16:18 -0600 Subject: [PATCH 2/2] Added scan back cus I forgot to add it --- dis-bot.pyw | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dis-bot.pyw b/dis-bot.pyw index 2cb77b7..661bdba 100644 --- a/dis-bot.pyw +++ b/dis-bot.pyw @@ -106,6 +106,9 @@ async def server_scan(ctx: interactions.CommandContext, ip_lower_bound: str, ip_ await ctx.send("Invalid IP") exit() + for line in scan(lower_ip_bound, upper_ip_bound): + await ctx.send(line) + @bot.command(