fix(seautils): fixed timestamp
This commit is contained in:
parent
8867cc627f
commit
93f358cfad
1 changed files with 1 additions and 3 deletions
|
@ -8,7 +8,6 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import inspect
|
import inspect
|
||||||
import operator
|
import operator
|
||||||
from datetime import datetime
|
|
||||||
from functools import partial, partialmethod
|
from functools import partial, partialmethod
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
@ -106,13 +105,12 @@ class SeaUtils(commands.Cog):
|
||||||
data = yaml.safe_load(stdout.decode())
|
data = yaml.safe_load(stdout.decode())
|
||||||
message_data = data[0]['message']
|
message_data = data[0]['message']
|
||||||
response_data = message_data['response_message_data']
|
response_data = message_data['response_message_data']
|
||||||
timestamp = datetime.fromisoformat(message_data['response_time'].replace('Z', '+00:00'))
|
|
||||||
if ctx.embed_requested():
|
if ctx.embed_requested():
|
||||||
embed = Embed(
|
embed = Embed(
|
||||||
title="DNS Query Result",
|
title="DNS Query Result",
|
||||||
description=f"Query for {response_data['QUESTION_SECTION'][0]}",
|
description=f"Query for {response_data['QUESTION_SECTION'][0]}",
|
||||||
color=await ctx.embed_color(),
|
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 Address", value=message_data['response_address'], inline=True)
|
||||||
embed.add_field(name="Response Port", value=message_data['response_port'], inline=True)
|
embed.add_field(name="Response Port", value=message_data['response_port'], inline=True)
|
||||||
|
|
Loading…
Reference in a new issue