Skip to content

Commit ed24c87

Browse files
committed
fixed attachment inserting error
1 parent 7d63c13 commit ed24c87

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/astroidapi/endpoint_update_handler.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,7 @@ async def update_endpoint(
221221
if "," in message_attachments:
222222
for val in message_attachments.split(","):
223223
if val.lower() not in [x.lower() for x in endpoint_data["meta"]["message"]["attachments"]]:
224-
if sender == "discord":
225-
endpoint_data["meta"]["message"]["attachments"].append(f"![]({val})")
226-
else:
227-
endpoint_data["meta"]["message"]["attachments"].append(val)
224+
endpoint_data["meta"]["message"]["attachments"].append(val.lower())
228225
else:
229226
endpoint_data["meta"]["message"]["attachments"] = [message_attachments]
230227

src/astroidapi/get_channel_information.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def from_guilded_id(cls, channel_id: str):
4545
try:
4646
async with aiohttp.ClientSession() as session:
4747
headers = {
48-
"Authorization": f"Bearer {config.GUILDED_TOKEN}"
48+
"Authorization": f"Bearer {config.BETA_GUILDED_TOKEN}"
4949
}
5050
async with session.get(f"https://www.guilded.gg/api/v1/channels/{channel_id}", headers=headers) as resp:
5151
print(await resp.text())

0 commit comments

Comments
 (0)