mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-25 18:25:03 +00:00
Use messageLink() function for message links everywhere
This commit is contained in:
parent
1778f95453
commit
b379bea9b8
6 changed files with 19 additions and 17 deletions
|
@ -1,6 +1,6 @@
|
|||
import { PluginData } from "knub";
|
||||
import { CasesPluginType } from "../types";
|
||||
import { disableLinkPreviews } from "../../../utils";
|
||||
import { disableLinkPreviews, messageLink } from "../../../utils";
|
||||
import { DBDateFormat, getDateFormat } from "../../../utils/dateFormats";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import moment from "moment-timezone";
|
||||
|
@ -37,7 +37,7 @@ export async function getCaseSummary(
|
|||
let caseTitle = `\`Case #${theCase.case_number}\``;
|
||||
if (withLinks && theCase.log_message_id) {
|
||||
const [channelId, messageId] = theCase.log_message_id.split("-");
|
||||
caseTitle = `[${caseTitle}](https://discord.com/channels/${pluginData.guild.id}/${channelId}/${messageId})`;
|
||||
caseTitle = `[${caseTitle}](${messageLink(pluginData.guild.id, channelId, messageId)})`;
|
||||
} else {
|
||||
caseTitle = `\`${caseTitle}\``;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue