Fix base64 avatar stuff for webhooks

This commit is contained in:
Rory&
2025-12-01 21:08:03 +01:00
parent 4568165b82
commit 65f5ef0392
+1 -1
View File
@@ -205,7 +205,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
}
if (opts.avatar_url) {
const avatarData = await fetch(opts.avatar_url);
const base64 = await avatarData.text().then((x) => btoa(x));
const base64 = await avatarData.arrayBuffer().then((x) => Buffer.from(x).toString("base64"));
const dataUri = "data:" + avatarData.headers.get("content-type") + ";base64," + base64;