From dfb0c794ba109fe15e76aab7cc3ac87a3fdb967a Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 23 Mar 2022 22:48:43 +0200 Subject: [PATCH] complete url --- structure/commands/MessageIds.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/structure/commands/MessageIds.js b/structure/commands/MessageIds.js index 8d0ff62..d1f63e2 100644 --- a/structure/commands/MessageIds.js +++ b/structure/commands/MessageIds.js @@ -26,16 +26,17 @@ class MessageIds extends Command { const history = await this.client.cache.loadModmailHistory(userId); const sorted = history.sort((a, b) => b.timestamp - a.timestamp); const idContentPairs = []; + const urlBase = `https://discord.com/channels/@me`; for (const mm of sorted) { if (!mm.msgid && !mm.isReply) break; // Old modmails from before msg id logging -- could probably supplement with fetching messages but cba rn - idContentPairs.push(`${dmChannel.id}/${mm.msgid} - ${mm.content}`); + idContentPairs.push(`${urlBase}/${dmChannel.id}/${mm.msgid} - ${mm.content}`); } if (!idContentPairs.length) { const msgs = await dmChannel.messages.fetch(); const sortedMsgs = msgs.filter(msg => msg.author.id !== this.client.user.id).sort((a, b) => b.createdTimestamp - a.createdTimestamp); - for (const msg of sortedMsgs.values()) idContentPairs.push(`${dmChannel.id}/${msg.id} - ${msg.content}`); + for (const msg of sortedMsgs.values()) idContentPairs.push(`${urlBase}/${dmChannel.id}/${msg.id} - ${msg.content}`); } await message.channel.send({