mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 20:30:58 -05:00
Fix variables being missing during the Redis attack.
This commit is contained in:
parent
fff9e67769
commit
d434507b9b
@ -20,6 +20,9 @@ export default async(client:TClient)=>{
|
|||||||
DiscordChannelID = channel.dataValues.dcchannel;
|
DiscordChannelID = channel.dataValues.dcchannel;
|
||||||
DiscordRoleID = channel.dataValues.dcrole;
|
DiscordRoleID = channel.dataValues.dcrole;
|
||||||
|
|
||||||
|
if (!YTChannelID) return;
|
||||||
|
if (!DiscordChannelID ?? !DiscordRoleID) throw new Error('[YTModule] Discord channel/role ID is missing.');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await Undici.request(`https://youtube.googleapis.com/youtube/v3/activities?part=snippet&channelId=${YTChannelID}&maxResults=2&key=${(await TSClient()).youtube}`, {
|
await Undici.request(`https://youtube.googleapis.com/youtube/v3/activities?part=snippet&channelId=${YTChannelID}&maxResults=2&key=${(await TSClient()).youtube}`, {
|
||||||
signal: AbortSignal.timeout(10000),
|
signal: AbortSignal.timeout(10000),
|
||||||
|
Loading…
Reference in New Issue
Block a user