From ec08c4fa808e3d825e636990fd73b6ea4e4e75bf Mon Sep 17 00:00:00 2001 From: Supositware Date: Wed, 12 Jun 2024 00:51:24 +0200 Subject: [PATCH] fix when not in guild --- utils/videos.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/videos.js b/utils/videos.js index d6eacf2..89b9045 100644 --- a/utils/videos.js +++ b/utils/videos.js @@ -112,6 +112,10 @@ async function getVideoSize(urlArg, format = `bestvideo[height<=?${ytdlpMaxResol async function getMaxFileSize(guild) { return await new Promise((resolve) => { + if (!guild) { + resolve(25); + } + const tier = guild.premiumTier; switch (tier) { case 0: