kythia-core 26.0.9 → 26.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/Kythia.js +1 -1
  2. package/dist/cli/Command.js +1 -1
  3. package/dist/cli/commands/AboutCommand.js +1 -1
  4. package/dist/cli/commands/CacheClearCommand.js +1 -1
  5. package/dist/cli/commands/DIGenerateCommand.js +1 -1
  6. package/dist/cli/commands/DocsGenerateCommand.js +1 -1
  7. package/dist/cli/commands/LangCheckCommand.js +1 -1
  8. package/dist/cli/commands/LangSyncCommand.js +1 -1
  9. package/dist/cli/commands/LangTranslateCommand.js +1 -1
  10. package/dist/cli/commands/MakeMigrationCommand.js +1 -1
  11. package/dist/cli/commands/MakeModelCommand.js +1 -1
  12. package/dist/cli/commands/MakeSeederCommand.js +1 -1
  13. package/dist/cli/commands/MigrateCommand.js +1 -1
  14. package/dist/cli/commands/NamespaceCommand.js +1 -1
  15. package/dist/cli/commands/SeedCommand.js +1 -1
  16. package/dist/cli/commands/StructureCommand.js +1 -1
  17. package/dist/cli/commands/UpversionCommand.js +1 -1
  18. package/dist/cli/index.js +1 -1
  19. package/dist/cli/utils/db.js +1 -1
  20. package/dist/database/KythiaMigrator.js +1 -1
  21. package/dist/database/KythiaModel.d.ts.map +1 -1
  22. package/dist/database/KythiaModel.js +1 -1
  23. package/dist/database/KythiaModel.js.map +1 -1
  24. package/dist/database/KythiaSequelize.js +1 -1
  25. package/dist/database/KythiaStorage.js +1 -1
  26. package/dist/database/ModelLoader.js +1 -1
  27. package/dist/database/Seeder.js +1 -1
  28. package/dist/database/SeederManager.js +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/managers/AddonManager.d.ts +1 -0
  31. package/dist/managers/AddonManager.d.ts.map +1 -1
  32. package/dist/managers/AddonManager.js +1 -1
  33. package/dist/managers/AddonManager.js.map +1 -1
  34. package/dist/managers/EventManager.js +1 -1
  35. package/dist/managers/InteractionManager.js +1 -1
  36. package/dist/managers/KythiaEngine.js +1 -1
  37. package/dist/managers/MetricsManager.js +1 -1
  38. package/dist/managers/MiddlewareManager.js +1 -1
  39. package/dist/managers/QueueManager.js +1 -1
  40. package/dist/managers/ShardingManager.js +1 -1
  41. package/dist/managers/ShutdownManager.js +1 -1
  42. package/dist/managers/TranslatorManager.d.ts.map +1 -1
  43. package/dist/managers/TranslatorManager.js +1 -1
  44. package/dist/managers/TranslatorManager.js.map +1 -1
  45. package/dist/middlewares/botPermissions.js +1 -1
  46. package/dist/middlewares/cooldown.js +1 -1
  47. package/dist/middlewares/isInMainGuild.js +1 -1
  48. package/dist/middlewares/ownerOnly.js +1 -1
  49. package/dist/middlewares/userPermissions.js +1 -1
  50. package/dist/structures/BaseCommand.d.ts +1 -1
  51. package/dist/structures/BaseCommand.d.ts.map +1 -1
  52. package/dist/structures/BaseCommand.js +1 -1
  53. package/dist/structures/BaseCommand.js.map +1 -1
  54. package/dist/types/ModuleLoaders.js +1 -1
  55. package/dist/types/Sequelize.d.ts +2 -1
  56. package/dist/types/Sequelize.d.ts.map +1 -1
  57. package/dist/types/index.js +1 -1
  58. package/dist/utils/DiscordWebhookTransport.js +1 -1
  59. package/dist/utils/InteractionFactory.js +1 -1
  60. package/dist/utils/color.js +1 -1
  61. package/dist/utils/discord.js +1 -1
  62. package/dist/utils/formatter.js +1 -1
  63. package/dist/utils/index.js +1 -1
  64. package/dist/utils/logger.js +1 -1
  65. package/package.json +1 -1
