From 12ca47c4065204c51261f55e41b1aef050deea7c Mon Sep 17 00:00:00 2001 From: Benedikt Magnus <magnus@magnuscraft.de> Date: Sun, 7 Nov 2021 17:42:37 +0100 Subject: [PATCH] Fixed Discord attachements. --- .../endpoint/implementations/discord/discordUtils.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/wichtelbot/endpoint/implementations/discord/discordUtils.ts b/scripts/wichtelbot/endpoint/implementations/discord/discordUtils.ts index 7f7a003..847a742 100644 --- a/scripts/wichtelbot/endpoint/implementations/discord/discordUtils.ts +++ b/scripts/wichtelbot/endpoint/implementations/discord/discordUtils.ts @@ -34,8 +34,11 @@ export abstract class DiscordUtils if (typeof additions === 'string') { - const attachment = new Discord.MessageAttachment(additions); - messageOptions.attachments = [attachment]; + messageOptions.files = [ + { + attachment: additions, + }, + ]; } else if (this.isComponents(additions)) { -- GitLab