tagedit v1 lol

This commit is contained in:
Flummi
2022-03-27 18:34:13 +02:00
parent 8c556baecd
commit 0839a574d7
4 changed files with 86 additions and 2 deletions

View File

@ -91,6 +91,27 @@ export default async bot => {
}
return;
break;
/*case "renameTag":
const origTag = e.args.slice(1).join(' ');
if(origTag.length <= 1)
return e.reply("absichtliche Provokation!");
const origTagID = (await sql('tags').where('tag', origTag))[0].id;
const affected = (await sql('tags_assign')
.update({ 'tag_id': sql.raw('(select id from tags where tag = ?)', [ origTag ]) })
.whereIn('tag_id', sql.raw('select id from tags where normalized = slugify(?)', [ origTag ]))
).toString();
const deleted = (await sql('tags')
.where('normalized', sql.raw('slugify(?)', [ origTag ]))
.andWhereNot('id', origTagID)
.del()
);
e.reply(JSON.stringify({ affected, deleted }));
break;*/
case "help":
e.reply("cmds: stats, limit, thumb, cache, uptime, restart, cleanTags, clearTmp, status");
break;