Skip to content

Commit

Permalink
Fix timestamp not parsing properly
Browse files Browse the repository at this point in the history
  • Loading branch information
minisbett authored Jan 30, 2024
1 parent 32bf5af commit 8774e13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/discord.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Functionality related to Discord interactivity."""
from __future__ import annotations

import orjson

from typing import Any

from tenacity import retry
Expand Down Expand Up @@ -168,7 +170,7 @@ def json(self) -> Any:

payload["embeds"].append(embed_payload)

return payload
return orjson.dumps(payload, default=str).decode()

@retry(
stop=stop_after_attempt(10),
Expand All @@ -181,7 +183,7 @@ async def post(self) -> None:
headers = {"Content-Type": "application/json"}
response = await services.http_client.post(
self.url,
json=self.json,
content=self.json,
headers=headers,
)
response.raise_for_status()

0 comments on commit 8774e13

Please sign in to comment.