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:
parent
ac420faa74
commit
5f29723247
@ -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