diff --git a/src/bot.ts b/src/bot.ts index 545d563102f1948b83bda4cc1ac63c35a7b8a3cc..64674d076ea003f56caee5df5688daf36ef540c5 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -579,14 +579,13 @@ export class DiscordBot { info.h = attachment.height; } rooms.forEach((room) => { - const prom = intent.sendMessage(room, { + intent.sendMessage(room, { body: attachment.filename, info, msgtype, url: content.mxcUrl, external_url: attachment.url, - }); - prom.then((res) => { + }).then((res) => { const evt = new DbEvent(); evt.MatrixId = res.event_id + ";" + room; evt.DiscordId = msg.id;