1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 16:30:58 -05:00

Fix variables being missing during the Redis attack.

This commit is contained in:
AnxietyisReal 2024-01-06 17:28:26 +11:00
parent fff9e67769
commit d434507b9b

View File

@ -20,6 +20,9 @@ export default async(client:TClient)=>{
DiscordChannelID = channel.dataValues.dcchannel;
DiscordRoleID = channel.dataValues.dcrole;
if (!YTChannelID) return;
if (!DiscordChannelID ?? !DiscordRoleID) throw new Error('[YTModule] Discord channel/role ID is missing.');
try {
await Undici.request(`https://youtube.googleapis.com/youtube/v3/activities?part=snippet&channelId=${YTChannelID}&maxResults=2&key=${(await TSClient()).youtube}`, {
signal: AbortSignal.timeout(10000),