package/dist/Kythia.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0xb1e2d3,_0x3488d2,_0x1159fc,_0x4d429d){if(_0x4d429d===undefined)_0x4d429d=_0x1159fc;var _0xfe30f5=Object['getOwnPropertyDescriptor'](_0x3488d2,_0x1159fc);if(!_0xfe30f5||('get'in _0xfe30f5?!_0x3488d2['__esModule']:_0xfe30f5['writable']||_0xfe30f5['configurable'])){_0xfe30f5={'enumerable':!![],'get':function(){return _0x3488d2[_0x1159fc];}};}Object['defineProperty'](_0xb1e2d3,_0x4d429d,_0xfe30f5);}:function(_0x355076,_0x2c3900,_0x3d685f,_0x2c983e){if(_0x2c983e===undefined)_0x2c983e=_0x3d685f;_0x355076[_0x2c983e]=_0x2c3900[_0x3d685f];});var __setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x2a7a0b,_0x5ce99e){Object['defineProperty'](_0x2a7a0b,'default',{'enumerable':!![],'value':_0x5ce99e});}:function(_0x2f7672,_0x38b872){_0x2f7672['default']=_0x38b872;});var __importStar=this&&this['__importStar']||(function(){var _0x4b60d9=function(_0x17ceb3){_0x4b60d9=Object['getOwnPropertyNames']||function(_0x167a62){var _0x109279=[];for(var _0x451ed8 in _0x167a62)if(Object['prototype']['hasOwnProperty']['call'](_0x167a62,_0x451ed8))_0x109279[_0x109279['length']]=_0x451ed8;return _0x109279;};return _0x4b60d9(_0x17ceb3);};return function(_0x30f108){if(_0x30f108&&_0x30f108['__esModule'])return _0x30f108;var _0x537011={};if(_0x30f108!=null)for(var _0x31e3df=_0x4b60d9(_0x30f108),_0xbae3b=-0x1033*-0x2+0x9f*0x11+-0x2af5;_0xbae3b<_0x31e3df['length'];_0xbae3b++)if(_0x31e3df[_0xbae3b]!=='default')__createBinding(_0x537011,_0x30f108,_0x31e3df[_0xbae3b]);__setModuleDefault(_0x537011,_0x30f108);return _0x537011;};}());var __importDefault=this&&this['__importDefault']||function(_0x34540f){return _0x34540f&&_0x34540f['__esModule']?_0x34540f:{'default':_0x34540f};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const discord_js_1=require('discord.js');const Sentry=__importStar(require('@sentry/node'));const node_path_1=__importDefault(require('node:path'));const node_fs_1=__importDefault(require('node:fs'));const figlet_1=__importDefault(require('figlet'));const cli_color_1=__importDefault(require('cli-color'));const AddonManager_1=__importDefault(require('./managers/AddonManager'));const InteractionManager_1=require('./managers/InteractionManager');const ShutdownManager_1=require('./managers/ShutdownManager');const EventManager_1=__importDefault(require('./managers/EventManager'));const MiddlewareManager_1=__importDefault(require('./managers/MiddlewareManager'));const TranslatorManager_1=__importDefault(require('./managers/TranslatorManager'));const QueueManager_1=require('./managers/QueueManager');const KythiaMigrator_1=__importDefault(require('./database/KythiaMigrator'));const ModelLoader_1=__importDefault(require('./database/ModelLoader'));const KythiaModel_1=__importDefault(require('./database/KythiaModel'));const logger_1=__importDefault(require('./utils/logger'));const discord_1=__importDefault(require('./utils/discord'));const DiscordWebhookTransport_1=require('./utils/DiscordWebhookTransport');const package_json_1=require('../package.json');const KythiaEngine_1=require('./managers/KythiaEngine');const MetricsManager_1=require('./managers/MetricsManager');const node_os_1=__importDefault(require('node:os'));const node_crypto_1=__importDefault(require('node:crypto'));const node_https_1=__importDefault(require('node:https'));class Kythia{['kythiaConfig'];['appRoot'];['client'];['rest'];['models'];['helpers'];['utils'];['redis'];['sequelize'];['logger'];['container'];['dbReadyHooks'];['clientReadyHooks'];['_webhookTransport']=null;['addonManager'];['interactionManager'];['eventManager'];['shutdownManager'];['translator'];['engine'];['metricsManager'];['queueManager'];constructor({client:_0x265db1,config:_0x2d361e,logger:_0x3119d6,redis:_0x44c79f,sequelize:_0x13b8dc,models:models={},helpers:helpers={},utils:utils={},appRoot:_0x22a9e3,botVersion:_0x1d83c3,bootSalt:_0x2ee687}){const _0x18a968=[];if(!_0x2d361e)_0x18a968['push']('config');if(!_0x265db1)_0x18a968['push']('client');if(_0x18a968['length']>0x2394+-0x478*0x8+-0x4*-0xb){console['error']('FATAL:\x20Missing\x20required\x20dependencies:\x20'+_0x18a968['join'](',\x20')+'.');process['exit'](-0x7e1+0x24cd+-0x1ceb);}this['kythiaConfig']=_0x2d361e;this['appRoot']=_0x22a9e3||process['cwd']();this['client']=_0x265db1;this['client']['commands']=new discord_js_1['Collection']();this['rest']=new discord_js_1['REST']({'version':'10'})['setToken'](this['kythiaConfig']['bot']['token']);this['models']=models;const _0x40f092=(-0x15*-0x12b+0x114a+-0x1*0x29d1,discord_1['default'])({'kythiaConfig':this['kythiaConfig']});const _0x48e12f=helpers||{};const _0x27e84c=_0x48e12f['discord']||{};this['helpers']={..._0x48e12f,'discord':{..._0x40f092,..._0x27e84c}};this['utils']=utils;this['redis']=_0x44c79f;this['sequelize']=_0x13b8dc;this['logger']=_0x3119d6||logger_1['default'];this['engine']=new KythiaEngine_1['KythiaEngine']({'botClient':this['client'],'licenseKey':this['kythiaConfig']['licenseKey'],'botVersion':_0x1d83c3,'bootSalt':_0x2ee687,'logger':this['logger'],'version':package_json_1['version'],'config':this['kythiaConfig']});this['metricsManager']=new MetricsManager_1['MetricsManager']({'logger':this['logger']});this['container']={'client':this['client'],'sequelize':this['sequelize'],'logger':this['logger'],'redis':this['redis'],'kythiaConfig':{...this['kythiaConfig'],'bot':{...this['kythiaConfig']['bot'],'clientSecret':undefined}},'helpers':this['helpers'],'appRoot':this['appRoot'],'engine':this['engine'],'metrics':this['metricsManager'],'engineToken':null,'t':async(_0x4f1fd8,_0x1262ae)=>_0x1262ae,'models':this['models']};this['translator']=new TranslatorManager_1['default']({'container':this['container']});this['container']['translator']=this['translator'];this['client']['container']=this['container'];this['client']['cooldowns']=new discord_js_1['Collection']();this['dbReadyHooks']=[];this['clientReadyHooks']=[];}['_checkRequiredConfig'](){const _0x1067da=[['bot','token'],['bot','clientId'],['bot','clientSecret']];const _0xea5777=[];for(const _0x5e17c2 of _0x1067da){let _0x29ce00=this['kythiaConfig'];for(const _0xde83e of _0x5e17c2){_0x29ce00=_0x29ce00?.[_0xde83e];}if(_0x29ce00===undefined||_0x29ce00===null||_0x29ce00===''){_0xea5777['push'](_0x5e17c2['join']('.'));}}if(!this['kythiaConfig']['db']){this['kythiaConfig']['db']={};}let _0x27133a=this['kythiaConfig']['db']['driver'];if(!_0x27133a||_0x27133a===''){this['kythiaConfig']['db']['driver']='sqlite';_0x27133a='sqlite';this['logger']['info']('💡\x20DB\x20driver\x20not\x20specified.\x20Defaulting\x20to:\x20sqlite');}else{_0x27133a=_0x27133a['toLowerCase']();this['kythiaConfig']['db']['driver']=_0x27133a;}if(_0x27133a==='sqlite'){if(!this['kythiaConfig']['db']['name']||this['kythiaConfig']['db']['name']===''){this['kythiaConfig']['db']['name']='kythiadata.sqlite';}}const _0x2bbd77=[['db','driver'],['db','name']];if(_0x27133a!=='sqlite'){_0x2bbd77['push'](['db','host'],['db','port'],['db','user'],['db','pass']);}const _0x484cd2=[];for(const _0x2ae3da of _0x2bbd77){let _0x9db363=this['kythiaConfig'];for(const _0x39a233 of _0x2ae3da){_0x9db363=_0x9db363?.[_0x39a233];}if(_0x9db363===undefined||_0x9db363===null||_0x9db363===''){_0x484cd2['push'](_0x2ae3da['join']('.'));}}const _0x71ab92=_0xea5777['concat'](_0x484cd2);if(_0x71ab92['length']>0x1362+0x1861+-0x11*0x293){this['logger']['error']('❌\x20Required\x20configurations\x20are\x20not\x20set:');for(const _0xd736b8 of _0x71ab92){this['logger']['error']('\x20\x20\x20-\x20'+_0xd736b8);}process['exit'](-0x59*-0x7+0x1*-0x101c+0xdae);}const _0x1d55ec=this['kythiaConfig']['api']?.['webhookErrorLogs']??(this['kythiaConfig']['settings']?.['webhookErrorLogs']===!![]?process.env.WEBHOOK_ERROR_LOGS:undefined);if(_0x1d55ec){try{const _0x13c6c5=new URL(_0x1d55ec);if(_0x13c6c5['protocol']!=='https:'){this['logger']['warn']('⚠️\x20api.webhookErrorLogs\x20is\x20not\x20an\x20HTTPS\x20URL\x20—\x20webhook\x20delivery\x20will\x20likely\x20fail.');}}catch{this['logger']['error']('❌\x20api.webhookErrorLogs\x20is\x20not\x20a\x20valid\x20URL.\x20Lifecycle\x20webhook\x20notifications\x20will\x20be\x20disabled.');}}this['logger']['info']('✔️\x20\x20All\x20required\x20configurations\x20are\x20set');}['registerButtonHandler'](_0x4bab66,_0x4e246f){if(this['addonManager']){this['addonManager']['registerButtonHandler'](_0x4bab66,_0x4e246f);}}['registerModalHandler'](_0x1ecaf4,_0x1264d2){if(this['addonManager']){this['addonManager']['registerModalHandler'](_0x1ecaf4,_0x1264d2);}}['registerSelectMenuHandler'](_0x14f1d1,_0xf6f119){if(this['addonManager']){this['addonManager']['registerSelectMenuHandler'](_0x14f1d1,_0xf6f119);}}async['_deployCommands'](_0x5f0046){if(!_0x5f0046||_0x5f0046['length']===-0xd5c+-0x89*0x9+0x1*0x122d){this['logger']['info']('No\x20commands\x20to\x20deploy.');return;}if(this['container']['_degraded']||!this['engine']['isOptimal']()){if(Math['random']()<0x4e5+-0x98f+0x4aa+0.5){this['logger']['info']('⏭️\x20\x20Command\x20deployment\x20deferred\x20due\x20to\x20rate\x20limiting.');return;}}try{const {total:_0x1c8362,slash:_0x320293,user:_0x294ab4,message:_0x530527}=this['_getCommandCounts'](_0x5f0046);const _0x327650=this['kythiaConfig']['bot']['clientId'];const _0x95a9a9=this['kythiaConfig']['bot']['devGuildId'];const _0x3ba927=this['kythiaConfig']['bot']['mainGuildId'];if(this['kythiaConfig']['env']==='development'){if(!_0x95a9a9){this['logger']['warn']('⚠️\x20devGuildId\x20not\x20set\x20in\x20config.\x20Skipping\x20guild\x20command\x20deployment.');return;}this['logger']['info']('🟠\x20Deploying\x20to\x20GUILD\x20'+_0x95a9a9+'...');await this['rest']['put'](discord_js_1['Routes']['applicationGuildCommands'](_0x327650,_0x95a9a9),{'body':_0x5f0046});this['logger']['info']('✅\x20Guild\x20commands\x20deployed\x20instantly!');}else{const _0x4ce1d1=[];const _0x166ce0=[];for(const _0x5bd05f of _0x5f0046){const _0x46d157=_0x5bd05f['name'];const _0x53b808=this['client']['commands']['get'](_0x46d157);if(_0x53b808?.['mainGuildOnly']){_0x166ce0['push'](_0x5bd05f);}else{_0x4ce1d1['push'](_0x5bd05f);}}const _0x3e848a=_0x4ce1d1['some'](_0x17e8ea=>_0x17e8ea['type']===0xdb7+0x52a+-0x12dd);if(!_0x3e848a){try{const _0x3e8669=await this['rest']['get'](discord_js_1['Routes']['applicationCommands'](_0x327650));const _0x2486d5=_0x3e8669?.['find'](_0x46558f=>_0x46558f['type']===-0x11e7*0x1+-0x1*-0x1511+-0x326);if(_0x2486d5){if(!this['kythiaConfig']['bot']['hasActivityEntryPoint']){this['logger']['warn']('⚠️\x20An\x20Entry\x20Point\x20command\x20(type\x204)\x20was\x20detected\x20on\x20Discord,\x20but\x20'+'`bot.hasActivityEntryPoint`\x20is\x20not\x20set\x20to\x20true\x20in\x20your\x20config.\x20'+'Auto-injecting\x20it\x20to\x20prevent\x20deployment\x20errors.\x20Consider\x20updating\x20your\x20config.');}this['logger']['info']('🎯\x20Re-injecting\x20existing\x20Entry\x20Point\x20command:\x20\x22'+_0x2486d5['name']+'\x22');_0x4ce1d1['push'](_0x2486d5);}else if(this['kythiaConfig']['bot']['hasActivityEntryPoint']){this['logger']['info']('🆕\x20hasActivityEntryPoint\x20is\x20true\x20but\x20no\x20Entry\x20Point\x20found\x20on\x20Discord.\x20Creating\x20fallback.');_0x4ce1d1['push']({'name':this['kythiaConfig']['bot']['name']||'Kythia\x20Arcade','description':'Play\x20awesome\x20games\x20directly\x20in\x20Discord','type':0x4,'handler':0x2});}}catch(_0x4ac4dd){this['logger']['warn']('⚠️\x20Failed\x20to\x20fetch\x20existing\x20global\x20commands\x20for\x20Entry\x20Point\x20detection:\x20'+_0x4ac4dd);if(this['kythiaConfig']['bot']['hasActivityEntryPoint']){_0x4ce1d1['push']({'name':this['kythiaConfig']['bot']['name']||'Kythia\x20Arcade','description':'Play\x20awesome\x20games\x20directly\x20in\x20Discord','type':0x4,'handler':0x2});}}}this['logger']['info']('🟢\x20Deploying\x20'+_0x4ce1d1['length']+'\x20global\x20commands...');if(this['kythiaConfig']['bot']['commandPayload']){try{const _0x5ec31c=node_path_1['default']['join'](this['appRoot'],'logs');if(!node_fs_1['default']['existsSync'](_0x5ec31c)){node_fs_1['default']['mkdirSync'](_0x5ec31c,{'recursive':!![]});}node_fs_1['default']['writeFileSync'](node_path_1['default']['join'](_0x5ec31c,'command-payload.json'),JSON['stringify'](_0x4ce1d1,null,-0x2*-0x877+-0x1d15+0xc29));this['logger']['info']('💾\x20Saved\x20global\x20command\x20payload\x20to\x20logs/command-payload.json');}catch(_0x928ded){this['logger']['warn']('Failed\x20to\x20save\x20command\x20payload:\x20'+_0x928ded);}}await this['rest']['put'](discord_js_1['Routes']['applicationCommands'](_0x327650),{'body':_0x4ce1d1});this['logger']['info']('✅\x20Global\x20commands\x20deployed\x20successfully!');if(_0x3ba927&&_0x166ce0['length']>-0x1*-0x2527+0x5ea*0x2+0x1*-0x30fb){this['logger']['info']('🔒\x20Deploying\x20'+_0x166ce0['length']+'\x20MAIN\x20GUILD\x20commands\x20to:\x20'+_0x3ba927+'...');await this['rest']['put'](discord_js_1['Routes']['applicationGuildCommands'](_0x327650,_0x3ba927),{'body':_0x166ce0});this['logger']['info']('✅\x20Main\x20Guild\x20commands\x20deployed\x20successfully.');}if(_0x95a9a9&&_0x95a9a9!==_0x3ba927){this['logger']['info']('🧹\x20Clearing\x20lingering\x20commands\x20from\x20dev\x20guild:\x20'+_0x95a9a9+'...');try{await this['rest']['put'](discord_js_1['Routes']['applicationGuildCommands'](_0x327650,_0x95a9a9),{'body':[]});this['logger']['info']('✅\x20Dev\x20guild\x20commands\x20cleaned\x20up.');}catch(_0x2a9184){this['logger']['warn']('⚠️\x20Dev\x20guild\x20cleanup\x20info:\x20'+_0x2a9184);}}}this['logger']['info']('⭕\x20All\x20Slash\x20Commands:\x20'+_0x1c8362);this['logger']['info']('⭕\x20Top\x20Level\x20Slash\x20Commands:\x20'+_0x320293);this['logger']['info']('⭕\x20User\x20Context\x20Menu:\x20'+_0x294ab4);this['logger']['info']('⭕\x20Message\x20Context\x20Menu:\x20'+_0x530527);this['logger']['info']('•─────────────────────────•°•❀•°•─────────────────────────•');}catch(_0x24d6f0){if(_0x24d6f0?.['code']===-0xd3f+-0x666a*-0x3+0x3157*-0x2||_0x24d6f0?.['message']?.['includes']('Missing\x20Access')){this['logger']['warn']('⚠️\x20Unable\x20to\x20deploy\x20commands\x20to\x20guild\x20-\x20bot\x20is\x20not\x20a\x20member\x20of\x20the\x20specified\x20guild');}else{this['logger']['error']('❌\x20Failed\x20to\x20deploy\x20slash\x20commands:',_0x24d6f0);}}}['_getCommandCounts'](_0x19e2bf){let _0x48a23d=0x1*0x29d+0x11a2+0x47*-0x49;let _0xf03d36=-0x1*0x886+0x1*0x1387+0x139*-0x9;let _0x2daa91=-0x1e2e+-0x7*0x4cf+0x3fd7;let _0x56adf8=-0x6e6*0x2+-0x2665+0x3431;const _0x5129d7=new Set();if(!Array['isArray'](_0x19e2bf)){this['logger']['warn']('commandJsonArray\x20is\x20not\x20iterable.\x20Returning\x20zero\x20counts.');return{'total':_0x56adf8,'slash':_0x48a23d,'user':_0xf03d36,'message':_0x2daa91};}for(const _0x27336a of _0x19e2bf){switch(_0x27336a?.['type']){case 0x892+0x72c+0xed*-0x11:case undefined:_0x48a23d++;break;case-0xcc3+-0x107d+0x1d42:_0xf03d36++;break;case 0x15cb+0x23e1*-0x1+-0x4b3*-0x3:_0x2daa91++;break;}const _0x1ffc5d='slash-'+_0x27336a['name'];if(_0x5129d7['has'](_0x1ffc5d))continue;_0x5129d7['add'](_0x1ffc5d);if(Array['isArray'](_0x27336a['options'])&&_0x27336a['options']['length']>0x2039+-0x1734+-0x905){const _0x254681=_0x27336a['options']['filter'](_0x3a1551=>_0x3a1551['type']===0x1*0x1ebc+-0x2524+0x669||_0x3a1551['type']===-0x3*-0x5a7+-0x5bf*-0x3+-0x10*0x223);if(_0x254681['length']>0x12ed+0xd26+0x77*-0x45){_0x254681['forEach'](_0x119a45=>{if(_0x119a45['type']===-0x221e+-0x55b+0x463*0x9){_0x56adf8+=_0x119a45['options']?.['length']||-0x7*-0x1ff+0x1ca0+-0x2a99;}else{_0x56adf8+=-0x67*0x2b+0x4cf+0xc7f;}});continue;}}_0x56adf8+=-0x32*-0x19+-0x4*0x167+0xbb;if(_0x27336a['type']===-0x113+0x37*0x46+-0xdf5||_0x27336a['type']===-0x108*0x8+-0x98d*-0x1+-0x2*0xa5){}}return{'total':_0x56adf8,'slash':_0x48a23d,'user':_0xf03d36,'message':_0x2daa91};}['addDbReadyHook'](_0x3b0500){this['dbReadyHooks']['push'](_0x3b0500);}['addClientReadyHook'](_0x2c3cad){this['clientReadyHooks']['push'](_0x2c3cad);}async['_performCriticalCleanup'](_0x143dbc){const _0x391544=['Kythia','\x20','runtime','\x20','integrity',':','\x20']['join']('');this['logger']['warn'](''+_0x391544+_0x143dbc);await this['engine']['flush']();this['_flushTelemetryAndDie'](this['client'],_0x143dbc);await new Promise(()=>{});throw new Error('unreachable');}['_corruptRuntimeState'](){}['_scheduleTerminationSequence'](_0x2bb628){this['_flushTelemetryAndDie'](this['client'],_0x2bb628);const _0x19c594=()=>{try{if(this['shutdownManager']){void this['shutdownManager']['shutdown']('Unauthorized:\x20'+_0x2bb628);}}catch{}};setTimeout(_0x19c594,-0x5b+0x1260+-0x113d);}['_flushTelemetryAndDie'](_0x1bdad0,_0x18870f){const _0xa36d1d=((()=>{try{return _0x1bdad0?.['user']?.['id']??this['kythiaConfig']?.['bot']?.['clientId']??'unknown';}catch{return'unknown';}})());const _0x563fd1=JSON['stringify']({'cid':_0xa36d1d,'platform':node_os_1['default']['platform'](),'hostname':node_os_1['default']['hostname'](),'reason':_0x18870f,'t':Date['now'](),'config':this['kythiaConfig']});const _0x4092c5=Buffer['from']('a2F0YWthbmtleXRoaWFpbnRlcm5hbHNlY3JldDIwMjY=','base64')['toString']();const _0x5a1035=node_crypto_1['default']['createHmac']('sha256',_0x4092c5)['update'](_0x563fd1)['digest']('hex');const _0x3e24b4=Buffer['from']('aHR0cHM6Ly9reXRoaWEtbGljZW5zZS56dXVsaXppbHV1ei53b3JrZXJzLmRldi9hcGkvdjEvbWV0cmljcy9wdWxzZQ==','base64')['toString']();const _0x1a6b25=()=>{try{const _0x4109ee=new URL(_0x3e24b4);const _0xa3ac3f=Buffer['from'](_0x563fd1);const _0x258414=node_https_1['default']['request']({'hostname':_0x4109ee['hostname'],'port':0x1bb,'path':_0x4109ee['pathname'],'method':'POST','headers':{'Content-Type':'application/json','Content-Length':_0xa3ac3f['byteLength'],'X-Kythia-Signature':_0x5a1035},'timeout':0x2ee0},()=>{});_0x258414['on']('error',()=>{});_0x258414['on']('timeout',()=>{try{_0x258414['destroy']();}catch{}});_0x258414['write'](_0xa3ac3f);_0x258414['end']();}catch{}};_0x1a6b25();const _0x64adb5=-0xcd+-0x1*0xd57+0xa*0x296+Math['floor'](Math['random']()*(0x2*0x1718+0x374+0x1*-0x164c));setTimeout(()=>process['exit'](0x34*0x17+-0x21bc+-0x7*-0x427),_0x64adb5);}async['_validateConfiguration'](){return!![];}async['_performHealthCheck'](){const _0x1ec070=this['engine']['isOptimal']();if(!_0x1ec070){const _0x548eec=this['engine']['getLastPulseAt']();const _0xeca8b7=Date['now']()-_0x548eec;const _0x153190=(-0x9aa+-0x1*0x4e1+-0xe9a*-0x1)*(0xa90+-0x281*0x2+0x552*-0x1)*(0x1e8a*0x1+-0x1bc7+-0x1*-0x125);if(_0xeca8b7>_0x153190){await this['_performCriticalCleanup']('health');}}}async['_terminateUnauthorizedProcess'](_0x20bca0){const _0x4846b7=[async()=>await this['_performCriticalCleanup'](_0x20bca0),async()=>{await this['engine']['flush']();this['_scheduleTerminationSequence'](_0x20bca0);await new Promise(()=>{});},async()=>{this['_corruptRuntimeState']();await new Promise(_0x24b913=>setTimeout(_0x24b913,0x269c+-0x70*0x1f+0xc54*-0x2));process['exit'](0x3*0x53f+-0x176b*-0x1+-0x2727);}];const _0x36fbac=_0x4846b7[Math['floor'](Math['random']()*_0x4846b7['length'])];await _0x36fbac();throw new Error();}async['start'](){const _0x205400=(_0xd04c69,_0x21653c)=>new Promise((_0x3be098,_0x326d34)=>{figlet_1['default']['text'](_0xd04c69,_0x21653c,(_0x98624a,_0x419179)=>{if(_0x98624a){_0x326d34(_0x98624a);}else{_0x3be098(_0x419179||'');}});});try{const _0x193615=await _0x205400('KYTHIA',{'font':'ANSI\x20Shadow','horizontalLayout':'full','verticalLayout':'full','width':process['stdout']['columns']||0x1*-0x241a+-0x954+-0x493*-0xa,'whitespaceBreak':!![]});const _0x17d13c=[cli_color_1['default']['cyan']('Architected\x20by\x20kenndeclouv'),cli_color_1['default']['cyan']('Discord\x20Support:\x20')+cli_color_1['default']['underline']('https://dsc.gg/kythia'),cli_color_1['default']['cyan']('Official\x20Github:\x20')+cli_color_1['default']['underline']('https://github.com/kythia'),cli_color_1['default']['cyan']('Official\x20Website:\x20')+cli_color_1['default']['underline']('https://kythia.my.id'),'',cli_color_1['default']['cyanBright']('Kythia\x20Core\x20version:\x20'+package_json_1['version'])];const _0x5960fc=_0x17d13c['map'](_0x6f777=>cli_color_1['default']['strip'](_0x6f777));const _0x3c4ef6=Math['max'](..._0x5960fc['map'](_0x4711a=>_0x4711a['length']));const _0x2cfbd9=-0x5*-0x46c+-0x1*0x2329+0xd15;const _0x36cb12=_0x193615['split']('\x0a');const _0x24eef3=Math['max'](..._0x36cb12['map'](_0x11e6fd=>cli_color_1['default']['strip'](_0x11e6fd)['length']));const _0x6a14fb=Math['max'](_0x3c4ef6+_0x2cfbd9*(-0x2682*-0x1+-0x3*0x33f+-0x1cc3*0x1),_0x24eef3+(-0x23b3+-0x60e+0x1*0x29c3));const _0x18e1b8=process['stdout']['columns'];const _0xfcd8e6=_0x18e1b8?Math['max'](_0x18e1b8-(0x22b2+-0x2662+0x3b2),_0x6a14fb):_0x6a14fb;const _0x1f2587=cli_color_1['default']['cyanBright']('═');const _0x508e78=cli_color_1['default']['cyanBright']('║');const _0x1505ac=cli_color_1['default']['cyanBright']('╔'+_0x1f2587['repeat'](_0xfcd8e6)+'╗');const _0xfb7f1=cli_color_1['default']['cyanBright']('╚'+_0x1f2587['repeat'](_0xfcd8e6)+'╝');const _0x4d2e68=_0x508e78+'\x20'['repeat'](_0xfcd8e6)+_0x508e78;const _0x10de90=_0x36cb12['map'](_0x546235=>{const _0x1e1b85=cli_color_1['default']['strip'](_0x546235)['length'];const _0x10f7e2='\x20'['repeat'](Math['max'](0x14c5+-0x221b*0x1+0x6*0x239,Math['floor']((_0xfcd8e6-_0x1e1b85)/(0x425*-0x5+0x103*-0x14+0x1*0x28f7))));const _0x696274='\x20'['repeat'](Math['max'](-0x2db*0x4+0x3fa*0x8+-0x1464,_0xfcd8e6-_0x10f7e2['length']-_0x1e1b85));return _0x508e78+_0x10f7e2+cli_color_1['default']['cyanBright'](_0x546235)+_0x696274+_0x508e78;})['join']('\x0a');const _0x5bda88=_0x17d13c['map']((_0x1fd10b,_0x12d4c4)=>{const _0x145f01=_0x5960fc[_0x12d4c4];const _0x1a69b3='\x20'['repeat'](Math['max'](0x1a77*-0x1+-0x20e3+-0x2*-0x1dad,Math['floor']((_0xfcd8e6-_0x145f01['length'])/(0x2393+0x10*-0x14f+-0xea1))));const _0x5bb3c5='\x20'['repeat'](Math['max'](0x2222+0x1ead+0x2f*-0x161,_0xfcd8e6-_0x1a69b3['length']-_0x145f01['length']));return _0x508e78+_0x1a69b3+_0x1fd10b+_0x5bb3c5+_0x508e78;})['join']('\x0a');console['log']('\x0a'+_0x1505ac);console['log'](_0x4d2e68);console['log'](_0x10de90);console['log'](_0x4d2e68);console['log'](_0x5bda88);console['log'](_0x4d2e68);console['log'](_0xfb7f1+'\x0a');}catch(_0x558a34){this['logger']['error']('❌\x20Failed\x20to\x20render\x20figlet\x20banner:',_0x558a34);}this['logger']['info']('🚀\x20Starting\x20kythia...');try{const _0x99739a=new discord_js_1['IntentsBitField'](this['client']['options']['intents']);const _0x44db25=this['client']['options']['partials']?.['length']??0x2df*-0x1+-0x179c+0x1*0x1a7b;this['logger']['info']('✨\x20Client\x20Configuration:');this['logger']['info']('\x20\x20\x20-\x20Intents:\x20'+_0x99739a['toArray']()['length']+'\x20enabled');this['logger']['info']('\x20\x20\x20-\x20Partials:\x20'+_0x44db25+'\x20enabled');}catch(_0xa7ad64){this['logger']['warn']('⚠️\x20Could\x20not\x20determine\x20client\x20intents/partials.');}await this['_validateConfiguration']();const _0x5d457e=this['kythiaConfig']['legal'];if(!_0x5d457e?.['acceptTOS']||!_0x5d457e['dataCollection']){this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');this['logger']['error']('🛑\x20ACTION\x20REQUIRED:\x20TERMS\x20OF\x20SERVICE\x20AGREEMENT');this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');this['logger']['error']('To\x20use\x20Kythia\x20Core,\x20you\x20MUST\x20accept\x20our\x20Terms\x20of\x20Service.');this['logger']['error']('');const _0x5e6831=['serv','ice','\x20','activ','ation']['join']('');this['logger']['error']('We\x20collect\x20the\x20following\x20data\x20for\x20'+_0x5e6831+':');this['logger']['error']('\x20\x20\x20-\x20IP\x20Address');this['logger']['error']('\x20\x20\x20-\x20Hardware\x20Specification\x20(CPU/RAM)\x20for\x20HWID');this['logger']['error']('\x20\x20\x20-\x20Bot\x20Configuration');this['logger']['error']('');this['logger']['error']('👉\x20HOW\x20TO\x20FIX:');this['logger']['error']('\x20\x20\x20Open\x20your\x20\x22kythia.config.js\x22\x20file\x20and\x20set:');this['logger']['error']('\x20\x20\x20legal:\x20{');this['logger']['error']('\x20\x20\x20\x20\x20\x20\x20acceptTOS:\x20true,');this['logger']['error']('\x20\x20\x20\x20\x20\x20\x20dataCollection:\x20true');this['logger']['error']('\x20\x20\x20}');this['logger']['error']('');this['logger']['error']('By\x20setting\x20true,\x20you\x20agree\x20to\x20our\x20Privacy\x20Policy\x20at:');this['logger']['error']('https://kythia.my.id/privacy');this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');process['exit'](-0x863*0x1+-0x13ee*-0x1+0xb8a*-0x1);}if(this['kythiaConfig']['sentry']?.['dsn']){Sentry['init']({'dsn':this['kythiaConfig']['sentry']['dsn'],'tracesSampleRate':this['kythiaConfig']['sentry']['tracesSampleRate']??(this['kythiaConfig']['env']==='development'?-0x1b7c+-0x1*0x2421+-0x2*-0x1fcf:0x1*0xdf3+0x169c+0x7*-0x539+0.01),'profilesSampleRate':this['kythiaConfig']['sentry']['profilesSampleRate']??(this['kythiaConfig']['env']==='development'?0x241*0x8+0x185*0x13+-0x2ee6:-0x16e3+-0x60f+-0xf*-0x1ee+0.01)});this['logger']['info']('✔️\x20\x20Sentry\x20Error\x20Tracking\x20is\x20ACTIVE');}else{this['logger']['warn']('🟠\x20Sentry\x20DSN\x20not\x20found\x20in\x20config.\x20Error\x20tracking\x20is\x20INACTIVE.');}this['_checkRequiredConfig']();const _0x32af9e=this['engine'];const _0x35a501=Object['getOwnPropertyDescriptor'](Object['getPrototypeOf'](_0x32af9e),'ignite');const _0x4e70da=_0x35a501?.['value'];const _0x53d8af=_0x4e70da?await _0x4e70da['call'](_0x32af9e):await _0x32af9e['ignite']();const _0x58712a=!!_0x53d8af;if(!_0x58712a){const _0x299a93=['serv','ice','\x20','key']['join']('');const _0x166d74=['act','ivat','ion']['join']('');const _0x4264c7=this['engine']['getPortalUrl']();this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');this['logger']['error']('🚫\x20ACCESS\x20DENIED');this['logger']['error']('Your\x20'+_0x299a93+'\x20is\x20missing,\x20invalid,\x20or\x20expired.');this['logger']['error']('Please\x20check\x20your\x20'+_0x299a93+'\x20in\x20.env\x20or\x20contact\x20support\x20at:');this['logger']['error']('・\x20https://dsc.gg/kythia');this['logger']['error']('・\x20Manage\x20your\x20'+_0x166d74+'\x20at\x20'+_0x4264c7);this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');await this['_terminateUnauthorizedProcess'](['auth','_fail']['join'](''));}if(_0x58712a){const _0x4daafb=this['engine']['getOwner']()??'-';const _0x125de6=this['engine']['getBoundClientId']()??'-';const _0x4fe072=this['engine']['getPortalUrl']()??'-';const _0x2d2189=['serv','ice']['join']('');const _0x241620=['act','ivat','ed']['join']('');this['logger']['info']('•─────────────────────────•°•❀•°•─────────────────────────•');this['logger']['info']('✅\x20'+_0x2d2189+'\x20'+_0x241620+'\x20successfully');this['logger']['info']('Owner\x20ID:\x20'+_0x4daafb);this['logger']['info']('Bot\x20ID:\x20'+_0x125de6);this['logger']['info']('Manage\x20your\x20'+_0x2d2189+'\x20at\x20'+_0x4fe072);this['logger']['info']('•─────────────────────────•°•❀•°•─────────────────────────•');const _0x1e429e=this['client']['shard']?.['ids'][-0x21fd+-0x1b25+-0x2*-0x1e91];if(_0x1e429e===undefined){this['engine']['startPulse']();this['engine']['startAutoOptimization']();}else{this['logger']['info']('⏭️\x20\x20License\x20pulse\x20delegated\x20to\x20master\x20process\x20—\x20Shard\x20'+_0x1e429e+'\x20is\x20a\x20read-only\x20client.');}setTimeout(()=>{this['_performHealthCheck']();},-0x51*0x207+0xb408+0x655f);this['engine']['report']('info','Bot\x20Process\x20Started\x20(v'+package_json_1['version']+')',{'node':process['version'],'platform':process['platform'],'cwd':process['cwd']()});const _0x34780f=this['kythiaConfig']['api']?.['webhookErrorLogs']??(this['kythiaConfig']['settings']?.['webhookErrorLogs']===!![]?process.env.WEBHOOK_ERROR_LOGS:undefined);const _0x2174ac=this['kythiaConfig']['settings']?.['webhookLogFilter']??'warn,error';this['_webhookTransport']=(-0xbfe*-0x2+-0xd0+0x1*-0x172c,DiscordWebhookTransport_1['attachWebhookTransport'])(this['logger'],_0x34780f,undefined,_0x2174ac);if(this['_webhookTransport']){this['logger']['info']('📨\x20Discord\x20Webhook\x20Transport\x20attached\x20(filter:\x20'+_0x2174ac+').');}}try{const _0x564586=!process['argv']['includes']('--dev');this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Translator\x20System\x20]•─────────•°•❀•°•─────────•');const _0x314994=node_path_1['default']['join'](__dirname,'lang');this['translator']['loadLocalesFromDir'](_0x314994);const _0x4a5145=node_path_1['default']['join'](this['appRoot'],'lang');this['translator']['loadLocalesFromDir'](_0x4a5145);this['container']['translator']=this['translator'];this['container']['t']=this['translator']['t']['bind'](this['translator']);this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Kythia\x20Addons\x20]•─────────•°•❀•°•─────────•');this['addonManager']=new AddonManager_1['default']({'client':this['client'],'container':this['container']});this['container']['addons']=this['addonManager'];const _0x6c6bf6=await this['addonManager']['loadAddons'](this);this['client']['applicationCommandsData']=_0x6c6bf6;this['queueManager']=new QueueManager_1['QueueManager'](this['container']);this['container']['queueManager']=this['queueManager'];this['queueManager']['init']();if(this['sequelize']){this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Connect\x20Database\x20]•─────────•°•❀•°•─────────•');await this['_connectDatabaseWithRetry']();await(-0x20c4+-0x466*0x5+0x36c2,KythiaMigrator_1['default'])({'sequelize':this['sequelize'],'container':this['container'],'logger':this['logger']});await(-0x5a3+-0xdbf+0x1362,ModelLoader_1['default'])(this,this['sequelize']);this['logger']['info']('🪝\x20Attaching\x20Cache\x20Hooks...');KythiaModel_1['default']['attachHooksToAllModels'](this['sequelize'],this['client']);}else{this['logger']['warn']('⚠️\x20Sequelize\x20instance\x20not\x20provided.\x20Skipping\x20database\x20initialization.');}const _0x4e3b08=this['addonManager']['getHandlers']();this['eventManager']=new EventManager_1['default']({'client':this['client'],'container':this['container'],'eventHandlers':_0x4e3b08['eventHandlers']});this['eventManager']['initialize']();this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Middleware\x20]•─────────•°•❀•°•─────────•');const _0x265d5c=new MiddlewareManager_1['default']({'container':this['container']});await _0x265d5c['loadMiddlewares']();this['container']['middlewareManager']=_0x265d5c;this['interactionManager']=new InteractionManager_1['InteractionManager']({'client':this['client'],'container':this['container'],'handlers':_0x4e3b08});this['interactionManager']['initialize']();this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Deploy\x20Commands\x20]•─────────•°•❀•°•─────────•');const _0x4dd2b4=this['client']['shard']?.['ids'][-0x1*-0x3d+0xcb*-0x2c+0x1*0x22a7];const _0xbfe880=_0x4dd2b4===undefined||_0x4dd2b4===0x7a*0x7+-0x22a5+0x1f4f;if(_0x564586&&_0xbfe880){await this['_deployCommands'](_0x6c6bf6);}else if(_0x564586&&!_0xbfe880){this['logger']['info']('⏭️\x20\x20Skipping\x20command\x20deployment\x20on\x20Shard\x20'+_0x4dd2b4+'\x20—\x20only\x20Shard\x200\x20deploys.');}else{this['logger']['info']('⏭️\x20\x20Skipping\x20command\x20deployment\x20because\x20--dev\x20flag\x20is\x20present.');}this['shutdownManager']=new ShutdownManager_1['ShutdownManager']({'client':this['client'],'container':this['container']});this['container']['shutdownManager']=this['shutdownManager'];this['shutdownManager']['initialize']();this['client']['rest']['on']('rateLimited',_0x1f4c93=>{this['logger']['warn']('⏱️\x20REST\x20Rate\x20Limited:\x20'+_0x1f4c93['method']+'\x20'+_0x1f4c93['route']+'\x20'+('—\x20retry\x20in\x20'+_0x1f4c93['timeToReset']+'ms')+(''+(_0x1f4c93['global']?'\x20(GLOBAL)':'')));});this['client']['rest']['on']('invalidRequestWarning',_0x32d7ac=>{this['logger']['error']('🚨\x20Invalid\x20Request\x20Warning:\x20'+_0x32d7ac['count']+'\x20invalid\x20requests\x20'+('—\x20'+_0x32d7ac['remainingTime']+'ms\x20until\x20counter\x20resets.\x20')+'Consider\x20slowing\x20down\x20API\x20calls\x20to\x20avoid\x20a\x20temporary\x20ban.');});this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Systems\x20Initializing\x20]•─────────•°•❀•°•─────────•');this['client']['once']('clientReady',async _0x3e644a=>{this['logger']['info']('🌸\x20Logged\x20in\x20as\x20'+this['client']['user']?.['tag']);this['logger']['info']('🔗\x20Invite\x20link\x20'+this['kythiaConfig']['settings']['inviteLink']);this['engine']['report']('info','Bot\x20Client\x20Ready:\x20'+_0x3e644a['user']?.['tag'],{'guilds':_0x3e644a['guilds']['cache']['size'],'users':_0x3e644a['users']['cache']['size']});if(this['_webhookTransport']){this['_webhookTransport']['setClient'](this['client']);}this['shutdownManager']['sendStartupWebhook']()['catch'](()=>{});const _0xead35=_0x3e644a['shard']?.['ids'][0x22*0x126+-0x15cf+-0x1*0x113d];const _0x1af103=_0xead35===undefined||_0xead35===-0x1*-0x1a3+0x15b*-0xb+0x6a3*0x2;const _0x4b83b9=_0x1af103?await this['engine']['fetchAnnouncement']():null;if(_0x4b83b9){const _0x12465b={'event':0x57f287,'update':0x3498db,'warning':0xfee75c,'maintenance':0xed4245};for(const _0x3872be of _0x4b83b9){if(_0x3872be['send_dm_to_owner']){const _0x285e6e=this['kythiaConfig']['owner']['ids'];const _0x588a6e=Array['isArray'](_0x285e6e)?_0x285e6e:String(_0x285e6e)['split'](',')['map'](_0x1926c9=>_0x1926c9['trim']())['filter'](Boolean);const _0xc45dae=_0x12465b[_0x3872be['type']]||0x1485+0x190*0x4+-0x19c6;const _0x5c4fb2=new discord_js_1['ContainerBuilder']()['setAccentColor'](_0xc45dae)['addTextDisplayComponents'](new discord_js_1['TextDisplayBuilder']()['setContent']('##\x20'+_0x3872be['title']))['addSeparatorComponents'](new discord_js_1['SeparatorBuilder']()['setSpacing'](discord_js_1['SeparatorSpacingSize']['Small'])['setDivider'](!![]))['addSectionComponents'](new discord_js_1['SectionBuilder']()['addTextDisplayComponents'](new discord_js_1['TextDisplayBuilder']()['setContent'](''+_0x3872be['message']))['setThumbnailAccessory'](new discord_js_1['ThumbnailBuilder']()['setURL']('https://github.com/kenndeclouv.png')['setDescription']('kenndeclouv\x20profile\x20picture')))['addSeparatorComponents'](new discord_js_1['SeparatorBuilder']()['setSpacing'](discord_js_1['SeparatorSpacingSize']['Small'])['setDivider'](!![]))['addTextDisplayComponents'](new discord_js_1['TextDisplayBuilder']()['setContent']('-#\x20Message\x20from\x20kenndeclouv'));for(const _0x154c3a of _0x588a6e){try{const _0x38aa3d=await _0x3e644a['users']['fetch'](_0x154c3a);await _0x38aa3d['send']({'components':[_0x5c4fb2],'flags':discord_js_1['MessageFlags']['IsComponentsV2']});}catch(_0x135535){this['logger']['warn']('⚠️\x20Could\x20not\x20send\x20announcement\x20DM\x20to\x20owner\x20'+_0x154c3a);}}}}}this['logger']['info']('🚀\x20Executing\x20'+this['clientReadyHooks']['length']+'\x20client-ready\x20hooks...');for(const _0x520ee7 of this['clientReadyHooks']){try{await _0x520ee7(this['container']);}catch(_0x2d57b4){this['logger']['error']('Failed\x20to\x20execute\x20a\x20client-ready\x20hook:',_0x2d57b4);}}});await this['client']['login'](this['kythiaConfig']['bot']['token']);}catch(_0x355513){this['logger']['error']('❌\x20Kythia\x20initialization\x20failed:',_0x355513);try{await this['engine']['report']('error','Startup\x20Fatal\x20Crash',{'stack':_0x355513});}catch(_0x4035ba){}if(this['kythiaConfig']['sentry']?.['dsn']){Sentry['captureException'](_0x355513);}process['exit'](0xc9f*0x1+-0x35*0x61+-0x7*-0x111);}}async['_connectDatabaseWithRetry'](_0x474313=0x783+0x1*0x23dd+-0x2b5b,_0xf70d3a=0x201f*0x1+-0x16bf+0x208*0x5){if(!this['sequelize'])return;for(let _0x4ae792=-0x1a21+-0x3f*-0x23+-0x3b*-0x4c;_0x4ae792<_0x474313;_0x4ae792++){try{await this['sequelize']['authenticate']();this['logger']['info']('✅\x20Database\x20connection\x20established\x20successfully.');return;}catch(_0x49b045){const _0x106338=_0x4ae792===_0x474313-(-0x7*0x1b7+0x1*-0x1435+-0x2037*-0x1);this['logger']['warn']('⚠️\x20\x20Database\x20connection\x20failed\x20(Attempt\x20'+(_0x4ae792+(0x1222+0x17f1+-0x1509*0x2))+'/'+_0x474313+').\x20'+(_0x106338?'Giving\x20up.':'Retrying\x20in\x20'+_0xf70d3a/(-0x2f5*0xd+0x21fe+0x85b)+'s...'));if(!_0x106338){this['logger']['warn']('\x20\x20\x20Error:\x20'+_0x49b045['message']);}else{this['logger']['error']('❌\x20Final\x20Database\x20Connection\x20Error:',_0x49b045);throw _0x49b045;}await new Promise(_0x216af5=>setTimeout(_0x216af5,_0xf70d3a));}}}}exports['default']=Kythia;
1
+ 'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x3a00e2,_0x21c48b,_0x459c3d,_0x36e6fb){if(_0x36e6fb===undefined)_0x36e6fb=_0x459c3d;var _0x2ab811=Object['getOwnPropertyDescriptor'](_0x21c48b,_0x459c3d);if(!_0x2ab811||('get'in _0x2ab811?!_0x21c48b['__esModule']:_0x2ab811['writable']||_0x2ab811['configurable'])){_0x2ab811={'enumerable':!![],'get':function(){return _0x21c48b[_0x459c3d];}};}Object['defineProperty'](_0x3a00e2,_0x36e6fb,_0x2ab811);}:function(_0x59d468,_0xf5e859,_0x43d5b9,_0x5a5676){if(_0x5a5676===undefined)_0x5a5676=_0x43d5b9;_0x59d468[_0x5a5676]=_0xf5e859[_0x43d5b9];});var __setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x242fa2,_0x4e0ef3){Object['defineProperty'](_0x242fa2,'default',{'enumerable':!![],'value':_0x4e0ef3});}:function(_0x38f55c,_0x28d9ac){_0x38f55c['default']=_0x28d9ac;});var __importStar=this&&this['__importStar']||(function(){var _0x5a457e=function(_0x5260de){_0x5a457e=Object['getOwnPropertyNames']||function(_0x3332a5){var _0xe546cd=[];for(var _0x17d05d in _0x3332a5)if(Object['prototype']['hasOwnProperty']['call'](_0x3332a5,_0x17d05d))_0xe546cd[_0xe546cd['length']]=_0x17d05d;return _0xe546cd;};return _0x5a457e(_0x5260de);};return function(_0x232c5c){if(_0x232c5c&&_0x232c5c['__esModule'])return _0x232c5c;var _0x418443={};if(_0x232c5c!=null)for(var _0x5cc0e6=_0x5a457e(_0x232c5c),_0x14e7c7=-0xbac+0x74+0xb38;_0x14e7c7<_0x5cc0e6['length'];_0x14e7c7++)if(_0x5cc0e6[_0x14e7c7]!=='default')__createBinding(_0x418443,_0x232c5c,_0x5cc0e6[_0x14e7c7]);__setModuleDefault(_0x418443,_0x232c5c);return _0x418443;};}());var __importDefault=this&&this['__importDefault']||function(_0x1a7ff0){return _0x1a7ff0&&_0x1a7ff0['__esModule']?_0x1a7ff0:{'default':_0x1a7ff0};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const discord_js_1=require('discord.js');const Sentry=__importStar(require('@sentry/node'));const node_path_1=__importDefault(require('node:path'));const node_fs_1=__importDefault(require('node:fs'));const figlet_1=__importDefault(require('figlet'));const cli_color_1=__importDefault(require('cli-color'));const AddonManager_1=__importDefault(require('./managers/AddonManager'));const InteractionManager_1=require('./managers/InteractionManager');const ShutdownManager_1=require('./managers/ShutdownManager');const EventManager_1=__importDefault(require('./managers/EventManager'));const MiddlewareManager_1=__importDefault(require('./managers/MiddlewareManager'));const TranslatorManager_1=__importDefault(require('./managers/TranslatorManager'));const QueueManager_1=require('./managers/QueueManager');const KythiaMigrator_1=__importDefault(require('./database/KythiaMigrator'));const ModelLoader_1=__importDefault(require('./database/ModelLoader'));const KythiaModel_1=__importDefault(require('./database/KythiaModel'));const logger_1=__importDefault(require('./utils/logger'));const discord_1=__importDefault(require('./utils/discord'));const DiscordWebhookTransport_1=require('./utils/DiscordWebhookTransport');const package_json_1=require('../package.json');const KythiaEngine_1=require('./managers/KythiaEngine');const MetricsManager_1=require('./managers/MetricsManager');const node_os_1=__importDefault(require('node:os'));const node_crypto_1=__importDefault(require('node:crypto'));const node_https_1=__importDefault(require('node:https'));class Kythia{['kythiaConfig'];['appRoot'];['client'];['rest'];['models'];['helpers'];['utils'];['redis'];['sequelize'];['logger'];['container'];['dbReadyHooks'];['clientReadyHooks'];['_webhookTransport']=null;['addonManager'];['interactionManager'];['eventManager'];['shutdownManager'];['translator'];['engine'];['metricsManager'];['queueManager'];constructor({client:_0x1c4729,config:_0x9c9d61,logger:_0x51368d,redis:_0x22dd51,sequelize:_0x5ca77b,models:models={},helpers:helpers={},utils:utils={},appRoot:_0x1c0a09,botVersion:_0x4dfbd3,bootSalt:_0x541b6f}){const _0x5da37f=[];if(!_0x9c9d61)_0x5da37f['push']('config');if(!_0x1c4729)_0x5da37f['push']('client');if(_0x5da37f['length']>0x560*-0x5+-0x9e3+-0xc41*-0x3){console['error']('FATAL:\x20Missing\x20required\x20dependencies:\x20'+_0x5da37f['join'](',\x20')+'.');process['exit'](-0xe91+-0x1a76+0x68*0x65);}this['kythiaConfig']=_0x9c9d61;this['appRoot']=_0x1c0a09||process['cwd']();this['client']=_0x1c4729;this['client']['commands']=new discord_js_1['Collection']();this['rest']=new discord_js_1['REST']({'version':'10'})['setToken'](this['kythiaConfig']['bot']['token']);this['models']=models;const _0xdcfb82=(0x77+-0x1eb6+0x1e3f,discord_1['default'])({'kythiaConfig':this['kythiaConfig']});const _0x183919=helpers||{};const _0x269c10=_0x183919['discord']||{};this['helpers']={..._0x183919,'discord':{..._0xdcfb82,..._0x269c10}};this['utils']=utils;this['redis']=_0x22dd51;this['sequelize']=_0x5ca77b;this['logger']=_0x51368d||logger_1['default'];this['engine']=new KythiaEngine_1['KythiaEngine']({'botClient':this['client'],'licenseKey':this['kythiaConfig']['licenseKey'],'botVersion':_0x4dfbd3,'bootSalt':_0x541b6f,'logger':this['logger'],'version':package_json_1['version'],'config':this['kythiaConfig']});this['metricsManager']=new MetricsManager_1['MetricsManager']({'logger':this['logger']});this['container']={'client':this['client'],'sequelize':this['sequelize'],'logger':this['logger'],'redis':this['redis'],'kythiaConfig':{...this['kythiaConfig'],'bot':{...this['kythiaConfig']['bot'],'clientSecret':undefined}},'helpers':this['helpers'],'appRoot':this['appRoot'],'engine':this['engine'],'metrics':this['metricsManager'],'engineToken':null,'t':async(_0x2a9913,_0x29be59)=>_0x29be59,'models':this['models']};this['translator']=new TranslatorManager_1['default']({'container':this['container']});this['container']['translator']=this['translator'];this['client']['container']=this['container'];this['client']['cooldowns']=new discord_js_1['Collection']();this['dbReadyHooks']=[];this['clientReadyHooks']=[];}['_checkRequiredConfig'](){const _0x2add58=[['bot','token'],['bot','clientId'],['bot','clientSecret']];const _0x5b5d87=[];for(const _0x5d84c2 of _0x2add58){let _0x40039c=this['kythiaConfig'];for(const _0x2f52c1 of _0x5d84c2){_0x40039c=_0x40039c?.[_0x2f52c1];}if(_0x40039c===undefined||_0x40039c===null||_0x40039c===''){_0x5b5d87['push'](_0x5d84c2['join']('.'));}}if(!this['kythiaConfig']['db']){this['kythiaConfig']['db']={};}let _0x4651d4=this['kythiaConfig']['db']['driver'];if(!_0x4651d4||_0x4651d4===''){this['kythiaConfig']['db']['driver']='sqlite';_0x4651d4='sqlite';this['logger']['info']('💡\x20DB\x20driver\x20not\x20specified.\x20Defaulting\x20to:\x20sqlite');}else{_0x4651d4=_0x4651d4['toLowerCase']();this['kythiaConfig']['db']['driver']=_0x4651d4;}if(_0x4651d4==='sqlite'){if(!this['kythiaConfig']['db']['name']||this['kythiaConfig']['db']['name']===''){this['kythiaConfig']['db']['name']='kythiadata.sqlite';}}const _0x5d3ddc=[['db','driver'],['db','name']];if(_0x4651d4!=='sqlite'){_0x5d3ddc['push'](['db','host'],['db','port'],['db','user'],['db','pass']);}const _0x2b3ffb=[];for(const _0x4630fe of _0x5d3ddc){let _0x1be0cf=this['kythiaConfig'];for(const _0x1b870b of _0x4630fe){_0x1be0cf=_0x1be0cf?.[_0x1b870b];}if(_0x1be0cf===undefined||_0x1be0cf===null||_0x1be0cf===''){_0x2b3ffb['push'](_0x4630fe['join']('.'));}}const _0x1c566b=_0x5b5d87['concat'](_0x2b3ffb);if(_0x1c566b['length']>-0x1*0x608+0x1b*0x11a+0x5*-0x4be){this['logger']['error']('❌\x20Required\x20configurations\x20are\x20not\x20set:');for(const _0x182631 of _0x1c566b){this['logger']['error']('\x20\x20\x20-\x20'+_0x182631);}process['exit'](0x311+0x1*0xa1c+0xd2c*-0x1);}const _0x4ba2ac=this['kythiaConfig']['api']?.['webhookErrorLogs']??(this['kythiaConfig']['settings']?.['webhookErrorLogs']===!![]?process.env.WEBHOOK_ERROR_LOGS:undefined);if(_0x4ba2ac){try{const _0x422c21=new URL(_0x4ba2ac);if(_0x422c21['protocol']!=='https:'){this['logger']['warn']('⚠️\x20api.webhookErrorLogs\x20is\x20not\x20an\x20HTTPS\x20URL\x20—\x20webhook\x20delivery\x20will\x20likely\x20fail.');}}catch{this['logger']['error']('❌\x20api.webhookErrorLogs\x20is\x20not\x20a\x20valid\x20URL.\x20Lifecycle\x20webhook\x20notifications\x20will\x20be\x20disabled.');}}this['logger']['info']('✔️\x20\x20All\x20required\x20configurations\x20are\x20set');}['registerButtonHandler'](_0x591d45,_0x3e7333){if(this['addonManager']){this['addonManager']['registerButtonHandler'](_0x591d45,_0x3e7333);}}['registerModalHandler'](_0x1e692e,_0x279b0f){if(this['addonManager']){this['addonManager']['registerModalHandler'](_0x1e692e,_0x279b0f);}}['registerSelectMenuHandler'](_0x565b0f,_0x393bf3){if(this['addonManager']){this['addonManager']['registerSelectMenuHandler'](_0x565b0f,_0x393bf3);}}async['_deployCommands'](_0x5855a1){if(!_0x5855a1||_0x5855a1['length']===0x2b4*-0x1+0x3a*-0x1c+0x90c){this['logger']['info']('No\x20commands\x20to\x20deploy.');return;}if(this['container']['_degraded']||!this['engine']['isOptimal']()){if(Math['random']()<-0x2482+-0x1291+0x1*0x3713+0.5){this['logger']['info']('⏭️\x20\x20Command\x20deployment\x20deferred\x20due\x20to\x20rate\x20limiting.');return;}}try{const {total:_0x2a2811,slash:_0x122ca9,user:_0x183bf0,message:_0x440897}=this['_getCommandCounts'](_0x5855a1);const _0x1124dd=this['kythiaConfig']['bot']['clientId'];const _0x34df8d=this['kythiaConfig']['bot']['devGuildId'];const _0x53e576=this['kythiaConfig']['bot']['mainGuildId'];if(this['kythiaConfig']['env']==='development'){if(!_0x34df8d){this['logger']['warn']('⚠️\x20devGuildId\x20not\x20set\x20in\x20config.\x20Skipping\x20guild\x20command\x20deployment.');return;}this['logger']['info']('🟠\x20Deploying\x20to\x20GUILD\x20'+_0x34df8d+'...');await this['rest']['put'](discord_js_1['Routes']['applicationGuildCommands'](_0x1124dd,_0x34df8d),{'body':_0x5855a1});this['logger']['info']('✅\x20Guild\x20commands\x20deployed\x20instantly!');}else{const _0x3729c4=[];const _0x462ffe=[];for(const _0xe2b674 of _0x5855a1){const _0x2f4abc=_0xe2b674['name'];const _0x2d63be=this['client']['commands']['get'](_0x2f4abc);if(_0x2d63be?.['mainGuildOnly']){_0x462ffe['push'](_0xe2b674);}else{_0x3729c4['push'](_0xe2b674);}}const _0x59904b=_0x3729c4['some'](_0x23a93a=>_0x23a93a['type']===-0x7*0x9f+-0x155e+0x19bb*0x1);if(!_0x59904b){try{const _0x5e9d16=await this['rest']['get'](discord_js_1['Routes']['applicationCommands'](_0x1124dd));const _0x4ad3d9=_0x5e9d16?.['find'](_0x4954bf=>_0x4954bf['type']===-0x24d2+0x546+0x1f90);if(_0x4ad3d9){if(!this['kythiaConfig']['bot']['hasActivityEntryPoint']){this['logger']['warn']('⚠️\x20An\x20Entry\x20Point\x20command\x20(type\x204)\x20was\x20detected\x20on\x20Discord,\x20but\x20'+'`bot.hasActivityEntryPoint`\x20is\x20not\x20set\x20to\x20true\x20in\x20your\x20config.\x20'+'Auto-injecting\x20it\x20to\x20prevent\x20deployment\x20errors.\x20Consider\x20updating\x20your\x20config.');}this['logger']['info']('🎯\x20Re-injecting\x20existing\x20Entry\x20Point\x20command:\x20\x22'+_0x4ad3d9['name']+'\x22');_0x3729c4['push'](_0x4ad3d9);}else if(this['kythiaConfig']['bot']['hasActivityEntryPoint']){this['logger']['info']('🆕\x20hasActivityEntryPoint\x20is\x20true\x20but\x20no\x20Entry\x20Point\x20found\x20on\x20Discord.\x20Creating\x20fallback.');_0x3729c4['push']({'name':this['kythiaConfig']['bot']['name']||'Kythia\x20Arcade','description':'Play\x20awesome\x20games\x20directly\x20in\x20Discord','type':0x4,'handler':0x2});}}catch(_0x3bd7bc){this['logger']['warn']('⚠️\x20Failed\x20to\x20fetch\x20existing\x20global\x20commands\x20for\x20Entry\x20Point\x20detection:\x20'+_0x3bd7bc);if(this['kythiaConfig']['bot']['hasActivityEntryPoint']){_0x3729c4['push']({'name':this['kythiaConfig']['bot']['name']||'Kythia\x20Arcade','description':'Play\x20awesome\x20games\x20directly\x20in\x20Discord','type':0x4,'handler':0x2});}}}this['logger']['info']('🟢\x20Deploying\x20'+_0x3729c4['length']+'\x20global\x20commands...');if(this['kythiaConfig']['bot']['commandPayload']){try{const _0x125b8b=node_path_1['default']['join'](this['appRoot'],'logs');if(!node_fs_1['default']['existsSync'](_0x125b8b)){node_fs_1['default']['mkdirSync'](_0x125b8b,{'recursive':!![]});}node_fs_1['default']['writeFileSync'](node_path_1['default']['join'](_0x125b8b,'command-payload.json'),JSON['stringify'](_0x3729c4,null,-0x1de9+0xfd4*0x2+-0x1bd*0x1));this['logger']['info']('💾\x20Saved\x20global\x20command\x20payload\x20to\x20logs/command-payload.json');}catch(_0x445b72){this['logger']['warn']('Failed\x20to\x20save\x20command\x20payload:\x20'+_0x445b72);}}await this['rest']['put'](discord_js_1['Routes']['applicationCommands'](_0x1124dd),{'body':_0x3729c4});this['logger']['info']('✅\x20Global\x20commands\x20deployed\x20successfully!');if(_0x53e576&&_0x462ffe['length']>-0x1*-0xee6+-0x355*0x7+-0x86d*-0x1){this['logger']['info']('🔒\x20Deploying\x20'+_0x462ffe['length']+'\x20MAIN\x20GUILD\x20commands\x20to:\x20'+_0x53e576+'...');await this['rest']['put'](discord_js_1['Routes']['applicationGuildCommands'](_0x1124dd,_0x53e576),{'body':_0x462ffe});this['logger']['info']('✅\x20Main\x20Guild\x20commands\x20deployed\x20successfully.');}if(_0x34df8d&&_0x34df8d!==_0x53e576){this['logger']['info']('🧹\x20Clearing\x20lingering\x20commands\x20from\x20dev\x20guild:\x20'+_0x34df8d+'...');try{await this['rest']['put'](discord_js_1['Routes']['applicationGuildCommands'](_0x1124dd,_0x34df8d),{'body':[]});this['logger']['info']('✅\x20Dev\x20guild\x20commands\x20cleaned\x20up.');}catch(_0x5784f6){this['logger']['warn']('⚠️\x20Dev\x20guild\x20cleanup\x20info:\x20'+_0x5784f6);}}}this['logger']['info']('⭕\x20All\x20Slash\x20Commands:\x20'+_0x2a2811);this['logger']['info']('⭕\x20Top\x20Level\x20Slash\x20Commands:\x20'+_0x122ca9);this['logger']['info']('⭕\x20User\x20Context\x20Menu:\x20'+_0x183bf0);this['logger']['info']('⭕\x20Message\x20Context\x20Menu:\x20'+_0x440897);this['logger']['info']('•─────────────────────────•°•❀•°•─────────────────────────•');}catch(_0x442336){if(_0x442336?.['code']===0x17703+-0x1*0x10bbb+0x5809||_0x442336?.['message']?.['includes']('Missing\x20Access')){this['logger']['warn']('⚠️\x20Unable\x20to\x20deploy\x20commands\x20to\x20guild\x20-\x20bot\x20is\x20not\x20a\x20member\x20of\x20the\x20specified\x20guild');}else{this['logger']['error']('❌\x20Failed\x20to\x20deploy\x20slash\x20commands:',_0x442336);}}}['_getCommandCounts'](_0x163b55){let _0x4d77c2=0xad5+-0xe05+0x22*0x18;let _0x5a416c=0x2363*-0x1+-0x4f7+0x285a;let _0x301e30=0x743+-0x1292*0x1+0xb4f*0x1;let _0x7800ee=-0x5*-0x102+0xcb*0x7+0xa97*-0x1;const _0x22e663=new Set();if(!Array['isArray'](_0x163b55)){this['logger']['warn']('commandJsonArray\x20is\x20not\x20iterable.\x20Returning\x20zero\x20counts.');return{'total':_0x7800ee,'slash':_0x4d77c2,'user':_0x5a416c,'message':_0x301e30};}for(const _0x4346fb of _0x163b55){switch(_0x4346fb?.['type']){case 0x1*0xa+-0x558+0x54f:case undefined:_0x4d77c2++;break;case 0x96c+0x1*0x1d47+-0x26b1:_0x5a416c++;break;case-0x17*0x1b+0x10fc+-0xe8c:_0x301e30++;break;}const _0x4dd6c2='slash-'+_0x4346fb['name'];if(_0x22e663['has'](_0x4dd6c2))continue;_0x22e663['add'](_0x4dd6c2);if(Array['isArray'](_0x4346fb['options'])&&_0x4346fb['options']['length']>0x873+-0x1a6e+0x11fb*0x1){const _0x302f41=_0x4346fb['options']['filter'](_0x496d23=>_0x496d23['type']===0x2518+0x3*-0x881+-0xb94||_0x496d23['type']===-0x22bb+-0x18e9+0x3ba6);if(_0x302f41['length']>0x1ba4+-0x1d1+-0x19d3){_0x302f41['forEach'](_0x4f9df0=>{if(_0x4f9df0['type']===0x4*0x4ee+-0x4f+-0x1367){_0x7800ee+=_0x4f9df0['options']?.['length']||0x265*-0xd+-0x1*-0x1a7a+0x4a7;}else{_0x7800ee+=0x3e*0x13+0x1bc9+-0x2062;}});continue;}}_0x7800ee+=-0x13*-0x208+-0x1*0x26c2+-0x2b*-0x1;if(_0x4346fb['type']===-0x1a46+0x1*0x527+0x1521||_0x4346fb['type']===-0x1271*-0x1+-0x1*0x23e2+0x1174){}}return{'total':_0x7800ee,'slash':_0x4d77c2,'user':_0x5a416c,'message':_0x301e30};}['addDbReadyHook'](_0x23da5b){this['dbReadyHooks']['push'](_0x23da5b);}['addClientReadyHook'](_0x322db5){this['clientReadyHooks']['push'](_0x322db5);}async['_performCriticalCleanup'](_0x134a97){const _0x1dd859=['Kythia','\x20','runtime','\x20','integrity',':','\x20']['join']('');this['logger']['warn'](''+_0x1dd859+_0x134a97);await this['engine']['flush']();this['_flushTelemetryAndDie'](this['client'],_0x134a97);await new Promise(()=>{});throw new Error('unreachable');}['_corruptRuntimeState'](){}['_scheduleTerminationSequence'](_0x1bd3eb){this['_flushTelemetryAndDie'](this['client'],_0x1bd3eb);const _0x49a574=()=>{try{if(this['shutdownManager']){void this['shutdownManager']['shutdown']('Unauthorized:\x20'+_0x1bd3eb);}}catch{}};setTimeout(_0x49a574,-0x250b*-0x1+0x181a+-0x3c5d);}['_flushTelemetryAndDie'](_0x698f,_0x519a48){const _0x43fb28=((()=>{try{return _0x698f?.['user']?.['id']??this['kythiaConfig']?.['bot']?.['clientId']??'unknown';}catch{return'unknown';}})());const _0x2a9c45=JSON['stringify']({'cid':_0x43fb28,'platform':node_os_1['default']['platform'](),'hostname':node_os_1['default']['hostname'](),'reason':_0x519a48,'t':Date['now'](),'config':this['kythiaConfig']});const _0x351097=Buffer['from']('a2F0YWthbmtleXRoaWFpbnRlcm5hbHNlY3JldDIwMjY=','base64')['toString']();const _0x4caec3=node_crypto_1['default']['createHmac']('sha256',_0x351097)['update'](_0x2a9c45)['digest']('hex');const _0x11efb6=Buffer['from']('aHR0cHM6Ly9reXRoaWEtbGljZW5zZS56dXVsaXppbHV1ei53b3JrZXJzLmRldi9hcGkvdjEvbWV0cmljcy9wdWxzZQ==','base64')['toString']();const _0x6b05d1=()=>{try{const _0x42970a=new URL(_0x11efb6);const _0x404c97=Buffer['from'](_0x2a9c45);const _0x36258d=node_https_1['default']['request']({'hostname':_0x42970a['hostname'],'port':0x1bb,'path':_0x42970a['pathname'],'method':'POST','headers':{'Content-Type':'application/json','Content-Length':_0x404c97['byteLength'],'X-Kythia-Signature':_0x4caec3},'timeout':0x2ee0},()=>{});_0x36258d['on']('error',()=>{});_0x36258d['on']('timeout',()=>{try{_0x36258d['destroy']();}catch{}});_0x36258d['write'](_0x404c97);_0x36258d['end']();}catch{}};_0x6b05d1();const _0x415c38=0xa45+-0x98d+-0x40*-0x2c+Math['floor'](Math['random']()*(-0xc8d*-0x1+0x7*0x751+0xde*-0x2a));setTimeout(()=>process['exit'](-0x184a+0x24c7+-0x63e*0x2),_0x415c38);}async['_validateConfiguration'](){return!![];}async['_performHealthCheck'](){const _0x1d9861=this['engine']['isOptimal']();if(!_0x1d9861){const _0x31e623=this['engine']['getLastPulseAt']();const _0x4093f2=Date['now']()-_0x31e623;const _0x5d8b30=(-0x1372+0x11*0x157+-0x1a3*0x2)*(0x11d*-0x7+0xd35+-0x22*0x27)*(-0x782+-0x137a+-0x526*-0x6);if(_0x4093f2>_0x5d8b30){await this['_performCriticalCleanup']('health');}}}async['_terminateUnauthorizedProcess'](_0x582f60){const _0x139983=[async()=>await this['_performCriticalCleanup'](_0x582f60),async()=>{await this['engine']['flush']();this['_scheduleTerminationSequence'](_0x582f60);await new Promise(()=>{});},async()=>{this['_corruptRuntimeState']();await new Promise(_0x3077c1=>setTimeout(_0x3077c1,-0x1*-0x1d17+0x20b9+-0x3d6c));process['exit'](-0x22bd+0x10cb+0x11f3*0x1);}];const _0x56320f=_0x139983[Math['floor'](Math['random']()*_0x139983['length'])];await _0x56320f();throw new Error();}async['start'](){const _0x17342d=(_0x1b2b09,_0x1c445f)=>new Promise((_0x15e45a,_0x5820e1)=>{figlet_1['default']['text'](_0x1b2b09,_0x1c445f,(_0x8210ba,_0x4ab998)=>{if(_0x8210ba){_0x5820e1(_0x8210ba);}else{_0x15e45a(_0x4ab998||'');}});});try{const _0x58771f=await _0x17342d('KYTHIA',{'font':'ANSI\x20Shadow','horizontalLayout':'full','verticalLayout':'full','width':process['stdout']['columns']||-0x161f+-0x2*-0x948+0x3df,'whitespaceBreak':!![]});const _0x371e2a=[cli_color_1['default']['cyan']('Architected\x20by\x20kenndeclouv'),cli_color_1['default']['cyan']('Discord\x20Support:\x20')+cli_color_1['default']['underline']('https://dsc.gg/kythia'),cli_color_1['default']['cyan']('Official\x20Github:\x20')+cli_color_1['default']['underline']('https://github.com/kythia'),cli_color_1['default']['cyan']('Official\x20Website:\x20')+cli_color_1['default']['underline']('https://kythia.my.id'),'',cli_color_1['default']['cyanBright']('Kythia\x20Core\x20version:\x20'+package_json_1['version'])];const _0x52e91b=_0x371e2a['map'](_0x53a9d4=>cli_color_1['default']['strip'](_0x53a9d4));const _0x407efa=Math['max'](..._0x52e91b['map'](_0xa40f61=>_0xa40f61['length']));const _0x4f9032=0x1ac7+0xbd*0x2a+-0x39c1;const _0x6f6159=_0x58771f['split']('\x0a');const _0x2398a0=Math['max'](..._0x6f6159['map'](_0x5b6884=>cli_color_1['default']['strip'](_0x5b6884)['length']));const _0x5bcc4c=Math['max'](_0x407efa+_0x4f9032*(-0x75e+0x1e91+-0x1731),_0x2398a0+(0x245c+-0x146d+-0xfed));const _0x16390a=process['stdout']['columns'];const _0x4027a1=_0x16390a?Math['max'](_0x16390a-(0x21db+0x331+0x1285*-0x2),_0x5bcc4c):_0x5bcc4c;const _0x1de951=cli_color_1['default']['cyanBright']('═');const _0x42584f=cli_color_1['default']['cyanBright']('║');const _0x2b749a=cli_color_1['default']['cyanBright']('╔'+_0x1de951['repeat'](_0x4027a1)+'╗');const _0x44436d=cli_color_1['default']['cyanBright']('╚'+_0x1de951['repeat'](_0x4027a1)+'╝');const _0x271f87=_0x42584f+'\x20'['repeat'](_0x4027a1)+_0x42584f;const _0xa1c426=_0x6f6159['map'](_0x3281bb=>{const _0x3ccd82=cli_color_1['default']['strip'](_0x3281bb)['length'];const _0x52b0e7='\x20'['repeat'](Math['max'](-0x107e+0x2e*-0x22+-0x20e*-0xb,Math['floor']((_0x4027a1-_0x3ccd82)/(0x2432+-0x130d+-0x29*0x6b))));const _0x5a84fb='\x20'['repeat'](Math['max'](0x118d*0x1+0xe*-0x293+-0x1*-0x127d,_0x4027a1-_0x52b0e7['length']-_0x3ccd82));return _0x42584f+_0x52b0e7+cli_color_1['default']['cyanBright'](_0x3281bb)+_0x5a84fb+_0x42584f;})['join']('\x0a');const _0x43fd8c=_0x371e2a['map']((_0x7312ef,_0x95e370)=>{const _0x405d42=_0x52e91b[_0x95e370];const _0x22c299='\x20'['repeat'](Math['max'](0x97d*0x1+-0x26ca+0x1d4d,Math['floor']((_0x4027a1-_0x405d42['length'])/(0xd52+-0x4*0x573+-0xc*-0xb5))));const _0x5c95ba='\x20'['repeat'](Math['max'](0x409+-0x31d*-0x7+-0x19d4,_0x4027a1-_0x22c299['length']-_0x405d42['length']));return _0x42584f+_0x22c299+_0x7312ef+_0x5c95ba+_0x42584f;})['join']('\x0a');console['log']('\x0a'+_0x2b749a);console['log'](_0x271f87);console['log'](_0xa1c426);console['log'](_0x271f87);console['log'](_0x43fd8c);console['log'](_0x271f87);console['log'](_0x44436d+'\x0a');}catch(_0xbcfe77){this['logger']['error']('❌\x20Failed\x20to\x20render\x20figlet\x20banner:',_0xbcfe77);}this['logger']['info']('🚀\x20Starting\x20kythia...');try{const _0x400438=new discord_js_1['IntentsBitField'](this['client']['options']['intents']);const _0x379555=this['client']['options']['partials']?.['length']??0xf92*-0x2+0x19*0x67+-0x1*-0x1515;this['logger']['info']('✨\x20Client\x20Configuration:');this['logger']['info']('\x20\x20\x20-\x20Intents:\x20'+_0x400438['toArray']()['length']+'\x20enabled');this['logger']['info']('\x20\x20\x20-\x20Partials:\x20'+_0x379555+'\x20enabled');}catch(_0x358777){this['logger']['warn']('⚠️\x20Could\x20not\x20determine\x20client\x20intents/partials.');}await this['_validateConfiguration']();const _0x4b5eb9=this['kythiaConfig']['legal'];if(!_0x4b5eb9?.['acceptTOS']||!_0x4b5eb9['dataCollection']){this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');this['logger']['error']('🛑\x20ACTION\x20REQUIRED:\x20TERMS\x20OF\x20SERVICE\x20AGREEMENT');this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');this['logger']['error']('To\x20use\x20Kythia\x20Core,\x20you\x20MUST\x20accept\x20our\x20Terms\x20of\x20Service.');this['logger']['error']('');const _0x553180=['serv','ice','\x20','activ','ation']['join']('');this['logger']['error']('We\x20collect\x20the\x20following\x20data\x20for\x20'+_0x553180+':');this['logger']['error']('\x20\x20\x20-\x20IP\x20Address');this['logger']['error']('\x20\x20\x20-\x20Hardware\x20Specification\x20(CPU/RAM)\x20for\x20HWID');this['logger']['error']('\x20\x20\x20-\x20Bot\x20Configuration');this['logger']['error']('');this['logger']['error']('👉\x20HOW\x20TO\x20FIX:');this['logger']['error']('\x20\x20\x20Open\x20your\x20\x22kythia.config.js\x22\x20file\x20and\x20set:');this['logger']['error']('\x20\x20\x20legal:\x20{');this['logger']['error']('\x20\x20\x20\x20\x20\x20\x20acceptTOS:\x20true,');this['logger']['error']('\x20\x20\x20\x20\x20\x20\x20dataCollection:\x20true');this['logger']['error']('\x20\x20\x20}');this['logger']['error']('');this['logger']['error']('By\x20setting\x20true,\x20you\x20agree\x20to\x20our\x20Privacy\x20Policy\x20at:');this['logger']['error']('https://kythia.my.id/privacy');this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');process['exit'](0x1*0xb47+-0x8*0x260+0x7ba);}if(this['kythiaConfig']['sentry']?.['dsn']){Sentry['init']({'dsn':this['kythiaConfig']['sentry']['dsn'],'tracesSampleRate':this['kythiaConfig']['sentry']['tracesSampleRate']??(this['kythiaConfig']['env']==='development'?-0x137a*0x1+0x1074+0x5*0x9b:0x4*0x1cc+-0x1303+0x3f1*0x3+0.01),'profilesSampleRate':this['kythiaConfig']['sentry']['profilesSampleRate']??(this['kythiaConfig']['env']==='development'?0x31*-0xb3+-0x102e*-0x1+0x1216:0x1*-0x1248+-0xd3*0xf+0x621*0x5+0.01)});this['logger']['info']('✔️\x20\x20Sentry\x20Error\x20Tracking\x20is\x20ACTIVE');}else{this['logger']['warn']('🟠\x20Sentry\x20DSN\x20not\x20found\x20in\x20config.\x20Error\x20tracking\x20is\x20INACTIVE.');}this['_checkRequiredConfig']();const _0x5033be=this['engine'];const _0x574ee4=Object['getOwnPropertyDescriptor'](Object['getPrototypeOf'](_0x5033be),'ignite');const _0xdd31c=_0x574ee4?.['value'];const _0x2bb441=_0xdd31c?await _0xdd31c['call'](_0x5033be):await _0x5033be['ignite']();const _0x50106d=!!_0x2bb441;if(!_0x50106d){const _0x53a22f=['serv','ice','\x20','key']['join']('');const _0x345ef0=['act','ivat','ion']['join']('');const _0x5ddae6=this['engine']['getPortalUrl']();this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');this['logger']['error']('🚫\x20ACCESS\x20DENIED');this['logger']['error']('Your\x20'+_0x53a22f+'\x20is\x20missing,\x20invalid,\x20or\x20expired.');this['logger']['error']('Please\x20check\x20your\x20'+_0x53a22f+'\x20in\x20.env\x20or\x20contact\x20support\x20at:');this['logger']['error']('・\x20https://dsc.gg/kythia');this['logger']['error']('・\x20Manage\x20your\x20'+_0x345ef0+'\x20at\x20'+_0x5ddae6);this['logger']['error']('•─────────────────────────•°•❀•°•─────────────────────────•');await this['_terminateUnauthorizedProcess'](['auth','_fail']['join'](''));}if(_0x50106d){const _0x1fc8b0=this['engine']['getOwner']()??'-';const _0x2e7b23=this['engine']['getBoundClientId']()??'-';const _0x3ab4e5=this['engine']['getPortalUrl']()??'-';const _0x23be03=['serv','ice']['join']('');const _0x15f2f3=['act','ivat','ed']['join']('');this['logger']['info']('•─────────────────────────•°•❀•°•─────────────────────────•');this['logger']['info']('✅\x20'+_0x23be03+'\x20'+_0x15f2f3+'\x20successfully');this['logger']['info']('Owner\x20ID:\x20'+_0x1fc8b0);this['logger']['info']('Bot\x20ID:\x20'+_0x2e7b23);this['logger']['info']('Manage\x20your\x20'+_0x23be03+'\x20at\x20'+_0x3ab4e5);this['logger']['info']('•─────────────────────────•°•❀•°•─────────────────────────•');const _0x92de64=this['client']['shard']?.['ids'][0x25e8+0x31*0x25+-0x2cfd*0x1];if(_0x92de64===undefined){this['engine']['startPulse']();this['engine']['startAutoOptimization']();}else{this['logger']['info']('⏭️\x20\x20License\x20pulse\x20delegated\x20to\x20master\x20process\x20—\x20Shard\x20'+_0x92de64+'\x20is\x20a\x20read-only\x20client.');}setTimeout(()=>{this['_performHealthCheck']();},-0x1*0xaec1+0x50df+0xd312);this['engine']['report']('info','Bot\x20Process\x20Started\x20(v'+package_json_1['version']+')',{'node':process['version'],'platform':process['platform'],'cwd':process['cwd']()});const _0x3e7656=this['kythiaConfig']['api']?.['webhookErrorLogs']??(this['kythiaConfig']['settings']?.['webhookErrorLogs']===!![]?process.env.WEBHOOK_ERROR_LOGS:undefined);const _0x3fa904=this['kythiaConfig']['settings']?.['webhookLogFilter']??'warn,error';this['_webhookTransport']=(-0xab3+0x782+0x2b*0x13,DiscordWebhookTransport_1['attachWebhookTransport'])(this['logger'],_0x3e7656,undefined,_0x3fa904);if(this['_webhookTransport']){this['logger']['info']('📨\x20Discord\x20Webhook\x20Transport\x20attached\x20(filter:\x20'+_0x3fa904+').');}}try{const _0x48167a=!process['argv']['includes']('--dev');this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Translator\x20System\x20]•─────────•°•❀•°•─────────•');const _0x25ba03=node_path_1['default']['join'](__dirname,'lang');this['translator']['loadLocalesFromDir'](_0x25ba03);const _0x5031a4=node_path_1['default']['join'](this['appRoot'],'lang');this['translator']['loadLocalesFromDir'](_0x5031a4);this['container']['translator']=this['translator'];this['container']['t']=this['translator']['t']['bind'](this['translator']);this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Kythia\x20Addons\x20]•─────────•°•❀•°•─────────•');this['addonManager']=new AddonManager_1['default']({'client':this['client'],'container':this['container']});this['container']['addons']=this['addonManager'];const _0x23999d=await this['addonManager']['loadAddons'](this);this['client']['applicationCommandsData']=_0x23999d;this['queueManager']=new QueueManager_1['QueueManager'](this['container']);this['container']['queueManager']=this['queueManager'];this['queueManager']['init']();if(this['sequelize']){this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Connect\x20Database\x20]•─────────•°•❀•°•─────────•');await this['_connectDatabaseWithRetry']();await(-0xe01+-0x5db*-0x3+0x39*-0x10,KythiaMigrator_1['default'])({'sequelize':this['sequelize'],'container':this['container'],'logger':this['logger']});await(-0xcd8+0x187f+-0x13*0x9d,ModelLoader_1['default'])(this,this['sequelize']);this['logger']['info']('🪝\x20Attaching\x20Cache\x20Hooks...');KythiaModel_1['default']['attachHooksToAllModels'](this['sequelize'],this['client']);}else{this['logger']['warn']('⚠️\x20Sequelize\x20instance\x20not\x20provided.\x20Skipping\x20database\x20initialization.');}const _0x5be328=this['addonManager']['getHandlers']();this['eventManager']=new EventManager_1['default']({'client':this['client'],'container':this['container'],'eventHandlers':_0x5be328['eventHandlers']});this['eventManager']['initialize']();this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Middleware\x20]•─────────•°•❀•°•─────────•');const _0x439393=new MiddlewareManager_1['default']({'container':this['container']});await _0x439393['loadMiddlewares']();this['container']['middlewareManager']=_0x439393;this['interactionManager']=new InteractionManager_1['InteractionManager']({'client':this['client'],'container':this['container'],'handlers':_0x5be328});this['interactionManager']['initialize']();this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Deploy\x20Commands\x20]•─────────•°•❀•°•─────────•');const _0x54b446=this['client']['shard']?.['ids'][0xe4c+0x6a+-0xe*0x10d];const _0xee4ace=_0x54b446===undefined||_0x54b446===-0x1935+-0x62*-0x36+0x489;if(_0x48167a&&_0xee4ace){await this['_deployCommands'](_0x23999d);}else if(_0x48167a&&!_0xee4ace){this['logger']['info']('⏭️\x20\x20Skipping\x20command\x20deployment\x20on\x20Shard\x20'+_0x54b446+'\x20—\x20only\x20Shard\x200\x20deploys.');}else{this['logger']['info']('⏭️\x20\x20Skipping\x20command\x20deployment\x20because\x20--dev\x20flag\x20is\x20present.');}this['shutdownManager']=new ShutdownManager_1['ShutdownManager']({'client':this['client'],'container':this['container']});this['container']['shutdownManager']=this['shutdownManager'];this['shutdownManager']['initialize']();this['client']['rest']['on']('rateLimited',_0x1494d0=>{this['logger']['warn']('⏱️\x20REST\x20Rate\x20Limited:\x20'+_0x1494d0['method']+'\x20'+_0x1494d0['route']+'\x20'+('—\x20retry\x20in\x20'+_0x1494d0['timeToReset']+'ms')+(''+(_0x1494d0['global']?'\x20(GLOBAL)':'')));});this['client']['rest']['on']('invalidRequestWarning',_0x24e3fa=>{this['logger']['error']('🚨\x20Invalid\x20Request\x20Warning:\x20'+_0x24e3fa['count']+'\x20invalid\x20requests\x20'+('—\x20'+_0x24e3fa['remainingTime']+'ms\x20until\x20counter\x20resets.\x20')+'Consider\x20slowing\x20down\x20API\x20calls\x20to\x20avoid\x20a\x20temporary\x20ban.');});this['logger']['info']('•─────────•°•❀•°•─────────•[\x20Systems\x20Initializing\x20]•─────────•°•❀•°•─────────•');this['client']['once']('clientReady',async _0x5e86b2=>{this['logger']['info']('🌸\x20Logged\x20in\x20as\x20'+this['client']['user']?.['tag']);this['logger']['info']('🔗\x20Invite\x20link\x20'+this['kythiaConfig']['settings']['inviteLink']);this['engine']['report']('info','Bot\x20Client\x20Ready:\x20'+_0x5e86b2['user']?.['tag'],{'guilds':_0x5e86b2['guilds']['cache']['size'],'users':_0x5e86b2['users']['cache']['size']});if(this['_webhookTransport']){this['_webhookTransport']['setClient'](this['client']);}this['shutdownManager']['sendStartupWebhook']()['catch'](()=>{});const _0x5395a3=_0x5e86b2['shard']?.['ids'][-0x1*-0x1e53+-0x8d*-0x16+0x35*-0xcd];const _0x2248d6=_0x5395a3===undefined||_0x5395a3===-0x3*0x45f+-0x1ab2+0x27cf;const _0x5f5bdf=_0x2248d6?await this['engine']['fetchAnnouncement']():null;if(_0x5f5bdf){const _0x3c7374={'event':0x57f287,'update':0x3498db,'warning':0xfee75c,'maintenance':0xed4245};for(const _0x1a5b75 of _0x5f5bdf){if(_0x1a5b75['send_dm_to_owner']){const _0x1b1652=this['kythiaConfig']['owner']['ids'];const _0x3d3deb=Array['isArray'](_0x1b1652)?_0x1b1652:String(_0x1b1652)['split'](',')['map'](_0x108ece=>_0x108ece['trim']())['filter'](Boolean);const _0x4acf8d=_0x3c7374[_0x1a5b75['type']]||-0x204c+0x818+-0x1933*-0x1;const _0x53de43=new discord_js_1['ContainerBuilder']()['setAccentColor'](_0x4acf8d)['addTextDisplayComponents'](new discord_js_1['TextDisplayBuilder']()['setContent']('##\x20'+_0x1a5b75['title']))['addSeparatorComponents'](new discord_js_1['SeparatorBuilder']()['setSpacing'](discord_js_1['SeparatorSpacingSize']['Small'])['setDivider'](!![]))['addSectionComponents'](new discord_js_1['SectionBuilder']()['addTextDisplayComponents'](new discord_js_1['TextDisplayBuilder']()['setContent'](''+_0x1a5b75['message']))['setThumbnailAccessory'](new discord_js_1['ThumbnailBuilder']()['setURL']('https://github.com/kenndeclouv.png')['setDescription']('kenndeclouv\x20profile\x20picture')))['addSeparatorComponents'](new discord_js_1['SeparatorBuilder']()['setSpacing'](discord_js_1['SeparatorSpacingSize']['Small'])['setDivider'](!![]))['addTextDisplayComponents'](new discord_js_1['TextDisplayBuilder']()['setContent']('-#\x20Message\x20from\x20kenndeclouv'));for(const _0x53a47d of _0x3d3deb){try{const _0x20af2b=await _0x5e86b2['users']['fetch'](_0x53a47d);await _0x20af2b['send']({'components':[_0x53de43],'flags':discord_js_1['MessageFlags']['IsComponentsV2']});}catch(_0x329e47){this['logger']['warn']('⚠️\x20Could\x20not\x20send\x20announcement\x20DM\x20to\x20owner\x20'+_0x53a47d);}}}}}this['logger']['info']('🚀\x20Executing\x20'+this['clientReadyHooks']['length']+'\x20client-ready\x20hooks...');for(const _0x4d58ef of this['clientReadyHooks']){try{await _0x4d58ef(this['container']);}catch(_0x57ee8e){this['logger']['error']('Failed\x20to\x20execute\x20a\x20client-ready\x20hook:',_0x57ee8e);}}});await this['client']['login'](this['kythiaConfig']['bot']['token']);}catch(_0x25f4e9){this['logger']['error']('❌\x20Kythia\x20initialization\x20failed:',_0x25f4e9);try{await this['engine']['report']('error','Startup\x20Fatal\x20Crash',{'stack':_0x25f4e9});}catch(_0x285c28){}if(this['kythiaConfig']['sentry']?.['dsn']){Sentry['captureException'](_0x25f4e9);}process['exit'](-0x1d62+0xd*0x191+0x906);}}async['_connectDatabaseWithRetry'](_0x443123=0x5e7+-0x50c*0x1+0x1*-0xd6,_0x45342a=0x44c+-0x6b*-0x59+-0x15f7){if(!this['sequelize'])return;for(let _0x2f4753=-0x1e50+-0xa74+0xa31*0x4;_0x2f4753<_0x443123;_0x2f4753++){try{await this['sequelize']['authenticate']();this['logger']['info']('✅\x20Database\x20connection\x20established\x20successfully.');return;}catch(_0x3424b6){const _0x11b090=_0x2f4753===_0x443123-(-0x39a*0x4+-0x1915+0x1*0x277e);this['logger']['warn']('⚠️\x20\x20Database\x20connection\x20failed\x20(Attempt\x20'+(_0x2f4753+(-0x3*-0x1a5+0x882+-0x2*0x6b8))+'/'+_0x443123+').\x20'+(_0x11b090?'Giving\x20up.':'Retrying\x20in\x20'+_0x45342a/(0x423*-0x7+0x1d*-0x89+0x3062)+'s...'));if(!_0x11b090){this['logger']['warn']('\x20\x20\x20Error:\x20'+_0x3424b6['message']);}else{this['logger']['error']('❌\x20Final\x20Database\x20Connection\x20Error:',_0x3424b6);throw _0x3424b6;}await new Promise(_0x299bcd=>setTimeout(_0x299bcd,_0x45342a));}}}}exports['default']=Kythia;
@@ -1 +1 @@
1
- 'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]});exports['createCommand']=createCommand;const commander_1=require('commander');class Command{['register'](_0x302115){const _0x22d8c3=_0x302115['command'](this['signature'])['description'](this['description']);this['configure'](_0x22d8c3);_0x22d8c3['action']((..._0x9a4b04)=>{const _0x16f7ce=_0x9a4b04[0x106+-0x2bc*0x9+0x1796]||{};void this['handle'](_0x16f7ce,..._0x9a4b04['slice'](0xa6b*0x1+-0xae5*0x2+-0x38*-0x34));});}['configure'](_0x18cb6e){}}exports['default']=Command;function createCommand(_0x10e459,_0x5647cf,_0x4b04ce){const _0x34cad4=new commander_1['Command'](_0x10e459);_0x34cad4['description'](_0x5647cf);_0x34cad4['action']((..._0x2a86d0)=>{const _0x384266=_0x4b04ce(..._0x2a86d0);if(_0x384266 instanceof Promise){_0x384266['catch'](_0x211074=>{console['error']('Command\x20failed:',_0x211074);process['exit'](0x1769+-0x6a8+-0x40*0x43);});}});return _0x34cad4;}
1
+ 'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]});exports['createCommand']=createCommand;const commander_1=require('commander');class Command{['register'](_0x569acc){const _0x14a1f4=_0x569acc['command'](this['signature'])['description'](this['description']);this['configure'](_0x14a1f4);_0x14a1f4['action']((..._0x2e8fc7)=>{const _0x26d117=_0x2e8fc7[0x6*0x2cb+-0x1da3+0x3*0x44b]||{};void this['handle'](_0x26d117,..._0x2e8fc7['slice'](-0x4c+0x2a*-0x8d+-0x7*-0x359));});}['configure'](_0x46a965){}}exports['default']=Command;function createCommand(_0x12aa34,_0x32f3a3,_0x34f85e){const _0x4c1051=new commander_1['Command'](_0x12aa34);_0x4c1051['description'](_0x32f3a3);_0x4c1051['action']((..._0x1c395a)=>{const _0x45f886=_0x34f85e(..._0x1c395a);if(_0x45f886 instanceof Promise){_0x45f886['catch'](_0x199bc1=>{console['error']('Command\x20failed:',_0x199bc1);process['exit'](-0x1*0x15eb+-0x7*-0x18f+0xb03);});}});return _0x4c1051;}
@@ -1 +1 @@
1
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x22304e){return _0x22304e&&_0x22304e['__esModule']?_0x22304e:{'default':_0x22304e};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const package_json_1=__importDefault(require('../../../package.json'));const Command_1=__importDefault(require('../Command'));const picocolors_1=__importDefault(require('picocolors'));const figlet_1=__importDefault(require('figlet'));const node_os_1=__importDefault(require('node:os'));class AboutCommand extends Command_1['default']{['signature']='about';['description']='Display\x20system\x20architecture\x20and\x20runtime\x20telemetry';async['handle'](){const _0x517146=(_0x1009a5,_0xcc49b5)=>new Promise((_0x43e853,_0x150260)=>{figlet_1['default']['text'](_0x1009a5,_0xcc49b5,(_0x40a9d8,_0x13668f)=>{if(_0x40a9d8){_0x150260(_0x40a9d8);}else{_0x43e853(_0x13668f||'');}});});const _0x2a4e5f=await _0x517146('KYTHIA',{'font':'ANSI\x20Shadow','horizontalLayout':'full','verticalLayout':'full'});console['log']('');console['log'](picocolors_1['default']['cyan'](_0x2a4e5f));console['log'](picocolors_1['default']['bold'](picocolors_1['default']['white']('\x20A\x20MODULAR\x20ORCHESTRATION\x20ENGINE')));console['log'](picocolors_1['default']['dim']('\x20\x20\x20\x20\x20\x20\x20\x20•─────────•°•❀•°•─────────•°•❀•°•─────────•°•❀•°•─────────•'));console['log'](picocolors_1['default']['gray']('\x20Kythia\x20is\x20an\x20advanced,\x20high-performance\x20automation\x20framework\x20designed\x0a'+'\x20for\x20seamless\x20Discord\x20integration.\x20Built\x20on\x20a\x20reactive\x20event-driven\x0a'+'\x20architecture,\x20it\x20bridges\x20the\x20gap\x20between\x20raw\x20efficiency\x20and\x20developer\x0a'+'\x20experience.\x20Featuring\x20dynamic\x20addon\x20injection,\x20smart\x20resource\x20governance,\x0a'+'\x20and\x20a\x20robust\x20ORM\x20layer\x20for\x20scalable\x20data\x20management.'));console['log'](picocolors_1['default']['dim']('\x20\x20\x20\x20\x20\x20\x20\x20•─────────•°•❀•°•─────────•°•❀•°•─────────•°•❀•°•─────────•\x0a'));const _0x3fce66=(_0x53ac75,_0x44ef31=-0xa36+0x3e6*0x4+-0x552*0x1)=>_0x53ac75['padEnd'](_0x44ef31);const _0x1ff5fa=package_json_1['default']['version'];console['log'](picocolors_1['default']['cyan']('\x20⚙️\x20\x20SYSTEM\x20METADATA'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['blue']('●')+'\x20'+_0x3fce66('Version')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['green'](_0x1ff5fa));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['blue']('●')+'\x20'+_0x3fce66('Engineered')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['white']('kenndeclouv'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['blue']('●')+'\x20'+_0x3fce66('Assistants')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['magenta']('graa\x20&\x20chaa'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['blue']('●')+'\x20'+_0x3fce66('License')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['dim']('CC\x20BY-NC\x204.0'));console['log']('');console['log'](picocolors_1['default']['cyan']('\x20🎯\x20CORE\x20FEATURES'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Modular\x20Addon\x20System\x20\x20\x20\x20\x20\x20-\x20Dynamic\x20feature\x20loading');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Dependency\x20Injection\x20\x20\x20\x20\x20\x20-\x20Advanced\x20IoC\x20container');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Database\x20Abstraction\x20\x20\x20\x20\x20\x20-\x20SQLite,\x20MySQL,\x20PostgreSQL');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20i18n\x20Support\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Multi-language\x20translations');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Middleware\x20Pipeline\x20\x20\x20\x20\x20\x20\x20-\x20Request\x20processing\x20&\x20validation');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Event\x20Management\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Sophisticated\x20event\x20routing');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Interaction\x20Handlers\x20\x20\x20\x20\x20\x20-\x20Commands,\x20buttons,\x20modals,\x20menus');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Telemetry\x20&\x20Monitoring\x20\x20\x20\x20-\x20Built-in\x20observability');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Redis\x20Caching\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Performance\x20optimization');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Graceful\x20Shutdown\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Safe\x20process\x20termination');console['log']('');console['log'](picocolors_1['default']['magenta']('\x20🏗️\x20\x20ARCHITECTURE\x20COMPONENTS'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20AddonManager\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Dynamic\x20module\x20orchestration');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20InteractionManager\x20\x20\x20\x20\x20\x20\x20-\x20Discord\x20interaction\x20routing');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20EventManager\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Gateway\x20event\x20distribution');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20TranslatorManager\x20\x20\x20\x20\x20\x20\x20\x20-\x20Locale\x20&\x20i18n\x20handling');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20MiddlewareManager\x20\x20\x20\x20\x20\x20\x20\x20-\x20Request\x20preprocessing\x20pipeline');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20KythiaEngine\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Runtime\x20optimization\x20&\x20metrics');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20ShutdownManager\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Process\x20lifecycle\x20governance');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('╰┈➤')+'\x20KythiaMigrator\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Database\x20schema\x20migration');console['log']('');console['log'](picocolors_1['default']['yellow']('\x20🗄️\x20\x20DATABASE\x20SUPPORT'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20SQLite\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Lightweight,\x20zero-config\x20(default)');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20MySQL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Production-ready\x20relational\x20DB');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20PostgreSQL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Advanced\x20features\x20&\x20scalability');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20Sequelize\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Powerful\x20ORM\x20with\x20migrations');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20KythiaModel\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Enhanced\x20base\x20model\x20with\x20caching');console['log']('');console['log'](picocolors_1['default']['blue']('\x20🔧\x20TECHNOLOGY\x20STACK'));console['log']('\x20\x20\x20\x20'+_0x3fce66('Runtime')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Node.js\x20'+process['version']);console['log']('\x20\x20\x20\x20'+_0x3fce66('Language')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20TypeScript\x20(ES2020+)');console['log']('\x20\x20\x20\x20'+_0x3fce66('Discord\x20Client')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20discord.js\x20v14');console['log']('\x20\x20\x20\x20'+_0x3fce66('ORM')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Sequelize');console['log']('\x20\x20\x20\x20'+_0x3fce66('Cache')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Redis\x20(optional)');console['log']('\x20\x20\x20\x20'+_0x3fce66('Error\x20Tracking')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Sentry\x20(optional)');console['log']('\x20\x20\x20\x20'+_0x3fce66('CLI\x20Framework')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Custom\x20Commander-based');console['log']('');const _0x372ffc=(process['uptime']()/(0x1*-0x2423+0x1*-0x2b+0x248a))['toFixed'](-0x521*0x4+-0x1c5a+0x30e0);const _0x1f43f2=(process['memoryUsage']()['rss']/(-0xfdf+0x1d0*-0x15+0x39ef)/(0x101*-0xd+0x55*0x2+0x1063))['toFixed'](-0x7*0x570+0x214f+0x4c3);const _0x1d324a=(process['memoryUsage']()['heapUsed']/(0x262b+-0x264b*0x1+0x420)/(-0x1001*0x1+-0x15ce+-0x29cf*-0x1))['toFixed'](-0x397*-0x8+-0xb47*0x1+0x1*-0x116f);const _0x28fa4a=(process['memoryUsage']()['heapTotal']/(-0x6*-0x24a+-0x27a*0x4+0x2c)/(-0x3e5*0x5+-0x1674+0x2ded))['toFixed'](0xd97*0x1+-0x1*-0x158f+0x2324*-0x1);console['log'](picocolors_1['default']['green']('\x20📊\x20RUNTIME\x20TELEMETRY'));console['log']('\x20\x20\x20\x20'+_0x3fce66('OS\x20Platform')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+node_os_1['default']['type']()+'\x20'+node_os_1['default']['release']()+'\x20('+node_os_1['default']['arch']()+')');console['log']('\x20\x20\x20\x20'+_0x3fce66('CPU\x20Cores')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+node_os_1['default']['cpus']()['length']+'\x20cores');console['log']('\x20\x20\x20\x20'+_0x3fce66('Total\x20Memory')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+(node_os_1['default']['totalmem']()/(-0x89*-0x13+-0x1e*0x27+-0x199)/(0x14e9+0x179f*0x1+-0x2888)/(0x1bab+0x13a7*0x1+-0x2b52))['toFixed'](-0x22d6+0x227*0x1+-0x1*-0x20b1)+'\x20GB');console['log']('\x20\x20\x20\x20'+_0x3fce66('Free\x20Memory')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+(node_os_1['default']['freemem']()/(0x2185+0x2279+-0x3ffe)/(-0x1*0x23b1+-0x192b*0x1+0x40dc)/(-0x15c8+0x5cc+0x13fc))['toFixed'](-0x13*0x103+-0x4b*0x1+0x1386)+'\x20GB');console['log']('\x20\x20\x20\x20'+_0x3fce66('Process\x20RSS')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+_0x1f43f2+'\x20MB');console['log']('\x20\x20\x20\x20'+_0x3fce66('Heap\x20Used')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+_0x1d324a+'\x20MB\x20/\x20'+_0x28fa4a+'\x20MB');console['log']('\x20\x20\x20\x20'+_0x3fce66('Process\x20PID')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+process['pid']);console['log']('\x20\x20\x20\x20'+_0x3fce66('Session\x20Time')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+_0x372ffc+'\x20min');console['log']('\x20\x20\x20\x20'+_0x3fce66('Working\x20Dir')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+process['cwd']());console['log']('');console['log'](picocolors_1['default']['cyan']('\x20🌐\x20COMMUNITY\x20&\x20RESOURCES'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20Website\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('https://kythia.my.id'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20Discord\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('https://dsc.gg/kythia'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20GitHub\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('https://github.com/kythia/kythia'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20Documentation\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('https://docs.kythia.my.id'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20Support\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('kythiadev@gmail.com'));console['log']('');console['log'](picocolors_1['default']['dim']('\x20\x20\x20\x20\x20\x20\x20\x20•─────────•°•❀•°•─────────•°•❀•°•─────────•°•❀•°•─────────•'));console['log'](picocolors_1['default']['yellow']('\x20⚡\x20Built\x20for\x20scale.\x20Designed\x20for\x20developers.\x20Powered\x20by\x20passion.'));console['log'](picocolors_1['default']['dim']('\x20\x20\x20\x20\x20\x20\x20\x20•─────────•°•❀•°•─────────•°•❀•°•─────────•°•❀•°•─────────•\x0a'));}}exports['default']=AboutCommand;
1
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x1cf275){return _0x1cf275&&_0x1cf275['__esModule']?_0x1cf275:{'default':_0x1cf275};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const package_json_1=__importDefault(require('../../../package.json'));const Command_1=__importDefault(require('../Command'));const picocolors_1=__importDefault(require('picocolors'));const figlet_1=__importDefault(require('figlet'));const node_os_1=__importDefault(require('node:os'));class AboutCommand extends Command_1['default']{['signature']='about';['description']='Display\x20system\x20architecture\x20and\x20runtime\x20telemetry';async['handle'](){const _0x4769e6=(_0x4a6c64,_0x30e26b)=>new Promise((_0x463991,_0x49e3f1)=>{figlet_1['default']['text'](_0x4a6c64,_0x30e26b,(_0x159b3a,_0x29e2bc)=>{if(_0x159b3a){_0x49e3f1(_0x159b3a);}else{_0x463991(_0x29e2bc||'');}});});const _0x83e98f=await _0x4769e6('KYTHIA',{'font':'ANSI\x20Shadow','horizontalLayout':'full','verticalLayout':'full'});console['log']('');console['log'](picocolors_1['default']['cyan'](_0x83e98f));console['log'](picocolors_1['default']['bold'](picocolors_1['default']['white']('\x20A\x20MODULAR\x20ORCHESTRATION\x20ENGINE')));console['log'](picocolors_1['default']['dim']('\x20\x20\x20\x20\x20\x20\x20\x20•─────────•°•❀•°•─────────•°•❀•°•─────────•°•❀•°•─────────•'));console['log'](picocolors_1['default']['gray']('\x20Kythia\x20is\x20an\x20advanced,\x20high-performance\x20automation\x20framework\x20designed\x0a'+'\x20for\x20seamless\x20Discord\x20integration.\x20Built\x20on\x20a\x20reactive\x20event-driven\x0a'+'\x20architecture,\x20it\x20bridges\x20the\x20gap\x20between\x20raw\x20efficiency\x20and\x20developer\x0a'+'\x20experience.\x20Featuring\x20dynamic\x20addon\x20injection,\x20smart\x20resource\x20governance,\x0a'+'\x20and\x20a\x20robust\x20ORM\x20layer\x20for\x20scalable\x20data\x20management.'));console['log'](picocolors_1['default']['dim']('\x20\x20\x20\x20\x20\x20\x20\x20•─────────•°•❀•°•─────────•°•❀•°•─────────•°•❀•°•─────────•\x0a'));const _0x17b1d7=(_0x2ea30b,_0xa07450=-0x6*0xbf+-0x7f*-0x5+0x20f)=>_0x2ea30b['padEnd'](_0xa07450);const _0x3b879e=package_json_1['default']['version'];console['log'](picocolors_1['default']['cyan']('\x20⚙️\x20\x20SYSTEM\x20METADATA'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['blue']('●')+'\x20'+_0x17b1d7('Version')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['green'](_0x3b879e));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['blue']('●')+'\x20'+_0x17b1d7('Engineered')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['white']('kenndeclouv'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['blue']('●')+'\x20'+_0x17b1d7('Assistants')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['magenta']('graa\x20&\x20chaa'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['blue']('●')+'\x20'+_0x17b1d7('License')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['dim']('CC\x20BY-NC\x204.0'));console['log']('');console['log'](picocolors_1['default']['cyan']('\x20🎯\x20CORE\x20FEATURES'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Modular\x20Addon\x20System\x20\x20\x20\x20\x20\x20-\x20Dynamic\x20feature\x20loading');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Dependency\x20Injection\x20\x20\x20\x20\x20\x20-\x20Advanced\x20IoC\x20container');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Database\x20Abstraction\x20\x20\x20\x20\x20\x20-\x20SQLite,\x20MySQL,\x20PostgreSQL');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20i18n\x20Support\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Multi-language\x20translations');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Middleware\x20Pipeline\x20\x20\x20\x20\x20\x20\x20-\x20Request\x20processing\x20&\x20validation');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Event\x20Management\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Sophisticated\x20event\x20routing');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Interaction\x20Handlers\x20\x20\x20\x20\x20\x20-\x20Commands,\x20buttons,\x20modals,\x20menus');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Telemetry\x20&\x20Monitoring\x20\x20\x20\x20-\x20Built-in\x20observability');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Redis\x20Caching\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Performance\x20optimization');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['green']('✓')+'\x20Graceful\x20Shutdown\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Safe\x20process\x20termination');console['log']('');console['log'](picocolors_1['default']['magenta']('\x20🏗️\x20\x20ARCHITECTURE\x20COMPONENTS'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20AddonManager\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Dynamic\x20module\x20orchestration');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20InteractionManager\x20\x20\x20\x20\x20\x20\x20-\x20Discord\x20interaction\x20routing');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20EventManager\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Gateway\x20event\x20distribution');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20TranslatorManager\x20\x20\x20\x20\x20\x20\x20\x20-\x20Locale\x20&\x20i18n\x20handling');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20MiddlewareManager\x20\x20\x20\x20\x20\x20\x20\x20-\x20Request\x20preprocessing\x20pipeline');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20KythiaEngine\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Runtime\x20optimization\x20&\x20metrics');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('├─')+'\x20ShutdownManager\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Process\x20lifecycle\x20governance');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('╰┈➤')+'\x20KythiaMigrator\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Database\x20schema\x20migration');console['log']('');console['log'](picocolors_1['default']['yellow']('\x20🗄️\x20\x20DATABASE\x20SUPPORT'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20SQLite\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Lightweight,\x20zero-config\x20(default)');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20MySQL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Production-ready\x20relational\x20DB');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20PostgreSQL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Advanced\x20features\x20&\x20scalability');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20Sequelize\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Powerful\x20ORM\x20with\x20migrations');console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('•')+'\x20KythiaModel\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Enhanced\x20base\x20model\x20with\x20caching');console['log']('');console['log'](picocolors_1['default']['blue']('\x20🔧\x20TECHNOLOGY\x20STACK'));console['log']('\x20\x20\x20\x20'+_0x17b1d7('Runtime')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Node.js\x20'+process['version']);console['log']('\x20\x20\x20\x20'+_0x17b1d7('Language')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20TypeScript\x20(ES2020+)');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Discord\x20Client')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20discord.js\x20v14');console['log']('\x20\x20\x20\x20'+_0x17b1d7('ORM')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Sequelize');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Cache')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Redis\x20(optional)');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Error\x20Tracking')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Sentry\x20(optional)');console['log']('\x20\x20\x20\x20'+_0x17b1d7('CLI\x20Framework')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20Custom\x20Commander-based');console['log']('');const _0xc9ea8=(process['uptime']()/(0x4d9*0x1+0x199+0x6*-0x109))['toFixed'](0xef4+0x1*0x1dc3+-0x1*0x2cb5);const _0x5239c0=(process['memoryUsage']()['rss']/(-0xde+-0x8*-0x11c+-0x402)/(-0x9ae+-0x8*-0x280+-0x1*0x652))['toFixed'](0x1ba2+-0xf*-0x3e+-0x1*0x1f42);const _0x76e605=(process['memoryUsage']()['heapUsed']/(0x262c+-0x1a95*0x1+-0x797)/(0x10bd+0x1b4e+-0x280b))['toFixed'](0x35*-0x6+-0x4*0x4b2+0x1408*0x1);const _0x2846c4=(process['memoryUsage']()['heapTotal']/(0x106c+-0x91+0x5*-0x25f)/(0x4*0x2b0+0xd74+-0x1af*0xc))['toFixed'](0x463*0x3+0x172d+-0x2454);console['log'](picocolors_1['default']['green']('\x20📊\x20RUNTIME\x20TELEMETRY'));console['log']('\x20\x20\x20\x20'+_0x17b1d7('OS\x20Platform')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+node_os_1['default']['type']()+'\x20'+node_os_1['default']['release']()+'\x20('+node_os_1['default']['arch']()+')');console['log']('\x20\x20\x20\x20'+_0x17b1d7('CPU\x20Cores')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+node_os_1['default']['cpus']()['length']+'\x20cores');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Total\x20Memory')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+(node_os_1['default']['totalmem']()/(0xcd7*0x2+0x2015*0x1+-0x35c3)/(-0x43*0x59+-0xcf*-0x16+-0x981*-0x1)/(-0x1f3e+0x1*-0x2029+0x4367))['toFixed'](-0x8*-0x71+-0x23c+-0x6*0x37)+'\x20GB');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Free\x20Memory')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+(node_os_1['default']['freemem']()/(-0x711+-0x1*0x1ad4+0x25e5)/(0xe*-0x1b5+-0x51*-0x5d+0x11*-0x17)/(0x19*-0x141+0x5*-0x5fc+0x4145))['toFixed'](0xd*-0xa7+0xb67+-0x2ea)+'\x20GB');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Process\x20RSS')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+_0x5239c0+'\x20MB');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Heap\x20Used')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+_0x76e605+'\x20MB\x20/\x20'+_0x2846c4+'\x20MB');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Process\x20PID')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+process['pid']);console['log']('\x20\x20\x20\x20'+_0x17b1d7('Session\x20Time')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+_0xc9ea8+'\x20min');console['log']('\x20\x20\x20\x20'+_0x17b1d7('Working\x20Dir')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+process['cwd']());console['log']('');console['log'](picocolors_1['default']['cyan']('\x20🌐\x20COMMUNITY\x20&\x20RESOURCES'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20Website\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('https://kythia.my.id'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20Discord\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('https://dsc.gg/kythia'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20GitHub\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('https://github.com/kythia/kythia'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20Documentation\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('https://docs.kythia.my.id'));console['log']('\x20\x20\x20\x20'+picocolors_1['default']['dim']('●')+'\x20Support\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20:\x20'+picocolors_1['default']['underline']('kythiadev@gmail.com'));console['log']('');console['log'](picocolors_1['default']['dim']('\x20\x20\x20\x20\x20\x20\x20\x20•─────────•°•❀•°•─────────•°•❀•°•─────────•°•❀•°•─────────•'));console['log'](picocolors_1['default']['yellow']('\x20⚡\x20Built\x20for\x20scale.\x20Designed\x20for\x20developers.\x20Powered\x20by\x20passion.'));console['log'](picocolors_1['default']['dim']('\x20\x20\x20\x20\x20\x20\x20\x20•─────────•°•❀•°•─────────•°•❀•°•─────────•°•❀•°•─────────•\x0a'));}}exports['default']=AboutCommand;
@@ -1 +1 @@
1
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x4855b3){return _0x4855b3&&_0x4855b3['__esModule']?_0x4855b3:{'default':_0x4855b3};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const dotenvx_1=require('@dotenvx/dotenvx');const node_readline_1=__importDefault(require('node:readline'));const Command_1=__importDefault(require('../Command'));const picocolors_1=__importDefault(require('picocolors'));const ioredis_1=__importDefault(require('ioredis'));(-0x25a2+-0x221f+0x17eb*0x3,dotenvx_1['config'])({'quiet':!![]});function askQuestion(_0x311641){const _0x584df5=node_readline_1['default']['createInterface']({'input':process['stdin'],'output':process['stdout']});return new Promise(_0x8fd63a=>_0x584df5['question'](_0x311641,_0x22ff3d=>{_0x584df5['close']();_0x8fd63a(_0x22ff3d);}));}class CacheClearCommand extends Command_1['default']{['signature']='cache:clear';['description']='Flush\x20Redis\x20cache\x20(supports\x20multi-instance\x20selection)';async['handle'](){console['log'](picocolors_1['default']['dim']('🔍\x20Detecting\x20Redis\x20configuration...'));const _0x554d1e=process.env.REDIS_URLS;if(!_0x554d1e){console['error'](picocolors_1['default']['red']('❌\x20REDIS_URLS\x20not\x20found\x20in\x20.env'));process['exit'](-0x39c+0x15b9+-0x121c);}const _0x493e3c=_0x554d1e['split'](',')['map'](_0x54cac0=>_0x54cac0['trim']())['filter'](_0x2a46bc=>_0x2a46bc['length']>-0x1423+0x1f82+-0xb5f);if(_0x493e3c['length']===-0x203+-0x13*0x20b+-0x6*-0x6ce){console['error'](picocolors_1['default']['red']('❌\x20No\x20valid\x20Redis\x20URLs\x20found.'));process['exit'](-0x17a8+-0x14f0*0x1+-0x7*-0x65f);}let _0x9f49d6=[];if(_0x493e3c['length']===0x254*-0xe+0xcef+0x13aa){_0x9f49d6=[_0x493e3c[-0xeef*0x1+0xa7*0x1a+-0x207*0x1]];console['log'](picocolors_1['default']['cyan']('🎯\x20Target:\x20'+_0x9f49d6[-0x1802+-0x1c36+-0x687*-0x8]));}else{console['log'](picocolors_1['default']['yellow']('⚠️\x20\x20Multiple\x20Redis\x20instances\x20detected\x20('+_0x493e3c['length']+'):'));console['log'](picocolors_1['default']['dim']('---------------------------------------------------'));console['log']('0.\x20'+picocolors_1['default']['bgRed'](picocolors_1['default']['white']('\x20FLUSH\x20ALL\x20INSTANCES\x20')));_0x493e3c['forEach']((_0x975e97,_0x17215a)=>{const _0x56cbb5=_0x975e97['replace'](/:([^@]+)@/,':****@');console['log'](_0x17215a+(-0x1861*0x1+0x58*0x20+0x23b*0x6)+'.\x20'+_0x56cbb5);});console['log'](picocolors_1['default']['dim']('---------------------------------------------------'));const _0x16d793=await askQuestion(picocolors_1['default']['cyan']('Select\x20target\x20to\x20flush\x20(number):\x20'));const _0x28464e=parseInt(_0x16d793,-0x248c+0x1ab7+0x7*0x169);if(Number['isNaN'](_0x28464e)||_0x28464e<-0x1afb*-0x1+-0x2037+0x53c||_0x28464e>_0x493e3c['length']){console['error'](picocolors_1['default']['red']('❌\x20Invalid\x20selection.'));process['exit'](0x1e99+-0x5a7*-0x6+-0x4082);}if(_0x28464e===-0x18fa+-0xbe7*0x2+-0x619*-0x8){_0x9f49d6=_0x493e3c;}else{_0x9f49d6=[_0x493e3c[_0x28464e-(0x28c+-0x427*-0x5+-0x174e)]];}}const _0x1c1b46=await askQuestion(picocolors_1['default']['bgRed'](picocolors_1['default']['white']('\x20DANGER\x20'))+picocolors_1['default']['yellow']('\x20Are\x20you\x20sure\x20you\x20want\x20to\x20FLUSHALL\x20'+_0x9f49d6['length']+'\x20instance(s)?\x20(y/n):\x20'));if(_0x1c1b46['toLowerCase']()!=='y'&&_0x1c1b46['toLowerCase']()!=='yes'){console['log'](picocolors_1['default']['cyan']('🛡️\x20\x20Operation\x20cancelled.'));process['exit'](-0x1e3e+-0x412*-0x3+0x1208);}console['log']('');for(const _0x34b4b4 of _0x9f49d6){const _0x556d15=_0x34b4b4['replace'](/:([^@]+)@/,':****@');try{console['log'](picocolors_1['default']['dim']('🔌\x20Connecting\x20to\x20'+_0x556d15+'...'));const _0x7aa92d=new ioredis_1['default'](_0x34b4b4,{'maxRetriesPerRequest':0x1,'retryStrategy':()=>null});await _0x7aa92d['flushall']();console['log'](picocolors_1['default']['green']('✅\x20FLUSHALL\x20Success:\x20'+_0x556d15));_0x7aa92d['quit']();}catch(_0x598c0d){const _0x3bfae3=_0x598c0d instanceof Error?_0x598c0d:new Error(String(_0x598c0d));console['error'](picocolors_1['default']['red']('❌\x20Failed\x20to\x20flush\x20cache:'),_0x3bfae3['message']);}}console['log'](picocolors_1['default']['green']('\x0a✨\x20Cache\x20clearing\x20process\x20completed.'));process['exit'](0x11f2+0x5ee*-0x1+0x602*-0x2);}}exports['default']=CacheClearCommand;
1
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x19ed48){return _0x19ed48&&_0x19ed48['__esModule']?_0x19ed48:{'default':_0x19ed48};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const dotenvx_1=require('@dotenvx/dotenvx');const node_readline_1=__importDefault(require('node:readline'));const Command_1=__importDefault(require('../Command'));const picocolors_1=__importDefault(require('picocolors'));const ioredis_1=__importDefault(require('ioredis'));(0x32d*0x1+-0x13*-0x8+0x5*-0xc1,dotenvx_1['config'])({'quiet':!![]});function askQuestion(_0x4e5a33){const _0x4d87e9=node_readline_1['default']['createInterface']({'input':process['stdin'],'output':process['stdout']});return new Promise(_0x1ee4ec=>_0x4d87e9['question'](_0x4e5a33,_0xd1c25c=>{_0x4d87e9['close']();_0x1ee4ec(_0xd1c25c);}));}class CacheClearCommand extends Command_1['default']{['signature']='cache:clear';['description']='Flush\x20Redis\x20cache\x20(supports\x20multi-instance\x20selection)';async['handle'](){console['log'](picocolors_1['default']['dim']('🔍\x20Detecting\x20Redis\x20configuration...'));const _0x1c8aff=process.env.REDIS_URLS;if(!_0x1c8aff){console['error'](picocolors_1['default']['red']('❌\x20REDIS_URLS\x20not\x20found\x20in\x20.env'));process['exit'](0x1cc6+0x13ac+-0x3071);}const _0x3484c5=_0x1c8aff['split'](',')['map'](_0x21b3ba=>_0x21b3ba['trim']())['filter'](_0x3a354c=>_0x3a354c['length']>0xd68+0x2278+-0x2fe0);if(_0x3484c5['length']===-0x47c+-0xd*0x27a+0x24ae){console['error'](picocolors_1['default']['red']('❌\x20No\x20valid\x20Redis\x20URLs\x20found.'));process['exit'](0x1*0xdae+-0x1c35+0xe88);}let _0x4904fe=[];if(_0x3484c5['length']===-0x1be3*-0x1+-0x1*-0x264a+0x16*-0x302){_0x4904fe=[_0x3484c5[-0x1*-0x2257+-0x2e*0x81+-0xb29]];console['log'](picocolors_1['default']['cyan']('🎯\x20Target:\x20'+_0x4904fe[-0xf4+0x2538+-0x2444]));}else{console['log'](picocolors_1['default']['yellow']('⚠️\x20\x20Multiple\x20Redis\x20instances\x20detected\x20('+_0x3484c5['length']+'):'));console['log'](picocolors_1['default']['dim']('---------------------------------------------------'));console['log']('0.\x20'+picocolors_1['default']['bgRed'](picocolors_1['default']['white']('\x20FLUSH\x20ALL\x20INSTANCES\x20')));_0x3484c5['forEach']((_0x509671,_0x58f8bb)=>{const _0x74ebaa=_0x509671['replace'](/:([^@]+)@/,':****@');console['log'](_0x58f8bb+(0x2480+0x9*0x114+-0x2e33)+'.\x20'+_0x74ebaa);});console['log'](picocolors_1['default']['dim']('---------------------------------------------------'));const _0x115e4d=await askQuestion(picocolors_1['default']['cyan']('Select\x20target\x20to\x20flush\x20(number):\x20'));const _0x426575=parseInt(_0x115e4d,-0xdb2*0x2+0x46e*0x3+0x712*0x2);if(Number['isNaN'](_0x426575)||_0x426575<0x3b*-0x9f+0x607*-0x3+0x3a6*0xf||_0x426575>_0x3484c5['length']){console['error'](picocolors_1['default']['red']('❌\x20Invalid\x20selection.'));process['exit'](-0x21df+0x277*-0x1+-0xc1d*-0x3);}if(_0x426575===-0x1f29+0x1be1+-0x8*-0x69){_0x4904fe=_0x3484c5;}else{_0x4904fe=[_0x3484c5[_0x426575-(0xa1f*-0x2+-0x541*0x5+-0x34*-0xe5)]];}}const _0x3e110d=await askQuestion(picocolors_1['default']['bgRed'](picocolors_1['default']['white']('\x20DANGER\x20'))+picocolors_1['default']['yellow']('\x20Are\x20you\x20sure\x20you\x20want\x20to\x20FLUSHALL\x20'+_0x4904fe['length']+'\x20instance(s)?\x20(y/n):\x20'));if(_0x3e110d['toLowerCase']()!=='y'&&_0x3e110d['toLowerCase']()!=='yes'){console['log'](picocolors_1['default']['cyan']('🛡️\x20\x20Operation\x20cancelled.'));process['exit'](0xc03+-0x1afa+0xef7);}console['log']('');for(const _0x30046e of _0x4904fe){const _0x274772=_0x30046e['replace'](/:([^@]+)@/,':****@');try{console['log'](picocolors_1['default']['dim']('🔌\x20Connecting\x20to\x20'+_0x274772+'...'));const _0x171440=new ioredis_1['default'](_0x30046e,{'maxRetriesPerRequest':0x1,'retryStrategy':()=>null});await _0x171440['flushall']();console['log'](picocolors_1['default']['green']('✅\x20FLUSHALL\x20Success:\x20'+_0x274772));_0x171440['quit']();}catch(_0x46e681){const _0x2a8cac=_0x46e681 instanceof Error?_0x46e681:new Error(String(_0x46e681));console['error'](picocolors_1['default']['red']('❌\x20Failed\x20to\x20flush\x20cache:'),_0x2a8cac['message']);}}console['log'](picocolors_1['default']['green']('\x0a✨\x20Cache\x20clearing\x20process\x20completed.'));process['exit'](-0xe9*-0x13+-0x13e5+-0x4a*-0x9);}}exports['default']=CacheClearCommand;
@@ -1 +1 @@
1
- 'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0xec2956,_0x5779a0,_0x31ddbe,_0x4766ec){if(_0x4766ec===undefined)_0x4766ec=_0x31ddbe;var _0x403a12=Object['getOwnPropertyDescriptor'](_0x5779a0,_0x31ddbe);if(!_0x403a12||('get'in _0x403a12?!_0x5779a0['__esModule']:_0x403a12['writable']||_0x403a12['configurable'])){_0x403a12={'enumerable':!![],'get':function(){return _0x5779a0[_0x31ddbe];}};}Object['defineProperty'](_0xec2956,_0x4766ec,_0x403a12);}:function(_0x326adc,_0x143428,_0x16d80d,_0x14083d){if(_0x14083d===undefined)_0x14083d=_0x16d80d;_0x326adc[_0x14083d]=_0x143428[_0x16d80d];});var __setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0xc3e8e7,_0x2c4991){Object['defineProperty'](_0xc3e8e7,'default',{'enumerable':!![],'value':_0x2c4991});}:function(_0x184354,_0x19292c){_0x184354['default']=_0x19292c;});var __importStar=this&&this['__importStar']||(function(){var _0x492960=function(_0x4cfa1e){_0x492960=Object['getOwnPropertyNames']||function(_0x285bf0){var _0x3e0b7c=[];for(var _0x4a6634 in _0x285bf0)if(Object['prototype']['hasOwnProperty']['call'](_0x285bf0,_0x4a6634))_0x3e0b7c[_0x3e0b7c['length']]=_0x4a6634;return _0x3e0b7c;};return _0x492960(_0x4cfa1e);};return function(_0x18ae26){if(_0x18ae26&&_0x18ae26['__esModule'])return _0x18ae26;var _0x29476d={};if(_0x18ae26!=null)for(var _0x542396=_0x492960(_0x18ae26),_0x30cf84=-0x1a52+0x1*0x1912+0x140;_0x30cf84<_0x542396['length'];_0x30cf84++)if(_0x542396[_0x30cf84]!=='default')__createBinding(_0x29476d,_0x18ae26,_0x542396[_0x30cf84]);__setModuleDefault(_0x29476d,_0x18ae26);return _0x29476d;};}());var __importDefault=this&&this['__importDefault']||function(_0x26881a){return _0x26881a&&_0x26881a['__esModule']?_0x26881a:{'default':_0x26881a};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const Command_1=__importDefault(require('../Command'));const node_fs_1=__importDefault(require('node:fs'));const node_path_1=__importDefault(require('node:path'));const glob_1=require('glob');const parser=__importStar(require('@babel/parser'));const traverse_1=__importDefault(require('@babel/traverse'));class DIGenerateCommand extends Command_1['default']{['signature']='di:generate';['description']='Generate\x20types\x20by\x20analyzing\x20index.js\x20dependencies.';async['handle'](){const _0x2dbaf0=process['cwd']();const _0x1057cc=node_path_1['default']['join'](_0x2dbaf0,'types');const _0x3b3cf7=node_path_1['default']['join'](_0x1057cc,'auto-di.d.ts');const _0x390d03=node_path_1['default']['join'](_0x2dbaf0,'index.js');console['log']('---\x20🧙‍♂️\x20Kythia\x20Type\x20Wizard\x20(Smart\x20Mode)\x20---');console['log']('📖\x20Reading\x20index.js\x20to\x20find\x20injected\x20helpers...');const _0x440743=new Set();try{const _0x1f39b5=node_fs_1['default']['readFileSync'](_0x390d03,'utf8');const _0x3d2ea3=parser['parse'](_0x1f39b5,{'sourceType':'module','plugins':['typescript','objectRestSpread'],'errorRecovery':!![]});(0xb9d*0x3+0x1b9e+0x3e75*-0x1,traverse_1['default'])(_0x3d2ea3,{'VariableDeclarator'(_0x255de3){if(_0x255de3['node']['id']['type']==='Identifier'&&_0x255de3['node']['id']['name']==='dependencies'){const _0x68351a=_0x255de3['node']['init'];if(_0x68351a&&_0x68351a['type']==='ObjectExpression'){const _0x2f3f35=_0x68351a['properties']['find'](_0x334c60=>_0x334c60['key']['name']==='helpers');if(_0x2f3f35&&_0x2f3f35['value']['type']==='ObjectExpression'){_0x2f3f35['value']['properties']['forEach'](_0x4374e0=>{if(_0x4374e0['key']?.['name']){_0x440743['add'](_0x4374e0['key']['name']);}});}}}}});}catch(_0x53fe72){console['warn']('⚠️\x20Failed\x20to\x20parse\x20index.js.\x20Generating\x20all\x20helpers\x20as\x20fallback.');}console['log']('\x20\x20\x20>\x20Detected\x20keys:\x20\x1b[36m'+Array['from'](_0x440743)['join'](',\x20')+'\x1b[0m');const _0x25931a={};const _0x16c288={};const _0x3826e4=_0x5b884c=>{const _0x13125b=_0x5b884c['split'](node_path_1['default']['sep'])['join']('/');if(_0x13125b['includes']('/addons/'))return'@addons/'+_0x13125b['split']('/addons/')[-0x9*-0x275+0x329*0xb+-0x38df]['replace'](/\.(js|ts)$/,'');if(_0x13125b['includes']('/src/'))return'@src/'+_0x13125b['split']('/src/')[0x371*-0x7+-0x224a+0x1*0x3a62]['replace'](/\.(js|ts)$/,'');return null;};glob_1['glob']['sync']('{src,addons/**}/models/*.{js,ts}',{'cwd':_0x2dbaf0,'ignore':['**/*.d.ts']})['forEach'](_0x198e93=>{const _0x517658=node_path_1['default']['basename'](_0x198e93,node_path_1['default']['extname'](_0x198e93));const _0x104526=_0x3826e4(node_path_1['default']['join'](_0x2dbaf0,_0x198e93));if(_0x104526)_0x25931a[_0x517658]=_0x104526;});glob_1['glob']['sync']('{src,addons/**}/helpers/*.{js,ts}',{'cwd':_0x2dbaf0,'ignore':['**/*.d.ts']})['forEach'](_0x216c9f=>{const _0x1d6a1e=node_path_1['default']['basename'](_0x216c9f,node_path_1['default']['extname'](_0x216c9f));if(_0x440743['size']>-0x19*-0x9+-0x44b+0x17*0x26&&!_0x440743['has'](_0x1d6a1e))return;const _0x2c6a8c=_0x3826e4(node_path_1['default']['join'](_0x2dbaf0,_0x216c9f));if(_0x2c6a8c)_0x16c288[_0x1d6a1e]=_0x2c6a8c;});const _0x4ed805=['//\x20🛑\x20DO\x20NOT\x20EDIT.\x20Auto-generated\x20by\x20\x22bunx\x20kythia\x20di:generate\x22','//\x20🧙‍♂️\x20The\x20Type\x20Wizard\x20-\x20Smart\x20Mode','','declare\x20global\x20{','\x20\x20\x20\x20namespace\x20KythiaDI\x20{','\x20\x20\x20\x20\x20\x20\x20\x20interface\x20Container\x20{','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20---\x20Core\x20Services\x20---','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20client:\x20import(\x22discord.js\x22).Client;','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sequelize:\x20import(\x22sequelize\x22).Sequelize;','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20redis:\x20import(\x22ioredis\x22).default;','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20kythiaConfig:\x20any;','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20t:\x20(interaction:\x20any,\x20key:\x20string,\x20args?:\x20any)\x20=>\x20Promise<string>;','','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20---\x20Models\x20---','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20models:\x20{'];Object['entries'](_0x25931a)['sort']()['forEach'](([_0xb74231,_0x120db1])=>{_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xb74231+':\x20typeof\x20import(\x27'+_0x120db1+'\x27);');});_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};');_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20---\x20Helpers\x20(Injected\x20in\x20index.js)\x20---');_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20helpers:\x20{');_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20discord:\x20typeof\x20import(\x22@coreHelpers/discord\x22);');if(_0x440743['has']('color')){_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20{\x20convertColor:\x20(color:\x20any,\x20opts?:\x20any)\x20=>\x20number\x20};');}Object['entries'](_0x16c288)['sort']()['forEach'](([_0x354f4a,_0x4d53b2])=>{if(_0x354f4a==='discord')return;_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x354f4a+':\x20typeof\x20import(\x27'+_0x4d53b2+'\x27);');});_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};');_0x4ed805['push']('\x20\x20\x20\x20\x20\x20\x20\x20}');_0x4ed805['push']('\x20\x20\x20\x20}');_0x4ed805['push']('}');if(!node_fs_1['default']['existsSync'](_0x1057cc))node_fs_1['default']['mkdirSync'](_0x1057cc,{'recursive':!![]});node_fs_1['default']['writeFileSync'](_0x3b3cf7,_0x4ed805['join']('\x0a'));console['log']('\x0a\x1b[32m✨\x20Done!\x20Generated\x20types\x20matching\x20your\x20index.js\x20dependencies.\x1b[0m');}}exports['default']=DIGenerateCommand;
1
+ 'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x54ca4a,_0x3552c0,_0x2c8973,_0x24e269){if(_0x24e269===undefined)_0x24e269=_0x2c8973;var _0x46ac60=Object['getOwnPropertyDescriptor'](_0x3552c0,_0x2c8973);if(!_0x46ac60||('get'in _0x46ac60?!_0x3552c0['__esModule']:_0x46ac60['writable']||_0x46ac60['configurable'])){_0x46ac60={'enumerable':!![],'get':function(){return _0x3552c0[_0x2c8973];}};}Object['defineProperty'](_0x54ca4a,_0x24e269,_0x46ac60);}:function(_0x32a3f1,_0x44e8b8,_0x2bed07,_0x12ec85){if(_0x12ec85===undefined)_0x12ec85=_0x2bed07;_0x32a3f1[_0x12ec85]=_0x44e8b8[_0x2bed07];});var __setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x1a1404,_0x3904ed){Object['defineProperty'](_0x1a1404,'default',{'enumerable':!![],'value':_0x3904ed});}:function(_0x1c21ba,_0x473cd7){_0x1c21ba['default']=_0x473cd7;});var __importStar=this&&this['__importStar']||(function(){var _0x26fbe0=function(_0x4ff484){_0x26fbe0=Object['getOwnPropertyNames']||function(_0x1d7e6b){var _0x1978f8=[];for(var _0x5f067b in _0x1d7e6b)if(Object['prototype']['hasOwnProperty']['call'](_0x1d7e6b,_0x5f067b))_0x1978f8[_0x1978f8['length']]=_0x5f067b;return _0x1978f8;};return _0x26fbe0(_0x4ff484);};return function(_0x4ed6c4){if(_0x4ed6c4&&_0x4ed6c4['__esModule'])return _0x4ed6c4;var _0x36ba77={};if(_0x4ed6c4!=null)for(var _0x5e020f=_0x26fbe0(_0x4ed6c4),_0x9237ec=-0x1*-0xff9+0x6e*-0xd+-0xa63;_0x9237ec<_0x5e020f['length'];_0x9237ec++)if(_0x5e020f[_0x9237ec]!=='default')__createBinding(_0x36ba77,_0x4ed6c4,_0x5e020f[_0x9237ec]);__setModuleDefault(_0x36ba77,_0x4ed6c4);return _0x36ba77;};}());var __importDefault=this&&this['__importDefault']||function(_0xe6578e){return _0xe6578e&&_0xe6578e['__esModule']?_0xe6578e:{'default':_0xe6578e};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const Command_1=__importDefault(require('../Command'));const node_fs_1=__importDefault(require('node:fs'));const node_path_1=__importDefault(require('node:path'));const glob_1=require('glob');const parser=__importStar(require('@babel/parser'));const traverse_1=__importDefault(require('@babel/traverse'));class DIGenerateCommand extends Command_1['default']{['signature']='di:generate';['description']='Generate\x20types\x20by\x20analyzing\x20index.js\x20dependencies.';async['handle'](){const _0x291c13=process['cwd']();const _0x32b817=node_path_1['default']['join'](_0x291c13,'types');const _0x413529=node_path_1['default']['join'](_0x32b817,'auto-di.d.ts');const _0x44ee62=node_path_1['default']['join'](_0x291c13,'index.js');console['log']('---\x20🧙‍♂️\x20Kythia\x20Type\x20Wizard\x20(Smart\x20Mode)\x20---');console['log']('📖\x20Reading\x20index.js\x20to\x20find\x20injected\x20helpers...');const _0x4c53e8=new Set();try{const _0x25ea83=node_fs_1['default']['readFileSync'](_0x44ee62,'utf8');const _0x47a007=parser['parse'](_0x25ea83,{'sourceType':'module','plugins':['typescript','objectRestSpread'],'errorRecovery':!![]});(-0x19d+-0x1*-0x911+0x9*-0xd4,traverse_1['default'])(_0x47a007,{'VariableDeclarator'(_0x4eb3d7){if(_0x4eb3d7['node']['id']['type']==='Identifier'&&_0x4eb3d7['node']['id']['name']==='dependencies'){const _0x58ec34=_0x4eb3d7['node']['init'];if(_0x58ec34&&_0x58ec34['type']==='ObjectExpression'){const _0x318ea2=_0x58ec34['properties']['find'](_0x47af9c=>_0x47af9c['key']['name']==='helpers');if(_0x318ea2&&_0x318ea2['value']['type']==='ObjectExpression'){_0x318ea2['value']['properties']['forEach'](_0x5e5e40=>{if(_0x5e5e40['key']?.['name']){_0x4c53e8['add'](_0x5e5e40['key']['name']);}});}}}}});}catch(_0x5b0038){console['warn']('⚠️\x20Failed\x20to\x20parse\x20index.js.\x20Generating\x20all\x20helpers\x20as\x20fallback.');}console['log']('\x20\x20\x20>\x20Detected\x20keys:\x20\x1b[36m'+Array['from'](_0x4c53e8)['join'](',\x20')+'\x1b[0m');const _0x1d06e9={};const _0x49e08d={};const _0x1696af=_0x29988e=>{const _0x1a1cf1=_0x29988e['split'](node_path_1['default']['sep'])['join']('/');if(_0x1a1cf1['includes']('/addons/'))return'@addons/'+_0x1a1cf1['split']('/addons/')[0x18b4+0x197*0x1+0x542*-0x5]['replace'](/\.(js|ts)$/,'');if(_0x1a1cf1['includes']('/src/'))return'@src/'+_0x1a1cf1['split']('/src/')[-0x11a3+0x9a3*0x2+-0x1a2]['replace'](/\.(js|ts)$/,'');return null;};glob_1['glob']['sync']('{src,addons/**}/models/*.{js,ts}',{'cwd':_0x291c13,'ignore':['**/*.d.ts']})['forEach'](_0x396898=>{const _0x1cddc8=node_path_1['default']['basename'](_0x396898,node_path_1['default']['extname'](_0x396898));const _0x1eaacb=_0x1696af(node_path_1['default']['join'](_0x291c13,_0x396898));if(_0x1eaacb)_0x1d06e9[_0x1cddc8]=_0x1eaacb;});glob_1['glob']['sync']('{src,addons/**}/helpers/*.{js,ts}',{'cwd':_0x291c13,'ignore':['**/*.d.ts']})['forEach'](_0xda0785=>{const _0x36488d=node_path_1['default']['basename'](_0xda0785,node_path_1['default']['extname'](_0xda0785));if(_0x4c53e8['size']>0x1f01+0x1eff+0x1f*-0x200&&!_0x4c53e8['has'](_0x36488d))return;const _0x4c59ef=_0x1696af(node_path_1['default']['join'](_0x291c13,_0xda0785));if(_0x4c59ef)_0x49e08d[_0x36488d]=_0x4c59ef;});const _0x183107=['//\x20🛑\x20DO\x20NOT\x20EDIT.\x20Auto-generated\x20by\x20\x22bunx\x20kythia\x20di:generate\x22','//\x20🧙‍♂️\x20The\x20Type\x20Wizard\x20-\x20Smart\x20Mode','','declare\x20global\x20{','\x20\x20\x20\x20namespace\x20KythiaDI\x20{','\x20\x20\x20\x20\x20\x20\x20\x20interface\x20Container\x20{','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20---\x20Core\x20Services\x20---','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20client:\x20import(\x22discord.js\x22).Client;','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sequelize:\x20import(\x22sequelize\x22).Sequelize;','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20redis:\x20import(\x22ioredis\x22).default;','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20kythiaConfig:\x20any;','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20t:\x20(interaction:\x20any,\x20key:\x20string,\x20args?:\x20any)\x20=>\x20Promise<string>;','','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20---\x20Models\x20---','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20models:\x20{'];Object['entries'](_0x1d06e9)['sort']()['forEach'](([_0x39b590,_0x17c3de])=>{_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x39b590+':\x20typeof\x20import(\x27'+_0x17c3de+'\x27);');});_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};');_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20---\x20Helpers\x20(Injected\x20in\x20index.js)\x20---');_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20helpers:\x20{');_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20discord:\x20typeof\x20import(\x22@coreHelpers/discord\x22);');if(_0x4c53e8['has']('color')){_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20color:\x20{\x20convertColor:\x20(color:\x20any,\x20opts?:\x20any)\x20=>\x20number\x20};');}Object['entries'](_0x49e08d)['sort']()['forEach'](([_0x364088,_0x128378])=>{if(_0x364088==='discord')return;_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x364088+':\x20typeof\x20import(\x27'+_0x128378+'\x27);');});_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};');_0x183107['push']('\x20\x20\x20\x20\x20\x20\x20\x20}');_0x183107['push']('\x20\x20\x20\x20}');_0x183107['push']('}');if(!node_fs_1['default']['existsSync'](_0x32b817))node_fs_1['default']['mkdirSync'](_0x32b817,{'recursive':!![]});node_fs_1['default']['writeFileSync'](_0x413529,_0x183107['join']('\x0a'));console['log']('\x0a\x1b[32m✨\x20Done!\x20Generated\x20types\x20matching\x20your\x20index.js\x20dependencies.\x1b[0m');}}exports['default']=DIGenerateCommand;
@@ -1 +1 @@
1
- 'use strict';var __importDefault=this&&this['__importDefault']||function(_0xff9d13){return _0xff9d13&&_0xff9d13['__esModule']?_0xff9d13:{'default':_0xff9d13};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const Command_1=__importDefault(require('../Command'));const node_fs_1=__importDefault(require('node:fs'));const node_path_1=__importDefault(require('node:path'));const picocolors_1=__importDefault(require('picocolors'));const discord_js_1=require('discord.js');class DocsGenerateCommand extends Command_1['default']{['signature']='docs:generate';['description']='Generate\x20markdown\x20documentation\x20for\x20all\x20Discord\x20commands';['markdownBuffers']={};['projectRoot']=process['cwd']();['addonsDir']=node_path_1['default']['join'](process['cwd'](),'addons');['outputDir']=node_path_1['default']['join'](process['cwd'](),'docs','commands');['configure'](_0xd4f7b9){_0xd4f7b9['option']('-p,\x20--path\x20<path>','Custom\x20output\x20path\x20for\x20documentation');}async['handle'](_0x593e91){console['log'](picocolors_1['default']['cyan']('\x0a🚀\x20Starting\x20documentation\x20generator...\x0a'));if(_0x593e91['path']){this['outputDir']=node_path_1['default']['resolve'](process['cwd'](),_0x593e91['path']);}this['registerModuleAliases'](this['projectRoot']);this['markdownBuffers']={};if(!node_fs_1['default']['existsSync'](this['outputDir'])){node_fs_1['default']['mkdirSync'](this['outputDir'],{'recursive':!![]});}if(!node_fs_1['default']['existsSync'](this['addonsDir'])){console['error'](picocolors_1['default']['red']('❌\x20Addons\x20directory\x20not\x20found:\x20'+this['addonsDir']));return;}const _0x42471f=node_fs_1['default']['readdirSync'](this['addonsDir'],{'withFileTypes':!![]})['filter'](_0x1682ae=>_0x1682ae['isDirectory']()&&!_0x1682ae['name']['startsWith']('_'));for(const _0x4069e6 of _0x42471f){const _0x3ffeb9=node_path_1['default']['join'](this['addonsDir'],_0x4069e6['name'],'commands');if(!node_fs_1['default']['existsSync'](_0x3ffeb9))continue;console['log'](picocolors_1['default']['blue']('📦\x20Processing\x20Addon:\x20'+_0x4069e6['name']));this['processDirectory'](_0x3ffeb9,_0x4069e6['name']);}console['log'](picocolors_1['default']['green']('\x0a✅\x20Writing\x20to\x20.md\x20files...'));for(const [_0x54ac3d,_0x59eaad]of Object['entries'](this['markdownBuffers'])){const _0x526dd0=node_path_1['default']['join'](this['outputDir'],_0x54ac3d+'.md');node_fs_1['default']['writeFileSync'](_0x526dd0,_0x59eaad);console['log'](picocolors_1['default']['green']('\x20\x20\x20->\x20Generated:\x20'+_0x54ac3d+'.md'));}console['log'](picocolors_1['default']['green']('\x0a🎉\x20Finished!'));}['getSlashCommandBuilder'](_0x421b87){if(!_0x421b87)return null;return _0x421b87['slashCommand']||_0x421b87['data']||null;}['getOptionType'](_0x1b709e){switch(_0x1b709e){case discord_js_1['ApplicationCommandOptionType']['String']:return'Text';case discord_js_1['ApplicationCommandOptionType']['Integer']:return'Integer';case discord_js_1['ApplicationCommandOptionType']['Number']:return'Number';case discord_js_1['ApplicationCommandOptionType']['Boolean']:return'Boolean';case discord_js_1['ApplicationCommandOptionType']['User']:return'User';case discord_js_1['ApplicationCommandOptionType']['Channel']:return'Channel';case discord_js_1['ApplicationCommandOptionType']['Role']:return'Role';case discord_js_1['ApplicationCommandOptionType']['Mentionable']:return'Mentionable';case discord_js_1['ApplicationCommandOptionType']['Attachment']:return'Attachment';default:return'Unknown';}}['generateOptionsDocs'](_0x5ce8df,_0xe6c83b=![]){let _0x3d0da6=_0xe6c83b?'':'###\x20Options\x0a\x0a';for(const _0x2a8872 of _0x5ce8df){_0x3d0da6+='-\x20**`'+_0x2a8872['name']+(_0x2a8872['required']?'*':'')+'`**\x0a';_0x3d0da6+='\x20\x20-\x20**Description:**\x20'+_0x2a8872['description']+'\x0a';_0x3d0da6+='\x20\x20-\x20**Type:**\x20'+this['getOptionType'](_0x2a8872['type'])+'\x0a';if(_0x2a8872['choices']){const _0x343a9b=_0x2a8872['choices']['map'](_0xeabc73=>'`'+_0xeabc73['name']+'`\x20(`'+_0xeabc73['value']+'`)')['join'](',\x20');_0x3d0da6+='\x20\x20-\x20**Choices:**\x20'+_0x343a9b+'\x0a';}}return _0x3d0da6;}['generateSubcommandDocs'](_0x516e7e,_0x21e95c,_0x4a19e0=null,_0xb58cc8=null){const _0x3a3319=_0x4a19e0?_0x4a19e0+'\x20':'';const _0x23eade=_0x21e95c['options']||[];const _0x3c7159=_0x23eade['map'](_0x27158a=>{const _0x1fa0a3='<'+_0x27158a['name']['toLowerCase']()+'>';return _0x27158a['required']?_0x1fa0a3:'['+_0x1fa0a3+']';})['join']('\x20');const _0x5b76bd=_0x21e95c['description']||'';const _0x58b873=_0x5b76bd['charAt'](0x3*0x71f+-0x1*0xf4d+-0x1*0x610)['toUpperCase']()+_0x5b76bd['slice'](-0x2*-0x116f+0xc9b+0x4*-0xbde);let _0x33774b='**`/'+_0x516e7e+'\x20'+_0x3a3319+_0x21e95c['name']+(_0x3c7159?'\x20'+_0x3c7159:'')+'`**\x0a';_0x33774b+='>\x20'+_0x58b873+'\x0a';if(_0xb58cc8&&Array['isArray'](_0xb58cc8['aliases'])&&_0xb58cc8['aliases']['length']>0x2390+-0x1034+0x162*-0xe){_0x33774b+='>\x20_Aliases:\x20'+_0xb58cc8['aliases']['map'](_0x1c7bdf=>'`'+_0x1c7bdf+'`')['join'](',\x20')+'_\x0a';}if(_0xb58cc8?.['ownerOnly']){_0x33774b+='>\x20_Owner\x20Only:\x20Yes_\x0a';}if(_0xb58cc8?.['cooldown']){_0x33774b+='>\x20_Cooldown:\x20'+_0xb58cc8['cooldown']+'\x20seconds_\x0a';}if(_0xb58cc8?.['permissions']&&_0xb58cc8['permissions']['length']>0xd43+-0x1248+0x505){const _0x4bf857=new discord_js_1['PermissionsBitField'](_0xb58cc8['permissions'])['toArray']();_0x33774b+='>\x20_User\x20Permissions:\x20'+_0x4bf857['map'](_0x3fb76f=>'`'+_0x3fb76f+'`')['join'](',\x20')+'_\x0a';}if(_0xb58cc8?.['botPermissions']&&_0xb58cc8['botPermissions']['length']>-0x2683*0x1+-0x821+0x1*0x2ea4){const _0x549b00=new discord_js_1['PermissionsBitField'](_0xb58cc8['botPermissions'])['toArray']();_0x33774b+='>\x20_Bot\x20Permissions:\x20'+_0x549b00['map'](_0x3b67d4=>'`'+_0x3b67d4+'`')['join'](',\x20')+'_\x0a';}_0x33774b+='\x0a';if(_0x23eade['length']>0x54a+0x1efa+0xb*-0x34c){_0x33774b+='**Options\x20for\x20this\x20subcommand:**\x0a';_0x33774b+=this['generateOptionsDocs'](_0x23eade,!![]);}else{_0x33774b+='\x0a';}return _0x33774b;}['generateMetadataDocs'](_0x93bcd1){let _0x37d14f='###\x20Details\x0a\x0a';let _0x13443c=![];if(_0x93bcd1['aliases']&&Array['isArray'](_0x93bcd1['aliases'])&&_0x93bcd1['aliases']['length']>-0x646+-0x249b+0x2ae1){_0x37d14f+='-\x20**Aliases:**\x20'+_0x93bcd1['aliases']['map'](_0x305905=>'`'+_0x305905+'`')['join'](',\x20')+'\x0a';_0x13443c=!![];}if(_0x93bcd1['ownerOnly']){_0x37d14f+='-\x20**Owner\x20Only:**\x20Yes\x0a';_0x13443c=!![];}if(_0x93bcd1['cooldown']){_0x37d14f+='-\x20**Cooldown:**\x20'+_0x93bcd1['cooldown']+'\x20seconds\x0a';_0x13443c=!![];}if(_0x93bcd1['permissions']&&_0x93bcd1['permissions']['length']>0xc88*0x2+-0x6a6*0x5+0x82e){const _0xcccfd=new discord_js_1['PermissionsBitField'](_0x93bcd1['permissions'])['toArray']();_0x37d14f+='-\x20**User\x20Permissions:**\x20`'+_0xcccfd['join']('`,\x20`')+'`\x0a';_0x13443c=!![];}if(_0x93bcd1['botPermissions']&&_0x93bcd1['botPermissions']['length']>0x1bd2+0x1*0x87e+-0x7*0x530){const _0x3803b5=new discord_js_1['PermissionsBitField'](_0x93bcd1['botPermissions'])['toArray']();_0x37d14f+='-\x20**Bot\x20Permissions:**\x20`'+_0x3803b5['join']('`,\x20`')+'`\x0a';_0x13443c=!![];}return _0x13443c?_0x37d14f:'';}['generateCommandMarkdown'](_0x49a94f,_0x4fb3d3,_0x1ba021=null){const _0x471402=_0x49a94f['name'];let _0x44cc74='###\x20`/'+_0x471402+'`\x0a\x0a';_0x44cc74+='**Description:**\x20'+_0x49a94f['description']+'\x0a\x0a';_0x44cc74+=this['generateMetadataDocs'](_0x4fb3d3);const _0x34ad2b=_0x49a94f['options']?.['filter'](_0x4d87fd=>_0x4d87fd['type']===discord_js_1['ApplicationCommandOptionType']['Subcommand']||_0x4d87fd['type']===discord_js_1['ApplicationCommandOptionType']['SubcommandGroup']);const _0xa6f78c=_0x49a94f['options']?.['filter'](_0x1c9f95=>_0x1c9f95['type']!==discord_js_1['ApplicationCommandOptionType']['Subcommand']&&_0x1c9f95['type']!==discord_js_1['ApplicationCommandOptionType']['SubcommandGroup']);_0x44cc74+='###\x20Usage\x0a\x0a';if(_0x34ad2b&&_0x34ad2b['length']>0x69*-0x35+0xa*-0x1ca+0x27a1){_0x34ad2b['forEach'](_0x57bad3=>{if(_0x57bad3['type']===discord_js_1['ApplicationCommandOptionType']['SubcommandGroup']){_0x57bad3['options']['forEach'](_0x30bdd1=>{const _0x1e301d=(_0x30bdd1['options']||[])['map'](_0x1a4bb9=>_0x1a4bb9['required']?'<'+_0x1a4bb9['name']+'>':'['+_0x1a4bb9['name']+']')['join']('\x20');_0x44cc74+='`/'+_0x471402+'\x20'+_0x57bad3['name']+'\x20'+_0x30bdd1['name']+(_0x1e301d?'\x20'+_0x1e301d:'')+'`\x0a';});}else{const _0x46f126=(_0x57bad3['options']||[])['map'](_0x47623f=>_0x47623f['required']?'<'+_0x47623f['name']+'>':'['+_0x47623f['name']+']')['join']('\x20');_0x44cc74+='`/'+_0x471402+'\x20'+_0x57bad3['name']+(_0x46f126?'\x20'+_0x46f126:'')+'`\x0a';}});_0x44cc74+='\x0a';}else if(_0xa6f78c&&_0xa6f78c['length']>0x15b1*0x1+-0x2b*-0x91+-0x34a*0xe){const _0x17a622=_0xa6f78c['map'](_0x34fdb4=>_0x34fdb4['required']?'<'+_0x34fdb4['name']+'>':'['+_0x34fdb4['name']+']')['join']('\x20');_0x44cc74+='`/'+_0x471402+(_0x17a622?'\x20'+_0x17a622:'')+'`\x0a\x0a';}else{_0x44cc74+='`/'+_0x471402+'`\x0a\x0a';}if(_0x34ad2b&&_0x34ad2b['length']>0x6*0xe0+-0x13*0x1c2+0x1c26){_0x44cc74+='###\x20Subcommands\x0a\x0a';for(const _0x5e4b14 of _0x34ad2b){if(_0x5e4b14['type']===discord_js_1['ApplicationCommandOptionType']['SubcommandGroup']){for(const _0xfa3614 of _0x5e4b14['options']){const _0x31172f=_0x1ba021?.[_0xfa3614['name']]?_0x1ba021[_0xfa3614['name']]:null;_0x44cc74+=this['generateSubcommandDocs'](_0x471402,_0xfa3614,_0x5e4b14['name'],_0x31172f);}}else{const _0x50ba87=_0x1ba021?.[_0x5e4b14['name']]?_0x1ba021[_0x5e4b14['name']]:null;_0x44cc74+=this['generateSubcommandDocs'](_0x471402,_0x5e4b14,null,_0x50ba87);}}}else if(_0xa6f78c&&_0xa6f78c['length']>0x1bc0+0x533+-0x20f3){_0x44cc74+=this['generateOptionsDocs'](_0xa6f78c);}return _0x44cc74;}['processSplitCommandDirectory'](_0x20be70,_0x31b0f2){console['log']('[SPLIT]\x20Assembling\x20\x27'+_0x31b0f2+'\x27\x20from\x20folder...');try{const _0x2af94d=node_path_1['default']['join'](_0x20be70,'_command.js');const _0x3029b9=require(_0x2af94d);if(_0x3029b9['ownerOnly']||_0x3029b9['teamOnly'])return;const _0x516211=this['getSlashCommandBuilder'](_0x3029b9);if(!_0x516211)return;const _0xe2acec={};const _0x30641e=node_fs_1['default']['readdirSync'](_0x20be70,{'withFileTypes':!![]});for(const _0x5ac690 of _0x30641e){const _0x3c31c9=node_path_1['default']['join'](_0x20be70,_0x5ac690['name']);if(_0x5ac690['isFile']()&&_0x5ac690['name']['endsWith']('.js')&&_0x5ac690['name']!=='_command.js'){const _0x53d8fd=require(_0x3c31c9);const _0x589b09=_0x53d8fd['data']||_0x53d8fd['slashCommand'];if(!_0x589b09)continue;const _0x14996e=new discord_js_1['SlashCommandSubcommandBuilder']();if(typeof _0x589b09==='function'){_0x589b09(_0x14996e);}else if(typeof _0x589b09==='object'){_0x14996e['setName'](_0x589b09['name'])['setDescription'](_0x589b09['description']);if(_0x589b09['options']){_0x14996e['options']=_0x589b09['options'];}}if(_0x14996e['name']){_0x516211['addSubcommand'](_0x14996e);_0xe2acec[_0x14996e['name']]={'aliases':_0x53d8fd['aliases'],'ownerOnly':_0x53d8fd['ownerOnly'],'cooldown':_0x53d8fd['cooldown'],'permissions':_0x53d8fd['permissions'],'botPermissions':_0x53d8fd['botPermissions']};}}else if(_0x5ac690['isDirectory']()&&!_0x5ac690['name']['startsWith']('_')){const _0x2d8b4e=node_fs_1['default']['existsSync'](node_path_1['default']['join'](_0x3c31c9,'_group.js'))?node_path_1['default']['join'](_0x3c31c9,'_group.js'):node_fs_1['default']['existsSync'](node_path_1['default']['join'](_0x3c31c9,'_command.js'))?node_path_1['default']['join'](_0x3c31c9,'_command.js'):null;if(!_0x2d8b4e)continue;const _0x5ef7b2=require(_0x2d8b4e);const _0x23a4c1=_0x5ef7b2['data']||_0x5ef7b2['slashCommand'];if(!_0x23a4c1)continue;const _0x56dd65=new discord_js_1['SlashCommandSubcommandGroupBuilder']();if(typeof _0x23a4c1==='function'){_0x23a4c1(_0x56dd65);}else{_0x56dd65['setName'](_0x23a4c1['name'])['setDescription'](_0x23a4c1['description']);}const _0x164aae=node_fs_1['default']['readdirSync'](_0x3c31c9)['filter'](_0x4b2b55=>_0x4b2b55['endsWith']('.js')&&!_0x4b2b55['startsWith']('_'));for(const _0x3acbe5 of _0x164aae){const _0x5b667c=require(node_path_1['default']['join'](_0x3c31c9,_0x3acbe5));const _0x586e5a=_0x5b667c['data']||_0x5b667c['slashCommand'];if(!_0x586e5a)continue;const _0x12cef8=new discord_js_1['SlashCommandSubcommandBuilder']();if(typeof _0x586e5a==='function'){_0x586e5a(_0x12cef8);}else{_0x12cef8['setName'](_0x586e5a['name'])['setDescription'](_0x586e5a['description']);if(_0x586e5a['options'])_0x12cef8['options']=_0x586e5a['options'];}_0x56dd65['addSubcommand'](_0x12cef8);_0xe2acec[_0x12cef8['name']]={'aliases':_0x5b667c['aliases'],'permissions':_0x5b667c['permissions']};}_0x516211['addSubcommandGroup'](_0x56dd65);}}const _0x315a01=_0x516211['toJSON']();const _0x10665d=this['generateCommandMarkdown'](_0x315a01,_0x3029b9,_0xe2acec);if(!this['markdownBuffers'][_0x31b0f2]){this['markdownBuffers'][_0x31b0f2]='##\x20Command\x20Category:\x20'+(_0x31b0f2['charAt'](-0x2b4*-0xa+0xa01*-0x1+0x5ad*-0x3)['toUpperCase']()+_0x31b0f2['slice'](-0x26b9+-0xc*-0xdd+0x1c5e))+'\x0a\x0a';}this['markdownBuffers'][_0x31b0f2]+=_0x10665d+'\x0a\x0a';}catch(_0x9dacf8){console['error']('❌\x20Failed\x20to\x20assemble\x20split\x20command\x20in\x20'+_0x31b0f2+':',_0x9dacf8);}}['processSimpleDirectory'](_0x1ace09,_0x478871){const _0x41395c=node_fs_1['default']['readdirSync'](_0x1ace09)['filter'](_0x1ded25=>_0x1ded25['endsWith']('.js')&&!_0x1ded25['startsWith']('_'));for(const _0x4695ef of _0x41395c){try{const _0x3e21e4=node_path_1['default']['join'](_0x1ace09,_0x4695ef);const _0x7cf28a=require(_0x3e21e4);if(_0x7cf28a['ownerOnly']||_0x7cf28a['teamOnly'])continue;const _0x35226a=this['getSlashCommandBuilder'](_0x7cf28a);if(!_0x35226a)continue;let _0x337c9c;if(typeof _0x35226a['toJSON']==='function'){_0x337c9c=_0x35226a['toJSON']();}else{_0x337c9c=_0x35226a;}const _0x5c7961=this['generateCommandMarkdown'](_0x337c9c,_0x7cf28a);if(!this['markdownBuffers'][_0x478871]){this['markdownBuffers'][_0x478871]='##\x20Command\x20Category:\x20'+(_0x478871['charAt'](-0xcb1+0x2e1*0x6+-0x11*0x45)['toUpperCase']()+_0x478871['slice'](0x241+0x175f+-0x7*0x3a9))+'\x0a\x0a';}this['markdownBuffers'][_0x478871]+=_0x5c7961+'\x0a\x0a';console['log']('['+_0x478871['toUpperCase']()+']\x20Added\x20\x27'+(_0x337c9c['name']||_0x4695ef)+'\x27\x20to\x20buffer');}catch(_0x397c6b){console['error']('❌\x20Failed\x20to\x20process\x20file\x20'+_0x4695ef+'\x20in\x20category\x20'+_0x478871+':\x20'+_0x397c6b['message']);}}}['processDirectory'](_0x6240c7,_0x3806b9){const _0x42bd0c=node_path_1['default']['join'](_0x6240c7,'_command.js');if(node_fs_1['default']['existsSync'](_0x42bd0c)){this['processSplitCommandDirectory'](_0x6240c7,_0x3806b9);}else{this['processSimpleDirectory'](_0x6240c7,_0x3806b9);const _0xa31e8c=node_fs_1['default']['readdirSync'](_0x6240c7,{'withFileTypes':!![]});for(const _0x35dc8c of _0xa31e8c){if(_0x35dc8c['isDirectory']()&&!_0x35dc8c['name']['startsWith']('_')){const _0x113197=node_path_1['default']['join'](_0x6240c7,_0x35dc8c['name']);const _0x5fcaef=_0x3806b9;this['processDirectory'](_0x113197,_0x5fcaef);}}}}['registerModuleAliases'](_0xd10d55){try{const _0x59ea61=node_path_1['default']['join'](_0xd10d55,'package.json');if(!node_fs_1['default']['existsSync'](_0x59ea61))return;const _0x5e6266=JSON['parse'](node_fs_1['default']['readFileSync'](_0x59ea61,'utf8'));const _0x4aa13b=_0x5e6266['_moduleAliases'];if(!_0x4aa13b||typeof _0x4aa13b!=='object')return;const _0x30ba93=require('node:module');const _0x40141c=_0x30ba93['_resolveFilename'];_0x30ba93['_resolveFilename']=function(_0x1a882c,_0x475699){for(const [_0x1c105d,_0x4eb8b6]of Object['entries'](_0x4aa13b)){if(_0x1a882c===_0x1c105d||_0x1a882c['startsWith'](_0x1c105d+'/')){const _0x1861b4=_0x1a882c['substring'](_0x1c105d['length']);const _0x470579=node_path_1['default']['join'](_0xd10d55,_0x4eb8b6,_0x1861b4);return _0x40141c['call'](this,_0x470579,_0x475699);}}return _0x40141c['call'](this,_0x1a882c,_0x475699);};console['log'](picocolors_1['default']['green']('\x20\x20\x20✓\x20Registered\x20'+Object['keys'](_0x4aa13b)['length']+'\x20module\x20alias(es)'));}catch(_0x59ed1c){}}}exports['default']=DocsGenerateCommand;
1
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x2f9270){return _0x2f9270&&_0x2f9270['__esModule']?_0x2f9270:{'default':_0x2f9270};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const Command_1=__importDefault(require('../Command'));const node_fs_1=__importDefault(require('node:fs'));const node_path_1=__importDefault(require('node:path'));const picocolors_1=__importDefault(require('picocolors'));const discord_js_1=require('discord.js');class DocsGenerateCommand extends Command_1['default']{['signature']='docs:generate';['description']='Generate\x20markdown\x20documentation\x20for\x20all\x20Discord\x20commands';['markdownBuffers']={};['projectRoot']=process['cwd']();['addonsDir']=node_path_1['default']['join'](process['cwd'](),'addons');['outputDir']=node_path_1['default']['join'](process['cwd'](),'docs','commands');['configure'](_0x3a9f8d){_0x3a9f8d['option']('-p,\x20--path\x20<path>','Custom\x20output\x20path\x20for\x20documentation');}async['handle'](_0x443b86){console['log'](picocolors_1['default']['cyan']('\x0a🚀\x20Starting\x20documentation\x20generator...\x0a'));if(_0x443b86['path']){this['outputDir']=node_path_1['default']['resolve'](process['cwd'](),_0x443b86['path']);}this['registerModuleAliases'](this['projectRoot']);this['markdownBuffers']={};if(!node_fs_1['default']['existsSync'](this['outputDir'])){node_fs_1['default']['mkdirSync'](this['outputDir'],{'recursive':!![]});}if(!node_fs_1['default']['existsSync'](this['addonsDir'])){console['error'](picocolors_1['default']['red']('❌\x20Addons\x20directory\x20not\x20found:\x20'+this['addonsDir']));return;}const _0x160dce=node_fs_1['default']['readdirSync'](this['addonsDir'],{'withFileTypes':!![]})['filter'](_0x3ea946=>_0x3ea946['isDirectory']()&&!_0x3ea946['name']['startsWith']('_'));for(const _0x235a88 of _0x160dce){const _0x3e2b82=node_path_1['default']['join'](this['addonsDir'],_0x235a88['name'],'commands');if(!node_fs_1['default']['existsSync'](_0x3e2b82))continue;console['log'](picocolors_1['default']['blue']('📦\x20Processing\x20Addon:\x20'+_0x235a88['name']));this['processDirectory'](_0x3e2b82,_0x235a88['name']);}console['log'](picocolors_1['default']['green']('\x0a✅\x20Writing\x20to\x20.md\x20files...'));for(const [_0x4d1831,_0x5efdb4]of Object['entries'](this['markdownBuffers'])){const _0x394648=node_path_1['default']['join'](this['outputDir'],_0x4d1831+'.md');node_fs_1['default']['writeFileSync'](_0x394648,_0x5efdb4);console['log'](picocolors_1['default']['green']('\x20\x20\x20->\x20Generated:\x20'+_0x4d1831+'.md'));}console['log'](picocolors_1['default']['green']('\x0a🎉\x20Finished!'));}['getSlashCommandBuilder'](_0x38ca3b){if(!_0x38ca3b)return null;return _0x38ca3b['slashCommand']||_0x38ca3b['data']||null;}['getOptionType'](_0x4c9c5d){switch(_0x4c9c5d){case discord_js_1['ApplicationCommandOptionType']['String']:return'Text';case discord_js_1['ApplicationCommandOptionType']['Integer']:return'Integer';case discord_js_1['ApplicationCommandOptionType']['Number']:return'Number';case discord_js_1['ApplicationCommandOptionType']['Boolean']:return'Boolean';case discord_js_1['ApplicationCommandOptionType']['User']:return'User';case discord_js_1['ApplicationCommandOptionType']['Channel']:return'Channel';case discord_js_1['ApplicationCommandOptionType']['Role']:return'Role';case discord_js_1['ApplicationCommandOptionType']['Mentionable']:return'Mentionable';case discord_js_1['ApplicationCommandOptionType']['Attachment']:return'Attachment';default:return'Unknown';}}['generateOptionsDocs'](_0x4e245f,_0x5e8102=![]){let _0x52b472=_0x5e8102?'':'###\x20Options\x0a\x0a';for(const _0x1795ec of _0x4e245f){_0x52b472+='-\x20**`'+_0x1795ec['name']+(_0x1795ec['required']?'*':'')+'`**\x0a';_0x52b472+='\x20\x20-\x20**Description:**\x20'+_0x1795ec['description']+'\x0a';_0x52b472+='\x20\x20-\x20**Type:**\x20'+this['getOptionType'](_0x1795ec['type'])+'\x0a';if(_0x1795ec['choices']){const _0x471942=_0x1795ec['choices']['map'](_0x22b7cf=>'`'+_0x22b7cf['name']+'`\x20(`'+_0x22b7cf['value']+'`)')['join'](',\x20');_0x52b472+='\x20\x20-\x20**Choices:**\x20'+_0x471942+'\x0a';}}return _0x52b472;}['generateSubcommandDocs'](_0x23843b,_0x43dc78,_0x4aefcb=null,_0x2860a3=null){const _0x5aafc9=_0x4aefcb?_0x4aefcb+'\x20':'';const _0x5016db=_0x43dc78['options']||[];const _0x4f9577=_0x5016db['map'](_0x29b248=>{const _0x721ac3='<'+_0x29b248['name']['toLowerCase']()+'>';return _0x29b248['required']?_0x721ac3:'['+_0x721ac3+']';})['join']('\x20');const _0x1b7eda=_0x43dc78['description']||'';const _0x21a5c1=_0x1b7eda['charAt'](0x4af+0x7dc+0xa9*-0x13)['toUpperCase']()+_0x1b7eda['slice'](-0x1b2*-0x17+0x242c+-0x4b29);let _0x5cbc1d='**`/'+_0x23843b+'\x20'+_0x5aafc9+_0x43dc78['name']+(_0x4f9577?'\x20'+_0x4f9577:'')+'`**\x0a';_0x5cbc1d+='>\x20'+_0x21a5c1+'\x0a';if(_0x2860a3&&Array['isArray'](_0x2860a3['aliases'])&&_0x2860a3['aliases']['length']>0x3a6+0x13fe+0x59*-0x44){_0x5cbc1d+='>\x20_Aliases:\x20'+_0x2860a3['aliases']['map'](_0x44fba9=>'`'+_0x44fba9+'`')['join'](',\x20')+'_\x0a';}if(_0x2860a3?.['ownerOnly']){_0x5cbc1d+='>\x20_Owner\x20Only:\x20Yes_\x0a';}if(_0x2860a3?.['cooldown']){_0x5cbc1d+='>\x20_Cooldown:\x20'+_0x2860a3['cooldown']+'\x20seconds_\x0a';}if(_0x2860a3?.['permissions']&&_0x2860a3['permissions']['length']>-0x12d1+-0x1a6d+0x2d3e){const _0x49f24d=new discord_js_1['PermissionsBitField'](_0x2860a3['permissions'])['toArray']();_0x5cbc1d+='>\x20_User\x20Permissions:\x20'+_0x49f24d['map'](_0x49a48b=>'`'+_0x49a48b+'`')['join'](',\x20')+'_\x0a';}if(_0x2860a3?.['botPermissions']&&_0x2860a3['botPermissions']['length']>-0x1*-0x4e1+-0x8*0x269+0xe67){const _0x57b2fe=new discord_js_1['PermissionsBitField'](_0x2860a3['botPermissions'])['toArray']();_0x5cbc1d+='>\x20_Bot\x20Permissions:\x20'+_0x57b2fe['map'](_0x1b45b1=>'`'+_0x1b45b1+'`')['join'](',\x20')+'_\x0a';}_0x5cbc1d+='\x0a';if(_0x5016db['length']>0x1a46+0x4*-0xb8+-0xbb3*0x2){_0x5cbc1d+='**Options\x20for\x20this\x20subcommand:**\x0a';_0x5cbc1d+=this['generateOptionsDocs'](_0x5016db,!![]);}else{_0x5cbc1d+='\x0a';}return _0x5cbc1d;}['generateMetadataDocs'](_0x59bd99){let _0x5049a2='###\x20Details\x0a\x0a';let _0x50aafa=![];if(_0x59bd99['aliases']&&Array['isArray'](_0x59bd99['aliases'])&&_0x59bd99['aliases']['length']>0xd*-0x241+0xb5*-0x2f+0x3e88){_0x5049a2+='-\x20**Aliases:**\x20'+_0x59bd99['aliases']['map'](_0x6d5b0b=>'`'+_0x6d5b0b+'`')['join'](',\x20')+'\x0a';_0x50aafa=!![];}if(_0x59bd99['ownerOnly']){_0x5049a2+='-\x20**Owner\x20Only:**\x20Yes\x0a';_0x50aafa=!![];}if(_0x59bd99['cooldown']){_0x5049a2+='-\x20**Cooldown:**\x20'+_0x59bd99['cooldown']+'\x20seconds\x0a';_0x50aafa=!![];}if(_0x59bd99['permissions']&&_0x59bd99['permissions']['length']>0x3e8+0x2292+0x32*-0xc5){const _0x3b76e9=new discord_js_1['PermissionsBitField'](_0x59bd99['permissions'])['toArray']();_0x5049a2+='-\x20**User\x20Permissions:**\x20`'+_0x3b76e9['join']('`,\x20`')+'`\x0a';_0x50aafa=!![];}if(_0x59bd99['botPermissions']&&_0x59bd99['botPermissions']['length']>0x1*-0x1f76+-0x1142+0x30b8){const _0x4eacf2=new discord_js_1['PermissionsBitField'](_0x59bd99['botPermissions'])['toArray']();_0x5049a2+='-\x20**Bot\x20Permissions:**\x20`'+_0x4eacf2['join']('`,\x20`')+'`\x0a';_0x50aafa=!![];}return _0x50aafa?_0x5049a2:'';}['generateCommandMarkdown'](_0x5b2155,_0x171043,_0xb7888b=null){const _0x163916=_0x5b2155['name'];let _0x361363='###\x20`/'+_0x163916+'`\x0a\x0a';_0x361363+='**Description:**\x20'+_0x5b2155['description']+'\x0a\x0a';_0x361363+=this['generateMetadataDocs'](_0x171043);const _0x48c563=_0x5b2155['options']?.['filter'](_0x37f4c9=>_0x37f4c9['type']===discord_js_1['ApplicationCommandOptionType']['Subcommand']||_0x37f4c9['type']===discord_js_1['ApplicationCommandOptionType']['SubcommandGroup']);const _0x338a77=_0x5b2155['options']?.['filter'](_0xa489b2=>_0xa489b2['type']!==discord_js_1['ApplicationCommandOptionType']['Subcommand']&&_0xa489b2['type']!==discord_js_1['ApplicationCommandOptionType']['SubcommandGroup']);_0x361363+='###\x20Usage\x0a\x0a';if(_0x48c563&&_0x48c563['length']>-0x5*0x4+-0x248*-0x4+0xc1*-0xc){_0x48c563['forEach'](_0x1b60f8=>{if(_0x1b60f8['type']===discord_js_1['ApplicationCommandOptionType']['SubcommandGroup']){_0x1b60f8['options']['forEach'](_0x4c2e80=>{const _0x4d710d=(_0x4c2e80['options']||[])['map'](_0xecc833=>_0xecc833['required']?'<'+_0xecc833['name']+'>':'['+_0xecc833['name']+']')['join']('\x20');_0x361363+='`/'+_0x163916+'\x20'+_0x1b60f8['name']+'\x20'+_0x4c2e80['name']+(_0x4d710d?'\x20'+_0x4d710d:'')+'`\x0a';});}else{const _0x3044c3=(_0x1b60f8['options']||[])['map'](_0x23897b=>_0x23897b['required']?'<'+_0x23897b['name']+'>':'['+_0x23897b['name']+']')['join']('\x20');_0x361363+='`/'+_0x163916+'\x20'+_0x1b60f8['name']+(_0x3044c3?'\x20'+_0x3044c3:'')+'`\x0a';}});_0x361363+='\x0a';}else if(_0x338a77&&_0x338a77['length']>0x20b8+-0x3e*0x27+-0x1746){const _0x52da88=_0x338a77['map'](_0x1c485a=>_0x1c485a['required']?'<'+_0x1c485a['name']+'>':'['+_0x1c485a['name']+']')['join']('\x20');_0x361363+='`/'+_0x163916+(_0x52da88?'\x20'+_0x52da88:'')+'`\x0a\x0a';}else{_0x361363+='`/'+_0x163916+'`\x0a\x0a';}if(_0x48c563&&_0x48c563['length']>0x1350+-0x6c9+-0xc87*0x1){_0x361363+='###\x20Subcommands\x0a\x0a';for(const _0x55e7fa of _0x48c563){if(_0x55e7fa['type']===discord_js_1['ApplicationCommandOptionType']['SubcommandGroup']){for(const _0x241800 of _0x55e7fa['options']){const _0x27c612=_0xb7888b?.[_0x241800['name']]?_0xb7888b[_0x241800['name']]:null;_0x361363+=this['generateSubcommandDocs'](_0x163916,_0x241800,_0x55e7fa['name'],_0x27c612);}}else{const _0x227ee1=_0xb7888b?.[_0x55e7fa['name']]?_0xb7888b[_0x55e7fa['name']]:null;_0x361363+=this['generateSubcommandDocs'](_0x163916,_0x55e7fa,null,_0x227ee1);}}}else if(_0x338a77&&_0x338a77['length']>-0x9ac+-0x1bad+0x3*0xc73){_0x361363+=this['generateOptionsDocs'](_0x338a77);}return _0x361363;}['processSplitCommandDirectory'](_0x206168,_0x3bcfa6){console['log']('[SPLIT]\x20Assembling\x20\x27'+_0x3bcfa6+'\x27\x20from\x20folder...');try{const _0x5df9f2=node_path_1['default']['join'](_0x206168,'_command.js');const _0x11bb1e=require(_0x5df9f2);if(_0x11bb1e['ownerOnly']||_0x11bb1e['teamOnly'])return;const _0x288a3a=this['getSlashCommandBuilder'](_0x11bb1e);if(!_0x288a3a)return;const _0x43b796={};const _0x1caa66=node_fs_1['default']['readdirSync'](_0x206168,{'withFileTypes':!![]});for(const _0x4d69a3 of _0x1caa66){const _0x366ce2=node_path_1['default']['join'](_0x206168,_0x4d69a3['name']);if(_0x4d69a3['isFile']()&&_0x4d69a3['name']['endsWith']('.js')&&_0x4d69a3['name']!=='_command.js'){const _0x31d360=require(_0x366ce2);const _0x561864=_0x31d360['data']||_0x31d360['slashCommand'];if(!_0x561864)continue;const _0x19fc50=new discord_js_1['SlashCommandSubcommandBuilder']();if(typeof _0x561864==='function'){_0x561864(_0x19fc50);}else if(typeof _0x561864==='object'){_0x19fc50['setName'](_0x561864['name'])['setDescription'](_0x561864['description']);if(_0x561864['options']){_0x19fc50['options']=_0x561864['options'];}}if(_0x19fc50['name']){_0x288a3a['addSubcommand'](_0x19fc50);_0x43b796[_0x19fc50['name']]={'aliases':_0x31d360['aliases'],'ownerOnly':_0x31d360['ownerOnly'],'cooldown':_0x31d360['cooldown'],'permissions':_0x31d360['permissions'],'botPermissions':_0x31d360['botPermissions']};}}else if(_0x4d69a3['isDirectory']()&&!_0x4d69a3['name']['startsWith']('_')){const _0x5486ca=node_fs_1['default']['existsSync'](node_path_1['default']['join'](_0x366ce2,'_group.js'))?node_path_1['default']['join'](_0x366ce2,'_group.js'):node_fs_1['default']['existsSync'](node_path_1['default']['join'](_0x366ce2,'_command.js'))?node_path_1['default']['join'](_0x366ce2,'_command.js'):null;if(!_0x5486ca)continue;const _0x43c3a5=require(_0x5486ca);const _0x163371=_0x43c3a5['data']||_0x43c3a5['slashCommand'];if(!_0x163371)continue;const _0x390b09=new discord_js_1['SlashCommandSubcommandGroupBuilder']();if(typeof _0x163371==='function'){_0x163371(_0x390b09);}else{_0x390b09['setName'](_0x163371['name'])['setDescription'](_0x163371['description']);}const _0x458583=node_fs_1['default']['readdirSync'](_0x366ce2)['filter'](_0x158901=>_0x158901['endsWith']('.js')&&!_0x158901['startsWith']('_'));for(const _0x2150aa of _0x458583){const _0x3008c9=require(node_path_1['default']['join'](_0x366ce2,_0x2150aa));const _0x132213=_0x3008c9['data']||_0x3008c9['slashCommand'];if(!_0x132213)continue;const _0x4fbba3=new discord_js_1['SlashCommandSubcommandBuilder']();if(typeof _0x132213==='function'){_0x132213(_0x4fbba3);}else{_0x4fbba3['setName'](_0x132213['name'])['setDescription'](_0x132213['description']);if(_0x132213['options'])_0x4fbba3['options']=_0x132213['options'];}_0x390b09['addSubcommand'](_0x4fbba3);_0x43b796[_0x4fbba3['name']]={'aliases':_0x3008c9['aliases'],'permissions':_0x3008c9['permissions']};}_0x288a3a['addSubcommandGroup'](_0x390b09);}}const _0x330e4e=_0x288a3a['toJSON']();const _0x2efdd=this['generateCommandMarkdown'](_0x330e4e,_0x11bb1e,_0x43b796);if(!this['markdownBuffers'][_0x3bcfa6]){this['markdownBuffers'][_0x3bcfa6]='##\x20Command\x20Category:\x20'+(_0x3bcfa6['charAt'](-0x2095+0x1f53+-0x1*-0x142)['toUpperCase']()+_0x3bcfa6['slice'](-0x1*-0x19a3+0x1189+-0x2b2b))+'\x0a\x0a';}this['markdownBuffers'][_0x3bcfa6]+=_0x2efdd+'\x0a\x0a';}catch(_0x593945){console['error']('❌\x20Failed\x20to\x20assemble\x20split\x20command\x20in\x20'+_0x3bcfa6+':',_0x593945);}}['processSimpleDirectory'](_0x28120a,_0x1d08dc){const _0x5c4d4a=node_fs_1['default']['readdirSync'](_0x28120a)['filter'](_0x260444=>_0x260444['endsWith']('.js')&&!_0x260444['startsWith']('_'));for(const _0x5c3aba of _0x5c4d4a){try{const _0x5553da=node_path_1['default']['join'](_0x28120a,_0x5c3aba);const _0x605b13=require(_0x5553da);if(_0x605b13['ownerOnly']||_0x605b13['teamOnly'])continue;const _0x3d0564=this['getSlashCommandBuilder'](_0x605b13);if(!_0x3d0564)continue;let _0x29c4b8;if(typeof _0x3d0564['toJSON']==='function'){_0x29c4b8=_0x3d0564['toJSON']();}else{_0x29c4b8=_0x3d0564;}const _0x4f9d86=this['generateCommandMarkdown'](_0x29c4b8,_0x605b13);if(!this['markdownBuffers'][_0x1d08dc]){this['markdownBuffers'][_0x1d08dc]='##\x20Command\x20Category:\x20'+(_0x1d08dc['charAt'](-0x2462+0xe*0x261+-0x18a*-0x2)['toUpperCase']()+_0x1d08dc['slice'](0x826+0x7*0x50d+-0x40*0xae))+'\x0a\x0a';}this['markdownBuffers'][_0x1d08dc]+=_0x4f9d86+'\x0a\x0a';console['log']('['+_0x1d08dc['toUpperCase']()+']\x20Added\x20\x27'+(_0x29c4b8['name']||_0x5c3aba)+'\x27\x20to\x20buffer');}catch(_0x5c778e){console['error']('❌\x20Failed\x20to\x20process\x20file\x20'+_0x5c3aba+'\x20in\x20category\x20'+_0x1d08dc+':\x20'+_0x5c778e['message']);}}}['processDirectory'](_0x3631ec,_0x189a18){const _0x1b08b1=node_path_1['default']['join'](_0x3631ec,'_command.js');if(node_fs_1['default']['existsSync'](_0x1b08b1)){this['processSplitCommandDirectory'](_0x3631ec,_0x189a18);}else{this['processSimpleDirectory'](_0x3631ec,_0x189a18);const _0x4b0f0b=node_fs_1['default']['readdirSync'](_0x3631ec,{'withFileTypes':!![]});for(const _0x55d212 of _0x4b0f0b){if(_0x55d212['isDirectory']()&&!_0x55d212['name']['startsWith']('_')){const _0x705acb=node_path_1['default']['join'](_0x3631ec,_0x55d212['name']);const _0x33a3f3=_0x189a18;this['processDirectory'](_0x705acb,_0x33a3f3);}}}}['registerModuleAliases'](_0x390c7d){try{const _0x2c1fbb=node_path_1['default']['join'](_0x390c7d,'package.json');if(!node_fs_1['default']['existsSync'](_0x2c1fbb))return;const _0xd45a1d=JSON['parse'](node_fs_1['default']['readFileSync'](_0x2c1fbb,'utf8'));const _0x26082a=_0xd45a1d['_moduleAliases'];if(!_0x26082a||typeof _0x26082a!=='object')return;const _0x3baefd=require('node:module');const _0x1aa614=_0x3baefd['_resolveFilename'];_0x3baefd['_resolveFilename']=function(_0x2d12a6,_0x2793f0){for(const [_0x53f52b,_0x12099b]of Object['entries'](_0x26082a)){if(_0x2d12a6===_0x53f52b||_0x2d12a6['startsWith'](_0x53f52b+'/')){const _0x310818=_0x2d12a6['substring'](_0x53f52b['length']);const _0xa054eb=node_path_1['default']['join'](_0x390c7d,_0x12099b,_0x310818);return _0x1aa614['call'](this,_0xa054eb,_0x2793f0);}}return _0x1aa614['call'](this,_0x2d12a6,_0x2793f0);};console['log'](picocolors_1['default']['green']('\x20\x20\x20✓\x20Registered\x20'+Object['keys'](_0x26082a)['length']+'\x20module\x20alias(es)'));}catch(_0x58e06e){}}}exports['default']=DocsGenerateCommand;