Use messageLink() function for message links everywhere

This commit is contained in:
Dragory 2020-08-10 03:26:39 +03:00
parent 1778f95453
commit b379bea9b8
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
6 changed files with 19 additions and 17 deletions

View file

@ -1,6 +1,6 @@
import { commandTypeHelpers as ct } from "../../../commandTypes";
import moment from "moment-timezone";
import { convertDelayStringToMS } from "src/utils";
import { convertDelayStringToMS, messageLink } from "src/utils";
import humanizeDuration from "humanize-duration";
import { sendErrorMessage, sendSuccessMessage } from "src/pluginUtils";
import { remindersCommand } from "../types";
@ -48,8 +48,7 @@ export const RemindCmd = remindersCommand({
return;
}
const reminderBody =
args.reminder || `https://discord.com/channels/${pluginData.guild.id}/${msg.channel.id}/${msg.id}`;
const reminderBody = args.reminder || messageLink(pluginData.guild.id, msg.channel.id, msg.id);
await pluginData.state.reminders.add(
msg.author.id,
msg.channel.id,