mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 22:05:50 +00:00
2 lines
4.7 KiB
JavaScript
2 lines
4.7 KiB
JavaScript
function _0x440b(_0x21e839,_0x2b4520){const _0x338e39=_0x338e();return _0x440b=function(_0x440bfe,_0x21a906){_0x440bfe=_0x440bfe-0x1e4;let _0x4ab131=_0x338e39[_0x440bfe];return _0x4ab131;},_0x440b(_0x21e839,_0x2b4520);}(function(_0x40a705,_0x59d020){const _0x62765b=_0x440b,_0x11a1b1=_0x40a705();while(!![]){try{const _0x16d980=parseInt(_0x62765b(0x1fd))/0x1+parseInt(_0x62765b(0x206))/0x2*(parseInt(_0x62765b(0x207))/0x3)+parseInt(_0x62765b(0x1e4))/0x4+parseInt(_0x62765b(0x203))/0x5*(-parseInt(_0x62765b(0x1f6))/0x6)+-parseInt(_0x62765b(0x1ee))/0x7+-parseInt(_0x62765b(0x1f7))/0x8*(parseInt(_0x62765b(0x1f1))/0x9)+parseInt(_0x62765b(0x20a))/0xa*(parseInt(_0x62765b(0x1fb))/0xb);if(_0x16d980===_0x59d020)break;else _0x11a1b1['push'](_0x11a1b1['shift']());}catch(_0x563d13){_0x11a1b1['push'](_0x11a1b1['shift']());}}}(_0x338e,0x4e8be));import{getContext,extension_settings}from'/scripts/extensions.js';import{SlashCommandParser}from'/scripts/slash-commands/SlashCommandParser.js';import{extensionName}from'../utils/settings.js';async function executeSlashCommand(_0x4e0979){const _0x1f5043=_0x440b;if(!_0x4e0979)return;try{console[_0x1f5043(0x200)]('[Amily-敕令执行官]\x20准备执行圣谕:\x20'+_0x4e0979);const _0x545352=new SlashCommandParser(),_0xe85d8c=_0x545352[_0x1f5043(0x209)](_0x4e0979,![]);if(_0xe85d8c&&typeof _0xe85d8c[_0x1f5043(0x1ed)]==='function')await _0xe85d8c[_0x1f5043(0x1ed)](),console[_0x1f5043(0x200)]('[Amily-敕令执行官]\x20圣谕:\x20\x22'+_0x4e0979+'\x22\x20已成功颁布。'),toastr[_0x1f5043(0x1e6)]('圣谕\x20\x22'+_0x4e0979+_0x1f5043(0x1ef),_0x1f5043(0x1f0));else{const _0x40bf28=_0x1f5043(0x1ec)+_0x4e0979;console['error'](_0x1f5043(0x1e7)+_0x40bf28),toastr[_0x1f5043(0x20c)](_0x40bf28,_0x1f5043(0x204));}}catch(_0x5ab5c6){console[_0x1f5043(0x20c)](_0x1f5043(0x1eb)+_0x4e0979+'\x22\x20时发生意外:',_0x5ab5c6),toastr[_0x1f5043(0x20c)](_0x1f5043(0x202)+_0x5ab5c6['message'],'敕令司紧急报告');}}function _0x338e(){const _0x1c5948=['40LXOpKn','chat','/hide\x200-','manual_hide','17053157kJbUsK','请输入有效的楼层范围','168595BznAfB','length','unhide_all','log','史册为空,无需解除隐藏。','执行圣谕时发生意外:\x20','5tWCwSo','敕令司紧急报告','敕令司提示','423482FVpnBV','3dPBnqP','warning','parse','10PYqZfl','[Amily-史册管理员]\x20颁布圣谕:\x20','error','/hide','450988kYMnDm','autoHideThreshold','success','[Amily-敕令执行官]\x20','info','/unhide','[Amily-手动敕令司]\x20未知的命令类型:\x20','[Amily-敕令执行官]\x20执行圣谕\x20\x22','铸造出的圣谕法印无法执行!指令:\x20','execute','4180624yIGUso','\x22\x20已成功颁布','敕令司回报','999756MGjBcB','[Amily-史册管理员]\x20执行自动隐藏律法时发生意外错误:','起始层不能大于结束层','/unhide\x200-','autoHideEnabled','3413952EckBBs'];_0x338e=function(){return _0x1c5948;};return _0x338e();}export async function executeAutoHide(){const _0xc8e96f=_0x440b;try{const _0x27f21d=extension_settings[extensionName];if(!_0x27f21d[_0xc8e96f(0x1f5)])return;const _0x35f0da=_0x27f21d[_0xc8e96f(0x1e5)]||0x1e,_0x2c76ec=getContext(),_0x3364d4=_0x2c76ec[_0xc8e96f(0x1f8)]['length'],_0xd231ec=_0x3364d4-_0x35f0da-0x1;if(_0xd231ec<0x0){;return;}const _0x57aad4=_0xc8e96f(0x1f9)+_0xd231ec;console[_0xc8e96f(0x200)](_0xc8e96f(0x20b)+_0x57aad4);const _0x34e2ad=new SlashCommandParser(),_0x2a3508=_0x34e2ad[_0xc8e96f(0x209)](_0x57aad4,![]);_0x2a3508&&typeof _0x2a3508[_0xc8e96f(0x1ed)]==='function'?(await _0x2a3508['execute'](),console[_0xc8e96f(0x200)]('[Amily-史册管理员]\x20圣谕颁布成功。')):console[_0xc8e96f(0x20c)]('[Amily-史册管理员]\x20致命错误:铸造出的圣谕法印无法执行!');}catch(_0x43a7b9){console['error'](_0xc8e96f(0x1f2),_0x43a7b9);}}export async function executeManualCommand(_0x4b6ad1,_0x45d631={}){const _0x4052e4=_0x440b,{from:_0x109935,to:_0x5201ea}=_0x45d631;let _0x439173='';switch(_0x4b6ad1){case _0x4052e4(0x1ff):{const _0x110361=getContext()[_0x4052e4(0x1f8)][_0x4052e4(0x1fe)];if(_0x110361>0x0){const _0x2988bb=_0x110361-0x1;_0x439173=_0x4052e4(0x1f4)+_0x2988bb;}else{toastr[_0x4052e4(0x1e8)](_0x4052e4(0x201),_0x4052e4(0x1f0));return;}break;}case _0x4052e4(0x1fa):case'manual_unhide':{const _0x1cd679=_0x4b6ad1===_0x4052e4(0x1fa)?_0x4052e4(0x20d):_0x4052e4(0x1e9);if(_0x109935===''&&_0x5201ea!=='')_0x439173=_0x1cd679+'\x20'+_0x5201ea;else{if(_0x109935!==''&&_0x5201ea!==''){if(parseInt(_0x109935)>parseInt(_0x5201ea)){toastr['warning'](_0x4052e4(0x1f3),_0x4052e4(0x205));return;}_0x439173=_0x1cd679+'\x20'+_0x109935+'-'+_0x5201ea;}else{toastr[_0x4052e4(0x208)](_0x4052e4(0x1fc),_0x4052e4(0x205));return;}}break;}default:console[_0x4052e4(0x20c)](_0x4052e4(0x1ea)+_0x4b6ad1);return;}await executeSlashCommand(_0x439173);}
|