pineafan | 3276721 | 2022-03-14 21:27:39 +0000 | [diff] [blame] | 1 | const {addLog} = require('../scripts/addLogs'); |
2 | const JsonDiff = require('json-diff'); | ||||
3 | module.exports = { | ||||
4 | name:'threadMembersUpdate', | ||||
5 | once:false, | ||||
6 | async execute(oldMembers, newMembers) { | ||||
7 | |||||
8 | let om = oldMembers.map(m => m.id); | ||||
9 | let nm = newMembers.map(m => m.id); | ||||
10 | let data = JsonDiff.diff(om, nm); | ||||
11 | |||||
12 | addLog(newMembers.first().guild.id, data); | ||||
13 | |||||
14 | } | ||||
15 | } |