Skip to content

Commit

Permalink
fix: buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Naomi Carrigan committed Nov 13, 2023
1 parent 167da6f commit d99061d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/handlers/handleMessageCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const handleMessageCreate = async (Bot: Camperbot, message: Message) => {
.map((r) => `${r.userTag},${r.points}`);
await message.reply(`Found ${above1000.length} qualifying records.`);
const fileContents = `usertag,points\n${above1000.join("\n")}`;
const file = new AttachmentBuilder(fileContents, {
const file = new AttachmentBuilder(Buffer.from(fileContents, "utf-8"), {
name: "contributors.csv",
});
await message.reply({
Expand Down

0 comments on commit d99061d

Please sign in to comment.