-
-
Save Hoto-Cocoa/c542e4b26f53349b24a06a1c300cb380 to your computer and use it in GitHub Desktop.
AiScript 모음
This file contains hidden or 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 hidden or 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}개의 계정 삭제 요청을 보냈습니다.` |
This file contains hidden or 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 accounts = [ | |
] | |
var host = 'misskey.io' | |
<: `{accounts.len}개의 계정을 처리합니다...` | |
each(let account, accounts) { | |
let res = Mk:api('users/show', { | |
username: account, | |
host: host, | |
detailed: true, | |
}) | |
if (res.isLocked) { | |
<: `{account}는 계정이 잠겨있으므로 스킵합니다.` | |
continue | |
} | |
if (!res.isFollowing) { | |
<: `{account}는 팔로우하고 있지 않으므로 스킵합니다.` | |
continue | |
} | |
if (res.isFollowed) { | |
<: `{account}는 상대방이 자신을 팔로우 하고 있으므로 스킵합니다.` | |
continue | |
} | |
let followRes = Mk:api('following/delete', { | |
userId: res.id | |
}) | |
<: `{account}를 언팔로우했습니다.` | |
} | |
<: `완료했습니다.` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment