fancy expanding api input box

This commit is contained in:
end-4
2024-01-27 00:19:42 +07:00
parent 962e29d406
commit d425af4cdf
5 changed files with 110 additions and 26 deletions
+4 -2
View File
@@ -83,12 +83,14 @@ class WaifuService extends Service {
async fetch(msg) {
// Init
const userArgs = msg.split(' ');
const userArgs = msg.split(/\s+/);
let taglist = [];
this._nsfw = false;
// Construct body/headers
for (let i = 0; i < userArgs.length; i++) {
const thisArg = userArgs[i];
const thisArg = userArgs[i].trim();
if(thisArg.length == 0) continue;
if (thisArg == '--im') this._mode = 'im';
else if (thisArg == '--nekos') this._mode = 'nekos';
else if (thisArg.includes('pics')) this._mode = 'pics';