bot: Cleanup logging
All checks were successful
Build Docker / Build Docker (push) Successful in 16s

This commit is contained in:
Nathan Woodburn 2023-09-27 18:35:27 +10:00
parent f611aa929c
commit 7a75c020dc
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

6
bot.py
View File

@ -45,7 +45,6 @@ async def shortlink(ctx, link: str, name: str = None):
if (name == None):
data = {'target' : link}
x = requests.post(url, data = data, headers = headers)
print(x.text)
if (x.status_code != 200 and x.status_code != 201):
await ctx.response.send_message("ERROR: " + x.text,ephemeral=True)
link=x.json()['link']
@ -76,10 +75,8 @@ async def dig(ctx, domain: str, record_type: str = "A"):
try:
# Query the DNS record
response = resolver.resolve(domain, record_type)
print(response)
records = ""
for record in response:
print(record)
records = records + "\n" + str(record)
# Send the result to the Discord channel
@ -172,8 +169,7 @@ async def ssl(ctx, domain: str):
s_client_process = subprocess.Popen(s_client_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
s_client_output, _ = s_client_process.communicate(input=b"\n")
print(s_client_output.decode("utf-8"), flush=True)
certificates = []
current_cert = ""
for line in s_client_output.split(b"\n"):