Skip to content

Commit

Permalink
fixed attachment inserting error
Browse files Browse the repository at this point in the history
  • Loading branch information
Deutscher775 committed Dec 16, 2024
1 parent 7d63c13 commit ed24c87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/astroidapi/endpoint_update_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,7 @@ async def update_endpoint(
if "," in message_attachments:
for val in message_attachments.split(","):
if val.lower() not in [x.lower() for x in endpoint_data["meta"]["message"]["attachments"]]:
if sender == "discord":
endpoint_data["meta"]["message"]["attachments"].append(f"![]({val})")
else:
endpoint_data["meta"]["message"]["attachments"].append(val)
endpoint_data["meta"]["message"]["attachments"].append(val.lower())
else:
endpoint_data["meta"]["message"]["attachments"] = [message_attachments]

Expand Down
2 changes: 1 addition & 1 deletion src/astroidapi/get_channel_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def from_guilded_id(cls, channel_id: str):
try:
async with aiohttp.ClientSession() as session:
headers = {
"Authorization": f"Bearer {config.GUILDED_TOKEN}"
"Authorization": f"Bearer {config.BETA_GUILDED_TOKEN}"
}
async with session.get(f"https://www.guilded.gg/api/v1/channels/{channel_id}", headers=headers) as resp:
print(await resp.text())
Expand Down

0 comments on commit ed24c87

Please sign in to comment.