pineafan | 3276721 | 2022-03-14 21:27:39 +0000 | [diff] [blame] | 1 | import log from '../utils/log.js' |
2 | import * as JsonDiff from 'json-diff' | ||||
3 | |||||
4 | export const name = '' | ||||
5 | export const once = false | ||||
6 | export async function execute(channel) { | ||||
7 | let pins = (await channel.messages.fetchPinned()).map(m => m.id); | ||||
8 | let oldPins = require(`../data/guilds/${channel.guild.id}/pins.json`); | ||||
9 | |||||
10 | let data = JsonDiff.diff(oldPins, pins, {full: true}); | ||||
11 | |||||
12 | addLog(channel.guild.id, data) | ||||
13 | } |