global_ban
接入的機器人應在它所在的全部伺服器封禁這個人,包括他還沒加入的伺服器,讓他連加入都不行。BOT. 會這樣做;其他機器人由各自的開發者實作。
給 Discord 機器人開發者的共享黑名單。一個人在某處被確認是破壞者,接入的機器人就都知道。
接入的機器人應在它所在的全部伺服器封禁這個人,包括他還沒加入的伺服器,讓他連加入都不行。BOT. 會這樣做;其他機器人由各自的開發者實作。
只禁止他使用機器人,不剝奪在伺服器裡發言的權利。
https://botweb.shizune.life/api/mori/v1
GET/users/{user_id}讀
回傳這個人目前的紀錄和生效的模式,global_ban 優先於 block。沒有紀錄時 mode 是 null。
curl -H "Authorization: Bearer $MORI_BLACK_TOKEN" \
https://botweb.shizune.life/api/mori/v1/users/241619561760292866
{ "user_id": "241619561760292866",
"mode": null,
"entries": [] }GET/entries?limit=&cursor=讀
機器人要檢查每則訊息時用這個,定期同步一份在本機,不要逐人查詢。每頁最多 500 筆,依 next_cursor 翻頁。
curl -H "Authorization: Bearer $MORI_BLACK_TOKEN" \
"https://botweb.shizune.life/api/mori/v1/entries?limit=500"
{ "entries": [ ... ],
"next_cursor": null }POST/entries寫
需要可寫的 token。reason 必填;expires_at 可不填,到期後自動失效。
curl -X POST -H "Authorization: Bearer $MORI_BLACK_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "user_id": "241619561760292866",
"mode": "block",
"reason": "Raided three servers" }' \
https://botweb.shizune.life/api/mori/v1/entriesDELETE/entries/{id}寫
只能撤銷自己的應用程式新增的紀錄。
curl -X DELETE -H "Authorization: Bearer $MORI_BLACK_TOKEN" \
https://botweb.shizune.life/api/mori/v1/entries/128
{ "revoked": true }