-
-
Save Hoto-Cocoa/c542e4b26f53349b24a06a1c300cb380 to your computer and use it in GitHub Desktop.
AiScript 모음
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lastId = '0000000000' | |
var emojis = [] | |
loop { | |
let res = Mk:api('admin/emoji/list', { | |
limit: 100, | |
sinceId: lastId, | |
}) | |
if (res.len == 0) break | |
emojis = emojis.concat(res) | |
lastId = emojis[emojis.len - 1].id | |
<: `{emojis.len}개의 이모지를 탐색했습니다. 계속해서 탐색합니다...` | |
} | |
<: `{emojis.len}개의 이모지를 탐색했습니다.` | |
Mk:api('admin/emoji/delete-bulk', { | |
ids: emojis.map(@(emoji) { emoji.id }) | |
}) | |
<: `{emojis.len}개의 이모지를 삭제했습니다.` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let host = 'misskey.kr' | |
var offset = 0 | |
var accounts = [] | |
<: `{host}의 계정을 탐색합니다...` | |
loop { | |
let res = Mk:api('admin/show-users', { | |
hostname: host, | |
limit: 30, | |
offset: offset, | |
sort: '+createdAt', | |
state: 'all' | |
}) | |
if (res.len == 0) break | |
accounts = accounts.concat(res) | |
offset = offset + res.len | |
if ((offset % 100) == 0) { | |
<: `{offset}번째 계정을 탐색했습니다. 계속해서 탐색합니다... ({accounts.len})` | |
} | |
} | |
each(let account, accounts) { | |
Mk:api('admin/delete-account', { | |
userId: account.id | |
}) | |
} | |
<: `{accounts.len}개의 계정 삭제 요청을 보냈습니다.` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment