저는 몇 명의 친구가있는 서버를위한 불일치 봇을 만들고 있습니다. 경고 시스템과 레벨 시스템이 있습니다. 외부 JSON 파일에 쓸 JavaScript를 관리했습니다.
{
"other-users": "other-user-data",
"304937039483493847": {
"amount": 1,
"id": "<@304937039483493847>",
"username": "Jered",
"reasons": {
"first-reason": "test"
}
},
"other-users": "other-user-data"
}
경고를 제거하기 위해 데이터를 경고에서 변경하도록 관리했지만 304937039483493847
파일에서 전체 개체 를 삭제해야 합니다.
그렇게하는 가장 좋은 방법은 무엇입니까?
나는 그것이 당신이 필요로하는 것이기를 바랍니다.
let data = {
"304937039483493847": {
"amount": 1,
"id": "<@304937039483493847>",
"username": "Jered",
"reasons": {
"first-reason": "test"
}
},
"other-users":"other-user-data"
};
console.log(data);
delete data["304937039483493847"];
console.log(data);
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다