booru: avoid duplicate "rating:safe"

This commit is contained in:
end-4
2025-04-03 21:59:24 +02:00
parent 6e50396b4d
commit cbfb8f6ddb
+1 -1
View File
@@ -80,7 +80,7 @@ class BooruService extends Service {
async fetch(msg) {
// Init
const userArgs = `${msg}${(!this._nsfw || msg.includes('safe')) ? ' rating:safe' : ''}`.split(/\s+/);
const userArgs = `${msg.replace('rating:safe', '')}${(!this._nsfw || msg.includes('safe')) ? ' rating:safe' : ''}`.split(/\s+/);
console.log(userArgs)
let taglist = [];