Skip to content

Commit

Permalink
Add debug in asset pull
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Nov 28, 2023
1 parent 1a7ac52 commit 1940a27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/discord/utils/getAsset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ export default async function getAsset(
// It will use that information and check the path to see if the imageName exists at that location
// If it does not exist, it will download it from the internet and save it to that location
// Either way, it will return a working path to the image

if (!assetDef[assetName]) {
// Handle the error or return a default value
throw new Error(`Asset not found: ${assetName}`);
}
const { path, url } = assetDef[assetName];
// log.debug(F, `Checking ${path}`);
if (!fs.existsSync(path)) {
Expand Down

0 comments on commit 1940a27

Please sign in to comment.