new commands update for the bot

This commit is contained in:
VinceC
2024-11-07 17:28:00 -06:00
parent 7b431e0406
commit 2b577c5be1
9 changed files with 865 additions and 324 deletions

12
src/utils/helpers.js Normal file
View File

@@ -0,0 +1,12 @@
// src/utils/helpers.js
function safeGet(obj, path, defaultValue = null) {
try {
return path.split('.').reduce((acc, part) => acc && acc[part], obj) ?? defaultValue;
} catch (e) {
return defaultValue;
}
}
module.exports = {
safeGet
};