1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -05:00

Fix variables being missing during the Redis attack.

This commit is contained in:
toast-ts 2024-01-06 17:28:26 +11:00
parent ac420faa74
commit 5f29723247

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),