for coded
diff --git a/src/events:TODO/channelPinsUpdate.ts b/src/events:TODO/channelPinsUpdate.ts
new file mode 100644
index 0000000..8a86b6d
--- /dev/null
+++ b/src/events:TODO/channelPinsUpdate.ts
@@ -0,0 +1,13 @@
+import log from '../utils/log.js'
+import * as JsonDiff from 'json-diff'
+
+export const name = ''
+export const once = false
+export async function execute(channel) {
+ let pins = (await channel.messages.fetchPinned()).map(m => m.id);
+ let oldPins = require(`../data/guilds/${channel.guild.id}/pins.json`);
+
+ let data = JsonDiff.diff(oldPins, pins, {full: true});
+
+ addLog(channel.guild.id, data)
+}
diff --git a/src/events:TODO/guildBanAdd.ts b/src/events:TODO/guildBanAdd.ts
new file mode 100644
index 0000000..c165805
--- /dev/null
+++ b/src/events:TODO/guildBanAdd.ts
@@ -0,0 +1,18 @@
+import log from '../utils/log.js'
+
+export const name = 'guildBanAdd'
+export const once = false
+export async function execute(ban) {
+ let logs = await ban.guild.fetchAuditLogs({'type': 'MEMBER_BAN_CREATE'});
+ let log = logs.entries.find(log => log.target.id === ban.user.id)
+
+ let data = {
+ id: ban.user.id,
+ username: ban.user.username,
+ reason: ban.reason,
+ bannedAt: log.createdTimestamp,
+ bannedBy: log.executor.id
+ }
+
+ log(ban.guild.id, data);
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildBanRemove.ts b/src/events:TODO/guildBanRemove.ts
new file mode 100644
index 0000000..614f0f5
--- /dev/null
+++ b/src/events:TODO/guildBanRemove.ts
@@ -0,0 +1,18 @@
+module.exports = {
+ name:'guilidBanRemove',
+ once:false,
+ async execute(ban) {
+ let logs = await ban.guild.fetchAuditLogs({'type': 'MEMBER_BAN_REMOVE'});
+ let log = logs.entries.find(log => log.target.id === ban.user.id);
+
+ let data = {
+ id: ban.user.id,
+ username: ban.user.username,
+ reason: ban.reason,
+ unbannedAt: log.createdTimestamp,
+ unbannedBy: log.executor.id
+ }
+
+ addLog(ban.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildDelete.ts b/src/events:TODO/guildDelete.ts
new file mode 100644
index 0000000..107a6db
--- /dev/null
+++ b/src/events:TODO/guildDelete.ts
@@ -0,0 +1,7 @@
+module.exports = {
+ name:'guildDelete',
+ once:false,
+ async execute(guild) {
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildIntegrationsUpdate.ts b/src/events:TODO/guildIntegrationsUpdate.ts
new file mode 100644
index 0000000..863b67a
--- /dev/null
+++ b/src/events:TODO/guildIntegrationsUpdate.ts
@@ -0,0 +1,9 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+module.exports = {
+ name:'guildIntegrationsUpdate',
+ once:false,
+ async execute(args) {
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildMemberAvailable.ts b/src/events:TODO/guildMemberAvailable.ts
new file mode 100644
index 0000000..92c2c80
--- /dev/null
+++ b/src/events:TODO/guildMemberAvailable.ts
@@ -0,0 +1,8 @@
+const {addLog} = require('../scripts/addLogs');
+module.exports = {
+ name:'guildMemberAvailable',
+ once:false,
+ async execute(args) {
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildMemberUpdate.ts b/src/events:TODO/guildMemberUpdate.ts
new file mode 100644
index 0000000..238bf3c
--- /dev/null
+++ b/src/events:TODO/guildMemberUpdate.ts
@@ -0,0 +1,31 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+
+module.exports = {
+ name:'guildMemberUpdate',
+ once:false,
+ async execute(oldMember, newMember) {
+
+ let oMem = {
+ id: oldMember.id,
+ username: oldMember.user.username,
+ nick: oldMember.nickname,
+ roles: oldMember.roles.cache.map(r => r.id),
+ displayAvatarUrl: oldMember.displayAvatarUrl,
+ communicationDisabledUntil: oldMember.communicationDisabledUntilTimestamp
+ }
+
+ let nMem = {
+ id: newMember.id,
+ username: newMember.user.username,
+ nick: newMember.nickname,
+ roles: newMember.roles.cache.map(r => r.id),
+ displayAvatarUrl: newMember.displayAvatarUrl,
+ communicationDisabledUntil: newMember.communicationDisabledUntilTimestamp
+ }
+
+ let data = JsonDiff.diff(oMem, nMem, {full: true});
+
+ addLog(newMember.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildScheduledEventCreate.ts b/src/events:TODO/guildScheduledEventCreate.ts
new file mode 100644
index 0000000..489dd2f
--- /dev/null
+++ b/src/events:TODO/guildScheduledEventCreate.ts
@@ -0,0 +1,24 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'guildScheduledEventCreate',
+ once:false,
+ async execute(event) {
+ let data = {
+ id: event.id,
+ name: event.name,
+ description: event.description,
+ channel: event.channel.id,
+ time: {
+ start: event.scheduledStartTimestamp,
+ end: event.scheduledEndTimestamp
+ },
+ date: event.date,
+ createdBy: event.creator.id,
+ createdAt: event.createdTimestamp,
+ privacyLevel: event.privacyLevel
+ }
+
+ addLog(event.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildScheduledEventDelete.ts b/src/events:TODO/guildScheduledEventDelete.ts
new file mode 100644
index 0000000..a3e85db
--- /dev/null
+++ b/src/events:TODO/guildScheduledEventDelete.ts
@@ -0,0 +1,20 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'guildScheduledEventDelete',
+ once:false,
+ async execute(event) {
+
+ let logs = await event.guild.fetchAuditLogs({'type': 'GUILD_SCHEDULED_EVENT_DELETE'});
+ let log = logs.entries.find(log => log.target.id === event.id);
+
+ let data = {
+ id: event.id,
+ name: event.name,
+ deletedAt: log.createdTimestamp,
+ deletedBy: log.executor.id
+ }
+
+ addLog(event.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildScheduledEventUpdate.ts b/src/events:TODO/guildScheduledEventUpdate.ts
new file mode 100644
index 0000000..cc37a73
--- /dev/null
+++ b/src/events:TODO/guildScheduledEventUpdate.ts
@@ -0,0 +1,43 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+
+module.exports = {
+ name:'guildScheduledEventUpdate',
+ once:false,
+ async execute(oldEvent, newEvent) {
+ let oe = {
+ id: oldEvent.id,
+ name: oldEvent.name,
+ description: oldEvent.description,
+ channel: oldEvent.channel ? oldEvent.channel.id : null,
+ time: {
+ start: oldEvent.scheduledStartTimestamp,
+ end: oldEvent.scheduledEndTimestamp
+ },
+ date: oldEvent.date,
+ privacyLevel: oldEvent.privacyLevel,
+ entityType: oldEvent.entityType,
+ entityMetadata: oldEvent.entityMetadata,
+ status: oldEvent.status
+ }
+ let ne = {
+ id: newEvent.id,
+ name: newEvent.name,
+ description: newEvent.description,
+ channel: newEvent.channel ? newEvent.channel.id : null,
+ time: {
+ start: newEvent.scheduledStartTimestamp,
+ end: newEvent.scheduledEndTimestamp
+ },
+ date: newEvent.date,
+ privacyLevel: newEvent.privacyLevel,
+ entityType: newEvent.entityType,
+ entityMetadata: newEvent.entityMetadata,
+ status: newEvent.status
+ }
+
+ let data = JsonDiff.diff(oe, ne, {full: true});
+
+ addLog(newEvent.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildScheduledEventUserAdd.ts b/src/events:TODO/guildScheduledEventUserAdd.ts
new file mode 100644
index 0000000..caadd25
--- /dev/null
+++ b/src/events:TODO/guildScheduledEventUserAdd.ts
@@ -0,0 +1,20 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'guildScheduledEventUserAdd',
+ once:false,
+ async execute(event, member) {
+ let data = {
+ event: {
+ id: event.id,
+ name: event.name,
+ },
+ user: {
+ id: member.id,
+ username: member.username,
+ joinedEventAt: Date.now()
+ }
+ }
+ addLog(event.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildScheduledEventUserRemove.ts b/src/events:TODO/guildScheduledEventUserRemove.ts
new file mode 100644
index 0000000..9977709
--- /dev/null
+++ b/src/events:TODO/guildScheduledEventUserRemove.ts
@@ -0,0 +1,20 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'guildScheduledEventUserRemove',
+ once:false,
+ async execute(event, member) {
+ let data = {
+ event: {
+ id: event.id,
+ name: event.name,
+ },
+ user: {
+ id: member.id,
+ username: member.username,
+ leftEventAt: Date.now()
+ }
+ }
+ addLog(event.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/guildUpdate.ts b/src/events:TODO/guildUpdate.ts
new file mode 100644
index 0000000..2e93f5b
--- /dev/null
+++ b/src/events:TODO/guildUpdate.ts
@@ -0,0 +1,83 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+
+module.exports = {
+ name:'guildUpdate',
+ once:false,
+ async execute(oldGuild, newGuild) {
+
+ if(!newGuild.available) {
+ return addLog(newGuild.id, {id:newGuild.id,unavailable:true});
+ }
+
+ let og = {
+ afkChannel: oldGuild.afkChannel ? oldGuild.afkChannel.id : null,
+ afkTimeout: oldGuild.afkTimeout,
+ available: oldGuild.available,
+ banner: oldGuild.banner,
+ description: oldGuild.description,
+ discoverySplash: oldGuild.discoverySplash,
+ explicitContentFilter: oldGuild.explicitContentFilter,
+ features: oldGuild.features,
+ icon: oldGuild.icon,
+ id: oldGuild.id,
+ large: oldGuild.large,
+ maximumBitrate: oldGuild.maximumBitrate,
+ maximumMembers: oldGuild.maximumMembers,
+ mfaLevel: oldGuild.mfaLevel,
+ name: oldGuild.name,
+ nsfwLevel: oldGuild.nsfwLevel,
+ ownerid: oldGuild.ownerId,
+ partnered: oldGuild.partnered,
+ preferredLocale: oldGuild.preferredLocale,
+ premiumProgressBarEnabled: oldGuild.premiumProgressBarEnabled,
+ premiumSubscriptionCount: oldGuild.premiumSubscriptionCount,
+ premiumTier: oldGuild.premiumTier,
+ publicUpdatesChannel: oldGuild.publicUpdatesChannel ? oldGuild.publicUpdatesChannel.id : null,
+ rulesChannel: oldGuild.rulesChannel ? oldGuild.rulesChannel.id : null,
+ splash: oldGuild.splash,
+ systemChannel: oldGuild.systemChannel ? oldGuild.systemChannel.id : null,
+ vanityURLCode: oldGuild.vanityURLCode,
+ verificationLevel: oldGuild.verificationLevel,
+ verified: oldGuild.verified,
+ widgetChannel: oldGuild.widgetChannel ? oldGuild.widgetChannel.id : null,
+ widgetEnabled: oldGuild.widgetEnabled,
+ }
+ let ng = {
+ afkChannel: newGuild.afkChannel ? newGuild.afkChannel.id : null,
+ afkTimeout: newGuild.afkTimeout,
+ available: newGuild.available,
+ banner: newGuild.banner,
+ description: newGuild.description,
+ discoverySplash: newGuild.discoverySplash,
+ explicitContentFilter: newGuild.explicitContentFilter,
+ features: newGuild.features,
+ icon: newGuild.icon,
+ id: newGuild.id,
+ large: newGuild.large,
+ maximumBitrate: newGuild.maximumBitrate,
+ maximumMembers: newGuild.maximumMembers,
+ mfaLevel: newGuild.mfaLevel,
+ name: newGuild.name,
+ nsfwLevel: newGuild.nsfwLevel,
+ ownerid: newGuild.ownerId,
+ partnered: newGuild.partnered,
+ preferredLocale: newGuild.preferredLocale,
+ premiumProgressBarEnabled: newGuild.premiumProgressBarEnabled,
+ premiumSubscriptionCount: newGuild.premiumSubscriptionCount,
+ premiumTier: newGuild.premiumTier,
+ publicUpdatesChannel: newGuild.publicUpdatesChannel ? newGuild.publicUpdatesChannel.id : null,
+ rulesChannel: newGuild.rulesChannel ? newGuild.rulesChannel.id : null,
+ splash: newGuild.splash,
+ systemChannel: newGuild.systemChannel ? newGuild.systemChannel.id : null,
+ vanityURLCode: newGuild.vanityURLCode,
+ verificationLevel: newGuild.verificationLevel,
+ verified: newGuild.verified,
+ widgetChannel: newGuild.widgetChannel ? newGuild.widgetChannel.id : null,
+ widgetEnabled: newGuild.widgetEnabled,
+ }
+
+ let data = JsonDiff.diff(og, ng, {full:true});
+ addLog(newGuild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/inviteCreate.ts b/src/events:TODO/inviteCreate.ts
new file mode 100644
index 0000000..596bf58
--- /dev/null
+++ b/src/events:TODO/inviteCreate.ts
@@ -0,0 +1,22 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'inviteCreate',
+ once:false,
+ async execute(invite) {
+
+ const i = await invite.guild.invites.fetch(invite.code)
+
+ let data = {
+ channel: invite.channel.id,
+ code: invite.code,
+ createdAt: invite.createdTimestamp,
+ expiresAt: invite.expiresTimestamp,
+ createdBy: invite.inviter.id,
+ maxUsage: i.maxUses,
+ maxAge: i.maxAge
+ }
+
+ addLog(invite.guild.id, data)
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/inviteDelete.ts b/src/events:TODO/inviteDelete.ts
new file mode 100644
index 0000000..609ce6f
--- /dev/null
+++ b/src/events:TODO/inviteDelete.ts
@@ -0,0 +1,21 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'inviteDelete',
+ once:false,
+ async execute(invite) {
+
+ let logs = await invite.guild.fetchAuditLogs({type: 'INVITE_DELETE'});
+ let entry = logs.entries.find(e => e.target.code === invite.code);
+
+ let data = {
+ channel: invite.channel.id,
+ code: invite.code,
+ deletedAt: invite.deletedTimestamp,
+ deletedBy: entry.executor.id
+ }
+
+ addLog(invite.guild.id, data)
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/messageCreate.ts b/src/events:TODO/messageCreate.ts
new file mode 100644
index 0000000..46e8795
--- /dev/null
+++ b/src/events:TODO/messageCreate.ts
@@ -0,0 +1,32 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'messageCreate',
+ once:false,
+ async execute(message) {
+
+ const guildConfig = require(`../data/guilds/${message.guild.id}/config.json`);
+ if(guildConfig.images.enabled) {
+
+ }
+ if(guildConfig.wordFilter.enabled) {
+ for(word of guildConfig.wordFilter.words.strict) {
+ if(message.content.toLowerCase().includes(word)) {
+ message.delete();
+ // message.channel.send(`${message.author} has been warned for using a banned word.`);
+ break;
+ }
+ }
+ for(word of message.content.split(' ')) {
+ if(guildConfig.wordFilter.words.soft.includes(word)) {
+ message.delete();
+ // message.channel.send(`${message.author} has been warned for using a banned word.`);
+ break;
+ }
+ }
+
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/messageDeleteBulk.ts b/src/events:TODO/messageDeleteBulk.ts
new file mode 100644
index 0000000..92d9134
--- /dev/null
+++ b/src/events:TODO/messageDeleteBulk.ts
@@ -0,0 +1,25 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'messageDeleteBulk',
+ once:false,
+ async execute(messages) {
+
+ let logs = await messages.first().guild.fetchAuditLogs({type: 'MESSAGE_DELETE_BULK'});
+ let entry = logs.entries.first();
+
+ let data = {
+ messages:messages.map(message=>{
+ return {
+ id:message.id,
+ channel:message.channel.id,
+ content:message.content
+ }
+ }),
+ deletedBy:entry.executor.id,
+ deletedAt:entry.createdAt
+ }
+
+ addLog(messages.first().guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/messageReactionAdd.ts b/src/events:TODO/messageReactionAdd.ts
new file mode 100644
index 0000000..c59a16f
--- /dev/null
+++ b/src/events:TODO/messageReactionAdd.ts
@@ -0,0 +1,24 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'messageReactionAdd',
+ once:false,
+ async execute(messageReaction, user) {
+ let data = {
+ messageReaction: {
+ messageID: messageReaction.message.id,
+ reactionEmoji: {
+ name: messageReaction.emoji.name,
+ id: messageReaction.emoji.id
+ },
+ addedAt: Date.now()
+ },
+ user: {
+ id: user.id,
+ username: user.username
+ }
+ }
+
+ addLog(messageReaction.message.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/messageReactionRemove.ts b/src/events:TODO/messageReactionRemove.ts
new file mode 100644
index 0000000..685ad37
--- /dev/null
+++ b/src/events:TODO/messageReactionRemove.ts
@@ -0,0 +1,25 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'messageReactionRemove',
+ once:false,
+ async execute(messageReaction, user) {
+ let data = {
+ messageReaction: {
+ messageID: messageReaction.message.id,
+ reactionEmoji: {
+ name: messageReaction.emoji.name,
+ id: messageReaction.emoji.id
+ },
+ removedAt: Date.now()
+ },
+ user: {
+ id: user.id,
+ username: user.username
+ }
+ }
+
+ addLog(messageReaction.message.guild.id, data);
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/messageReactionRemoveAll.ts b/src/events:TODO/messageReactionRemoveAll.ts
new file mode 100644
index 0000000..e4254da
--- /dev/null
+++ b/src/events:TODO/messageReactionRemoveAll.ts
@@ -0,0 +1,20 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'messageReactionRemoveAll',
+ once:false,
+ async execute(message, reactions) {
+ let data = {
+ messageID: message.id,
+ reactions: reactions.map(r => {
+ return {
+ name: r.emoji.name,
+ id: r.emoji.id
+ }
+ }),
+ removedAt: Date.now()
+ }
+
+ addLog(message.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/messageReactionRemoveEmoji.ts b/src/events:TODO/messageReactionRemoveEmoji.ts
new file mode 100644
index 0000000..9a709f8
--- /dev/null
+++ b/src/events:TODO/messageReactionRemoveEmoji.ts
@@ -0,0 +1,15 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'messageReactionRemoveEmoji',
+ once:false,
+ async execute(messageReaction) {
+ let data = {
+ name: messageReaction.emoji.name,
+ id: messageReaction.emoji.id,
+ removedAt: Date.now()
+ }
+
+ addLog(messageReaction.message.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/stageInstanceCreate.ts b/src/events:TODO/stageInstanceCreate.ts
new file mode 100644
index 0000000..1f56418
--- /dev/null
+++ b/src/events:TODO/stageInstanceCreate.ts
@@ -0,0 +1,20 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'stageInstanceCreate',
+ once:false,
+ async execute(stageInstance) {
+ let data = {
+ id: stageInstance.id,
+ channel: stageInstance.channel.id,
+ channelName: stageInstance.channel.name,
+ createdAt: stageInstance.createdTimestamp,
+ topic: stageInstance.topic,
+ discoverable: !stageInstance.discoverableDisabled,
+ privacy: stageInstance.privacyLevel
+ }
+
+ addLog(role.guild.id, data);
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/stageInstanceDelete.ts b/src/events:TODO/stageInstanceDelete.ts
new file mode 100644
index 0000000..e8e0e78
--- /dev/null
+++ b/src/events:TODO/stageInstanceDelete.ts
@@ -0,0 +1,25 @@
+const {addLog} = require('../scripts/addLogs');
+
+module.exports = {
+ name:'stageInstanceDelete',
+ once:false,
+ async execute(stageInstance) {
+
+ let logs = await stageInstance.guild.fetchAuditLogs({type: 'STAGE_INSTANCE_DELETE'});
+ let entry = logs.entries.find(e => e.target.id === stageInstance.id);
+
+ let data = {
+ id: stageInstance.id,
+ channel: stageInstance.channel.id,
+ channelName: stageInstance.channel.name,
+ deletedAt: entry.createdTimestamp,
+ deletedBy: entry.deletedBy,
+ topic: stageInstance.topic,
+ discoverable: !stageInstance.discoverableDisabled,
+ privacy: stageInstance.privacyLevel
+ }
+
+ addLog(role.guild.id, data);
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/stageInstanceUpdate.ts b/src/events:TODO/stageInstanceUpdate.ts
new file mode 100644
index 0000000..e516915
--- /dev/null
+++ b/src/events:TODO/stageInstanceUpdate.ts
@@ -0,0 +1,30 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+
+module.exports = {
+ name:'stageInstanceUpdate',
+ once:false,
+ async execute(oldStage, newStage) {
+ let os = {
+ id: oldStage.id,
+ channel: oldStage.channel.id,
+ channelName: oldStage.channel.name,
+ topic: oldStage.topic,
+ discoverable: !oldStage.discoverableDisabled,
+ privacy: oldStage.privacyLevel
+ }
+
+ let ns = {
+ id: newStage.id,
+ channel: newStage.channel.id,
+ channelName: newStage.channel.name,
+ topic: newStage.topic,
+ discoverable: !newStage.discoverableDisabled,
+ privacy: newStage.privacyLevel
+ }
+
+ let data = JsonDiff.diff(os, ns, {full: true});
+
+ addLog(role.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/stickerCreate.ts b/src/events:TODO/stickerCreate.ts
new file mode 100644
index 0000000..c968c2a
--- /dev/null
+++ b/src/events:TODO/stickerCreate.ts
@@ -0,0 +1,18 @@
+const {addLog} = require('../scripts/addLogs');
+module.exports = {
+ name:'stickerCreate',
+ once:false,
+ async execute(sticker) {
+ let data = {
+ id: sticker.id,
+ createdAt: sticker.createdTimestamp,
+ description: sticker.description,
+ name: sticker.name,
+ type: sticker.type,
+ tags: sticker.tags,
+ createdBy: sticker.user.id
+ }
+
+ addLog(role.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/stickerDelete.ts b/src/events:TODO/stickerDelete.ts
new file mode 100644
index 0000000..67654f3
--- /dev/null
+++ b/src/events:TODO/stickerDelete.ts
@@ -0,0 +1,23 @@
+const {addLog} = require('../scripts/addLogs');
+module.exports = {
+ name:'stickerDelete',
+ once:false,
+ async execute(sticker) {
+
+ let logs = await sticker.guild.fetchAuditLogs({type: 'STICKER_DELETE'});
+ let entry = logs.entries.find(e => e.target.id === sticker.id);
+
+ let data = {
+ id: sticker.id,
+ deletedAt: entry.createdTimestamp,
+ description: sticker.description,
+ name: sticker.name,
+ type: sticker.type,
+ tags: sticker.tags,
+ deletedBy: entry.executor.id
+ }
+
+ addLog(role.guild.id, data);
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/stickerUpdate.ts b/src/events:TODO/stickerUpdate.ts
new file mode 100644
index 0000000..33e4cdf
--- /dev/null
+++ b/src/events:TODO/stickerUpdate.ts
@@ -0,0 +1,27 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+module.exports = {
+ name:'stickerUpdate',
+ once:false,
+ async execute(oldSticker, newSticker) {
+ let os = {
+ id: sticker.id,
+ description: sticker.description,
+ name: sticker.name,
+ type: sticker.type,
+ tags: sticker.tags,
+ }
+
+ let ns = {
+ id: sticker.id,
+ description: sticker.description,
+ name: sticker.name,
+ type: sticker.type,
+ tags: sticker.tags,
+ }
+
+ let data = JsonDiff.diff(os, ns, {full: true});
+
+ addLog(role.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/threadCreate.ts b/src/events:TODO/threadCreate.ts
new file mode 100644
index 0000000..63c29a4
--- /dev/null
+++ b/src/events:TODO/threadCreate.ts
@@ -0,0 +1,22 @@
+const {addLog} = require('../scripts/addLogs');
+module.exports = {
+ name:'threadCreate',
+ once:false,
+ async execute(thread) {
+
+ let data = {
+ autoArchiveDuration: thread.autoArchiveDuration,
+ id: thread.id,
+ locked: thread.locked,
+ name: thread.name,
+ parentChannel: thread.parent.id,
+ slowmode: thread.rateLimitPerUser,
+ type: thread.type,
+ createdAt: thread.createdTimestamp,
+ createdBy: thread.ownerId
+ }
+
+ addLog(thread.guild.id, data);
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/threadDelete.ts b/src/events:TODO/threadDelete.ts
new file mode 100644
index 0000000..43cba66
--- /dev/null
+++ b/src/events:TODO/threadDelete.ts
@@ -0,0 +1,25 @@
+const {addLog} = require('../scripts/addLogs');
+module.exports = {
+ name:'threadDelete',
+ once:false,
+ async execute(thread) {
+
+ let logs = await thread.guild.fetchAuditLogs({type: 'THREAD_DELETE'});
+ let entry = logs.entries.find(e => e.target.id === thread.id);
+
+ let data = {
+ autoArchiveDuration: thread.autoArchiveDuration,
+ id: thread.id,
+ locked: thread.locked,
+ name: thread.name,
+ parentChannel: thread.parent.id,
+ slowmode: thread.rateLimitPerUser,
+ type: thread.type,
+ deletedAt: entry.createdTimestamp,
+ deletedBy: entry.executor.id
+ }
+
+ addLog(thread.guild.id, data);
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/threadMembersUpdate.ts b/src/events:TODO/threadMembersUpdate.ts
new file mode 100644
index 0000000..fab4ef5
--- /dev/null
+++ b/src/events:TODO/threadMembersUpdate.ts
@@ -0,0 +1,15 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+module.exports = {
+ name:'threadMembersUpdate',
+ once:false,
+ async execute(oldMembers, newMembers) {
+
+ let om = oldMembers.map(m => m.id);
+ let nm = newMembers.map(m => m.id);
+ let data = JsonDiff.diff(om, nm);
+
+ addLog(newMembers.first().guild.id, data);
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/threadUpdate.ts b/src/events:TODO/threadUpdate.ts
new file mode 100644
index 0000000..cfaed14
--- /dev/null
+++ b/src/events:TODO/threadUpdate.ts
@@ -0,0 +1,31 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+module.exports = {
+ name:'threadUpdate',
+ once:false,
+ async execute(oldThread, newThread) {
+ let ot = {
+ autoArchiveDuration: oldThread.autoArchiveDuration,
+ id: oldThread.id,
+ locked: oldThread.locked,
+ name: oldThread.name,
+ parentChannel: oldThread.parent.id,
+ slowmode: oldThread.rateLimitPerUser,
+ type: oldThread.type,
+ }
+ let nt = {
+ autoArchiveDuration: newThread.autoArchiveDuration,
+ id: newThread.id,
+ locked: newThread.locked,
+ name: newThread.name,
+ parentChannel: newThread.parent.id,
+ slowmode: newThread.rateLimitPerUser,
+ type: newThread.type,
+ }
+
+ let data = JsonDiff.diff(ot, nt, {full: true});
+
+ addLog(newThread.guild.id, data);
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/userUpdate.ts b/src/events:TODO/userUpdate.ts
new file mode 100644
index 0000000..a6735c8
--- /dev/null
+++ b/src/events:TODO/userUpdate.ts
@@ -0,0 +1,9 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+module.exports = {
+ name:'userUpdate',
+ once:false,
+ async execute(args) {
+
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/voiceStateUpdate.ts b/src/events:TODO/voiceStateUpdate.ts
new file mode 100644
index 0000000..3754f0c
--- /dev/null
+++ b/src/events:TODO/voiceStateUpdate.ts
@@ -0,0 +1,35 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+module.exports = {
+ name:'voiceStateUpdate',
+ once:false,
+ async execute(oldState, newState) {
+ let os = {
+ channel:oldState.channel ? oldState.channel.id : null,
+ serverDeaf:oldState.serverDeaf,
+ serverMute:oldState.serverMute,
+ selfDeaf:oldState.selfDeaf,
+ selfMute:oldState.selfMute,
+ selfVideo:oldState.selfVideo,
+ streaming:oldState.streaming,
+ id:oldState.id,
+ requestToSpeakTimestamp:oldState.requestToSpeakTimestamp
+ }
+
+ let ns = {
+ channel:newState.channel ? newState.channel.id : null,
+ serverDeaf:newState.serverDeaf,
+ serverMute:newState.serverMute,
+ selfDeaf:newState.selfDeaf,
+ selfMute:newState.selfMute,
+ selfVideo:newState.selfVideo,
+ streaming:newState.streaming,
+ id:newState.id,
+ requestToSpeakTimestamp:newState.requestToSpeakTimestamp
+ }
+
+ let data = JsonDiff.diff(os, ns, {full: true});
+
+ addLog(oldState.guild.id, data);
+ }
+}
\ No newline at end of file
diff --git a/src/events:TODO/webhookUpdate.ts b/src/events:TODO/webhookUpdate.ts
new file mode 100644
index 0000000..56affc4
--- /dev/null
+++ b/src/events:TODO/webhookUpdate.ts
@@ -0,0 +1,9 @@
+const {addLog} = require('../scripts/addLogs');
+const JsonDiff = require('json-diff');
+module.exports = {
+ name:'webhookUpdate',
+ once:false,
+ async execute(args) {
+
+ }
+}
\ No newline at end of file