@bastion/tesseract
Version:
The heart and soul of the Bastion bot.
1 lines • 4.54 kB
JavaScript
const a19_0x1964fc=a19_0x52e3;(function(_0x173aae,_0x520c8e){const _0x308ab3=a19_0x52e3,_0x3f1838=_0x173aae();while(!![]){try{const _0x560771=parseInt(_0x308ab3(0xdc))/0x1*(parseInt(_0x308ab3(0xcf))/0x2)+-parseInt(_0x308ab3(0xd1))/0x3*(-parseInt(_0x308ab3(0xcc))/0x4)+parseInt(_0x308ab3(0xbf))/0x5*(-parseInt(_0x308ab3(0xc6))/0x6)+parseInt(_0x308ab3(0xcb))/0x7+-parseInt(_0x308ab3(0xda))/0x8+-parseInt(_0x308ab3(0xbc))/0x9*(parseInt(_0x308ab3(0xd5))/0xa)+-parseInt(_0x308ab3(0xc3))/0xb*(-parseInt(_0x308ab3(0xc7))/0xc);if(_0x560771===_0x520c8e)break;else _0x3f1838['push'](_0x3f1838['shift']());}catch(_0x5dcfc0){_0x3f1838['push'](_0x3f1838['shift']());}}}(a19_0x14df,0x9bdcc));const a19_0x5efb6d=(function(){let _0x434a0e=!![];return function(_0x124771,_0x5231f8){const _0x2312ed=_0x434a0e?function(){const _0x4151a5=a19_0x52e3;if(_0x5231f8){const _0x54a12e=_0x5231f8[_0x4151a5(0xc2)](_0x124771,arguments);return _0x5231f8=null,_0x54a12e;}}:function(){};return _0x434a0e=![],_0x2312ed;};}()),a19_0x3e9467=a19_0x5efb6d(this,function(){const _0x13af09=a19_0x52e3;return a19_0x3e9467[_0x13af09(0xbe)]()[_0x13af09(0xd2)](_0x13af09(0xd6))[_0x13af09(0xbe)]()[_0x13af09(0xd4)](a19_0x3e9467)[_0x13af09(0xd2)]('(((.+)+)+)+$');});a19_0x3e9467();import a19_0x5048b4 from'node:fs';import a19_0x4e2697 from'node:path';import a19_0x9aaa02 from'node:url';function a19_0x52e3(_0x59b41b,_0x1dd556){const _0xac5698=a19_0x14df();return a19_0x52e3=function(_0x3e9467,_0x5efb6d){_0x3e9467=_0x3e9467-0xb6;let _0x14df47=_0xac5698[_0x3e9467];return _0x14df47;},a19_0x52e3(_0x59b41b,_0x1dd556);}function a19_0x14df(){const _0x2ba4a1=['toString','25UndxWJ','resolve','push','apply','8309411ihVjLw','href','name','121506mwYIfE','12qqVact','toJSON','dist','endsWith','5519220xnxWJr','4OFfDyI','Subcommand','existsSync','22quHnss','dirname','455646tElSiE','search','filter','constructor','260YMfZHg','(((.+)+)+)+$','options','Command\x20Group\x20-\x20','ChatInput','2911928NPzPTH','some','36283FOgUVc','SubcommandGroup','find','pathToFileURL','actions','sep','split','343107mqUQLq','.js'];a19_0x14df=function(){return _0x2ba4a1;};return a19_0x14df();}import{ApplicationCommandType,ApplicationCommandOptionType}from'discord.js';import a19_0x183389 from'./walkDirectory.js';import a19_0x61d4b8 from'./isConstructor.js';const commands=[],actionsDirectory=a19_0x4e2697[a19_0x1964fc(0xc0)](a19_0x1964fc(0xc9),a19_0x1964fc(0xb9)),commandsDirectory=a19_0x4e2697['resolve'](a19_0x1964fc(0xc9),'commands');if(a19_0x5048b4[a19_0x1964fc(0xce)](actionsDirectory)){const files=a19_0x183389(actionsDirectory);for(const file of files['filter'](_0x28a4dc=>_0x28a4dc[a19_0x1964fc(0xca)](a19_0x1964fc(0xbd)))){const {Command}=await import(a19_0x9aaa02[a19_0x1964fc(0xb8)](file)[a19_0x1964fc(0xc4)]);if(a19_0x61d4b8(Command)){const command=new Command();commands[a19_0x1964fc(0xc1)](command['toJSON']());}}}if(a19_0x5048b4[a19_0x1964fc(0xce)](commandsDirectory)){const files=a19_0x183389(commandsDirectory);for(const file of files[a19_0x1964fc(0xd3)](_0x34aca1=>_0x34aca1[a19_0x1964fc(0xca)]('.js'))){const {Command}=await import(a19_0x9aaa02[a19_0x1964fc(0xb8)](file)[a19_0x1964fc(0xc4)]);if(!a19_0x61d4b8(Command))continue;const command=new Command(),[commandGroupName,subcommandGroupName]=a19_0x4e2697['relative'](commandsDirectory,a19_0x4e2697[a19_0x1964fc(0xd0)](file))[a19_0x1964fc(0xbb)](a19_0x4e2697[a19_0x1964fc(0xba)]);if(commandGroupName){const subcommand={...command[a19_0x1964fc(0xc8)](),'type':ApplicationCommandOptionType[a19_0x1964fc(0xcd)]};!commands[a19_0x1964fc(0xdb)](_0x1edd45=>_0x1edd45['name']===commandGroupName)&&commands['push']({'type':ApplicationCommandType[a19_0x1964fc(0xd9)],'name':commandGroupName,'description':a19_0x1964fc(0xd8)+commandGroupName,'options':[]});const commandGroup=commands[a19_0x1964fc(0xb7)](_0x14f654=>_0x14f654[a19_0x1964fc(0xc5)]===commandGroupName);subcommandGroupName?(!commandGroup['options'][a19_0x1964fc(0xdb)](_0x3baf80=>_0x3baf80['name']===subcommandGroupName)&&commandGroup['options']['push']({'type':ApplicationCommandOptionType[a19_0x1964fc(0xb6)],'name':subcommandGroupName,'description':'Subcommand\x20Group\x20-\x20'+subcommandGroupName,'options':[]}),commandGroup[a19_0x1964fc(0xd7)][a19_0x1964fc(0xb7)](_0x4745f5=>_0x4745f5[a19_0x1964fc(0xc5)]===subcommandGroupName)[a19_0x1964fc(0xd7)][a19_0x1964fc(0xc1)](subcommand)):commandGroup[a19_0x1964fc(0xd7)][a19_0x1964fc(0xc1)](subcommand);}else commands[a19_0x1964fc(0xc1)](command[a19_0x1964fc(0xc8)]());}}const getCommands=()=>{return commands;};export default getCommands;