UNPKG

@bastion/tesseract

Version:

The heart and soul of the Bastion bot.

1 lines 4.49 kB
const a19_0x3e98cf=a19_0x51c8;(function(_0x31b7f4,_0x60e770){const _0x5daa45=a19_0x51c8,_0x1582b5=_0x31b7f4();while(!![]){try{const _0x1b0d81=parseInt(_0x5daa45(0xad))/0x1*(-parseInt(_0x5daa45(0xa1))/0x2)+parseInt(_0x5daa45(0xbe))/0x3+-parseInt(_0x5daa45(0xb2))/0x4+-parseInt(_0x5daa45(0xa4))/0x5*(parseInt(_0x5daa45(0xa5))/0x6)+parseInt(_0x5daa45(0xbf))/0x7*(-parseInt(_0x5daa45(0xa2))/0x8)+parseInt(_0x5daa45(0x9d))/0x9+parseInt(_0x5daa45(0xb1))/0xa*(parseInt(_0x5daa45(0xaa))/0xb);if(_0x1b0d81===_0x60e770)break;else _0x1582b5['push'](_0x1582b5['shift']());}catch(_0x41c60a){_0x1582b5['push'](_0x1582b5['shift']());}}}(a19_0x4f8a,0x924e7));const a19_0x37ab64=(function(){let _0xb7ee33=!![];return function(_0x40b784,_0x465cf8){const _0x22719e=_0xb7ee33?function(){const _0x5ce061=a19_0x51c8;if(_0x465cf8){const _0x279918=_0x465cf8[_0x5ce061(0xbb)](_0x40b784,arguments);return _0x465cf8=null,_0x279918;}}:function(){};return _0xb7ee33=![],_0x22719e;};}()),a19_0x504c0a=a19_0x37ab64(this,function(){const _0x5f126b=a19_0x51c8;return a19_0x504c0a[_0x5f126b(0xa8)]()[_0x5f126b(0xa3)](_0x5f126b(0xb5))[_0x5f126b(0xa8)]()[_0x5f126b(0xb8)](a19_0x504c0a)[_0x5f126b(0xa3)](_0x5f126b(0xb5));});a19_0x504c0a();import a19_0x594176 from'node:fs';import a19_0x40c90b from'node:path';import a19_0x33a14b from'node:url';import{ApplicationCommandType,ApplicationCommandOptionType}from'discord.js';import a19_0x5db2a6 from'./walkDirectory.js';import a19_0x306f06 from'./isConstructor.js';const commands=[],actionsDirectory=a19_0x40c90b[a19_0x3e98cf(0x9f)]('dist','actions'),commandsDirectory=a19_0x40c90b['resolve']('dist',a19_0x3e98cf(0x9e));if(a19_0x594176[a19_0x3e98cf(0xbd)](actionsDirectory)){const files=a19_0x5db2a6(actionsDirectory);for(const file of files[a19_0x3e98cf(0xb0)](_0x13dca5=>_0x13dca5['endsWith'](a19_0x3e98cf(0xae)))){const {Command}=await import(a19_0x33a14b[a19_0x3e98cf(0xa6)](file)[a19_0x3e98cf(0xa0)]);if(a19_0x306f06(Command)){const command=new Command();commands[a19_0x3e98cf(0xb4)](command[a19_0x3e98cf(0xaf)]());}}}if(a19_0x594176[a19_0x3e98cf(0xbd)](commandsDirectory)){const files=a19_0x5db2a6(commandsDirectory);for(const file of files[a19_0x3e98cf(0xb0)](_0x289ec0=>_0x289ec0[a19_0x3e98cf(0xba)](a19_0x3e98cf(0xae)))){const {Command}=await import(a19_0x33a14b[a19_0x3e98cf(0xa6)](file)[a19_0x3e98cf(0xa0)]);if(!a19_0x306f06(Command))continue;const command=new Command(),[commandGroupName,subcommandGroupName]=a19_0x40c90b[a19_0x3e98cf(0xb9)](commandsDirectory,a19_0x40c90b[a19_0x3e98cf(0xa7)](file))[a19_0x3e98cf(0xb3)](a19_0x40c90b['sep']);if(commandGroupName){const subcommand={...command[a19_0x3e98cf(0xaf)](),'type':ApplicationCommandOptionType['Subcommand']};!commands['some'](_0x3703aa=>_0x3703aa[a19_0x3e98cf(0xab)]===commandGroupName)&&commands['push']({'type':ApplicationCommandType[a19_0x3e98cf(0xbc)],'name':commandGroupName,'description':a19_0x3e98cf(0xb7)+commandGroupName,'options':[]});const commandGroup=commands[a19_0x3e98cf(0xac)](_0x5d9656=>_0x5d9656[a19_0x3e98cf(0xab)]===commandGroupName);subcommandGroupName?(!commandGroup[a19_0x3e98cf(0xb6)][a19_0x3e98cf(0xa9)](_0x200540=>_0x200540[a19_0x3e98cf(0xab)]===subcommandGroupName)&&commandGroup[a19_0x3e98cf(0xb6)][a19_0x3e98cf(0xb4)]({'type':ApplicationCommandOptionType['SubcommandGroup'],'name':subcommandGroupName,'description':'Subcommand\x20Group\x20-\x20'+subcommandGroupName,'options':[]}),commandGroup['options'][a19_0x3e98cf(0xac)](_0x183342=>_0x183342[a19_0x3e98cf(0xab)]===subcommandGroupName)[a19_0x3e98cf(0xb6)][a19_0x3e98cf(0xb4)](subcommand)):commandGroup[a19_0x3e98cf(0xb6)][a19_0x3e98cf(0xb4)](subcommand);}else commands[a19_0x3e98cf(0xb4)](command[a19_0x3e98cf(0xaf)]());}}const getCommands=()=>{return commands;};function a19_0x51c8(_0x2b0c39,_0x548006){const _0x5a97bc=a19_0x4f8a();return a19_0x51c8=function(_0x504c0a,_0x37ab64){_0x504c0a=_0x504c0a-0x9d;let _0x4f8aeb=_0x5a97bc[_0x504c0a];return _0x4f8aeb;},a19_0x51c8(_0x2b0c39,_0x548006);}function a19_0x4f8a(){const _0x3aa012=['apply','ChatInput','existsSync','968808usDLNd','5978007BovLtK','9018306qFwmRL','commands','resolve','href','818630XGdcuP','8CJZUYe','search','310UkZbJz','107034idecKd','pathToFileURL','dirname','toString','some','11HiUSgC','name','find','1GjDOGW','.js','toJSON','filter','20033610ogUQpF','1438904MFelXF','split','push','(((.+)+)+)+$','options','Command\x20Group\x20-\x20','constructor','relative','endsWith'];a19_0x4f8a=function(){return _0x3aa012;};return a19_0x4f8a();}export default getCommands;