From 64e0b2c0496010f917dfbb9dca8b6150e5dcf79c Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Tue, 26 Sep 2023 20:03:27 +1000 Subject: [PATCH] Look at previous commit message for more info. --- src/funcs/YTModule.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/funcs/YTModule.ts b/src/funcs/YTModule.ts index 133016e..022d48e 100644 --- a/src/funcs/YTModule.ts +++ b/src/funcs/YTModule.ts @@ -1,6 +1,7 @@ import {TextChannel} from 'discord.js'; import TClient from '../client.js'; import LogPrefix from '../helpers/LogPrefix.js'; +import MessageTool from '../helpers/MessageTool.js'; export default async(client: TClient, YTChannelID: string, YTChannelName: string, DiscordChannelID: string, DiscordRoleID: string)=>{ let Data: any; @@ -14,6 +15,6 @@ export default async(client: TClient, YTChannelID: string, YTChannelName: string if (!client.YTCache[YTChannelID]) return client.YTCache[YTChannelID] = Data.feed.entry[0]['yt:videoId']._text; if (Data.feed.entry[1]['yt:videoId']._text === client.YTCache[YTChannelID]){ client.YTCache[YTChannelID] = Data.feed.entry[0]['yt:videoId']._text; - (client.channels.resolve(DiscordChannelID) as TextChannel).send({content: `<@&${DiscordRoleID}>\n**${YTChannelName}** just uploaded a video!\n${Data.feed.entry[0].link._attributes.href}`, allowedMentions: {parse: ['roles']}}) + (client.channels.resolve(DiscordChannelID) as TextChannel).send({content: `${MessageTool.formatMention(DiscordRoleID, 'role')}\n**${YTChannelName}** just uploaded a video!\n${Data.feed.entry[0].link._attributes.href}`, allowedMentions: {parse: ['roles']}}) } }