Skip to content

Commit

Permalink
using an invisible character instead of ||attachment|| now
Browse files Browse the repository at this point in the history
  • Loading branch information
Deutscher775 committed Sep 4, 2024
1 parent 8a3b78a commit 3efde0c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/astroidapi/sending_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ async def send_to_discord(cls, updated_json, endpoint, attachments: list = None)
webhook_obj = nextcord.Webhook.from_url(webhook, session=session)
message_content = updated_json["meta"]["message"]["content"]
if message_content is None or message_content == "" or message_content == " ":
message_content = "||attachment||"
if updated_json["meta"]["message"]["attachments"] is not None:
if updated_json["meta"]["message"]["attachments"] is not None:
message_content = "‎ "
await webhook_obj.send(content=message_content, avatar_url=updated_json["meta"]["message"]["author"]["avatar"], username=formatter.Format.format_username(updated_json["meta"]["message"]["author"]["name"]), files=nextcord_files)
await session.close()
for file in nextcord_files:
Expand Down Expand Up @@ -164,7 +166,8 @@ async def send_to_guilded(cls, updated_json, endpoint, attachments: list = None)
try:
message_content = updated_json["meta"]["message"]["content"]
if message_content is None or message_content == "" or message_content == " ":
message_content = "||attachment||"
if updated_json["meta"]["message"]["attachments"] is not None:
message_content = "‎ "
await webhook_obj.send(content=message_content, avatar_url=updated_json["meta"]["message"]["author"]["avatar"], username=formatter.Format.format_username(updated_json["meta"]["message"]["author"]["name"]), files=guilded_files)
except AttributeError:
pass
Expand Down

0 comments on commit 3efde0c

Please sign in to comment.