fix(seautils): fixed timestamp
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 25s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 37s

This commit is contained in:
Seaswimmer 2024-05-28 17:46:14 -04:00
parent 8867cc627f
commit 93f358cfad
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -8,7 +8,6 @@
import asyncio
import inspect
import operator
from datetime import datetime
from functools import partial, partialmethod
from typing import Any
@ -106,13 +105,12 @@ class SeaUtils(commands.Cog):
data = yaml.safe_load(stdout.decode())
message_data = data[0]['message']
response_data = message_data['response_message_data']
timestamp = datetime.fromisoformat(message_data['response_time'].replace('Z', '+00:00'))
if ctx.embed_requested():
embed = Embed(
title="DNS Query Result",
description=f"Query for {response_data['QUESTION_SECTION'][0]}",
color=await ctx.embed_color(),
timestamp=timestamp
timestamp=message_data['response_time']
)
embed.add_field(name="Response Address", value=message_data['response_address'], inline=True)
embed.add_field(name="Response Port", value=message_data['response_port'], inline=True)