blob: 67654f3f63aaf93fcb01fdc100c6c1feafb738c3 [file] [log] [blame]
pineafan32767212022-03-14 21:27:39 +00001const {addLog} = require('../scripts/addLogs');
2module.exports = {
3 name:'stickerDelete',
4 once:false,
5 async execute(sticker) {
6
7 let logs = await sticker.guild.fetchAuditLogs({type: 'STICKER_DELETE'});
8 let entry = logs.entries.find(e => e.target.id === sticker.id);
9
10 let data = {
11 id: sticker.id,
12 deletedAt: entry.createdTimestamp,
13 description: sticker.description,
14 name: sticker.name,
15 type: sticker.type,
16 tags: sticker.tags,
17 deletedBy: entry.executor.id
18 }
19
20 addLog(role.guild.id, data);
21
22 }
23}