diff --git a/events/audit_log_create.js b/events/audit_log_create.js new file mode 100644 index 0000000..c3a0fe4 --- /dev/null +++ b/events/audit_log_create.js @@ -0,0 +1,13 @@ +module.exports = { + name: "Audit Log Created", + nameSchemes: ["Store Audit Log As"], + + initialize(client, data, run) { + client.on('guildAuditLogEntryCreate', (guild, auditLogEntry) => { + run([ + auditLogEntry + ], { guild }) + }) + } + }; + \ No newline at end of file diff --git a/events/bot_ready.js b/events/bot_ready.js new file mode 100644 index 0000000..debc4d9 --- /dev/null +++ b/events/bot_ready.js @@ -0,0 +1,7 @@ +module.exports = { + name: "Bot Ready", + nameSchemes: [], + initialize(client, data, run) { + run([], {}) + } +} diff --git a/events/bulk_delete_messages.js b/events/bulk_delete_messages.js new file mode 100644 index 0000000..d13b4bd --- /dev/null +++ b/events/bulk_delete_messages.js @@ -0,0 +1,9 @@ +module.exports = { + name: "Messages Bulk Delete", + nameSchemes: ["Store Deleted Messages List As"], + initialize(client, data, run) { + client.on('messageDeleteBulk', (messages) => { + run(messages, messages) + }) + } +}; \ No newline at end of file diff --git a/events/button_interaction.js b/events/button_interaction.js new file mode 100644 index 0000000..f9e6b1a --- /dev/null +++ b/events/button_interaction.js @@ -0,0 +1,15 @@ +module.exports = { + name: "Button Interaction", + nameSchemes: ["Store Button Interaction As", "Store Button Custom ID As", "Store Button Message As"], + initialize(client, data, run) { + client.on('interactionCreate', (interaction) => { + if (interaction.type != 3 || interaction.data.values) return; + + run([ + interaction, + interaction.data.customID, + interaction.message + ], interaction) + }) + } +}; \ No newline at end of file diff --git a/events/channel_create.js b/events/channel_create.js new file mode 100644 index 0000000..373451c --- /dev/null +++ b/events/channel_create.js @@ -0,0 +1,12 @@ +module.exports = { + name: "Channel Create", + nameSchemes: ["Store Channel As"], + + initialize(client, data, run) { + client.on('channelCreate', (channel) => { + run([ + channel + ], channel) + }) + } +}; diff --git a/events/channel_delete.js b/events/channel_delete.js new file mode 100644 index 0000000..fb387a0 --- /dev/null +++ b/events/channel_delete.js @@ -0,0 +1,12 @@ +module.exports = { + name: "Channel Delete", + nameSchemes: ["Store Channel As"], + + initialize(client, data, run) { + client.on('channelDelete', (channel) => { + run([ + channel + ], channel) + }) + } +}; diff --git a/events/channel_pins_update.js b/events/channel_pins_update.js new file mode 100644 index 0000000..35b5033 --- /dev/null +++ b/events/channel_pins_update.js @@ -0,0 +1,12 @@ +module.exports = { + name: "Channel Pins Update", + nameSchemes: ["Store Channel As"], + + initialize(client, data, run) { + client.on('channelPinsUpdate', (channel) => { + run([ + channel + ], channel) + }) + } +}; diff --git a/events/channel_update.js b/events/channel_update.js new file mode 100644 index 0000000..5cb110b --- /dev/null +++ b/events/channel_update.js @@ -0,0 +1,12 @@ +module.exports = { + name: "Channel Update", + nameSchemes: ["Store Channel Before Update As", "Store Channel After Update As"], + initialize(client, data, run) { + client.on('channelUpdate', (updated, old) => { + run([ + old, + updated + ], updated) + }) + } +}; diff --git a/events/cron_job.js b/events/cron_job.js new file mode 100644 index 0000000..58b25e2 --- /dev/null +++ b/events/cron_job.js @@ -0,0 +1,17 @@ +module.exports = { + name: "Cron Job", + nameSchemes: [`Cron String Input +
Examples
`, + "Cron Timezone (Leave blank for default)" + ], + preventStorage: [`Cron String Input +
Examples
`, + "Cron Timezone (Leave blank for default)" +], + initialize(client, data, run) { + const cron = require('node-cron'); + cron.schedule(data[0], () => { + run([], {}); + }, data[1] ? {timezone: data[1]} : null); + } +}; \ No newline at end of file diff --git a/events/dropdown_interaction.js b/events/dropdown_interaction.js new file mode 100644 index 0000000..6a066cf --- /dev/null +++ b/events/dropdown_interaction.js @@ -0,0 +1,16 @@ +module.exports = { + name: "Select Menu Interaction", + nameSchemes: ["Store Menu Interaction As", "Store Menu Custom ID As", "Store Choices Values List As", "Store Interaction Message As"], + initialize(client, data, run) { + client.on('interactionCreate', (interaction) => { + if (interaction.type != 3 || !interaction.data.values) return; + + run([ + interaction, + interaction.data.customID, + interaction.data.values.raw, + interaction.message + ], interaction) + }) + } +}; \ No newline at end of file diff --git a/events/guildCreate.js b/events/guildCreate.js new file mode 100644 index 0000000..908584b --- /dev/null +++ b/events/guildCreate.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Bot Join Server", + nameSchemes: ["Store Server As"], + initialize(client, data, run) { + client.on('guildCreate', (guild) => { + run([ + guild + ], {guild}) + }) + } +}; diff --git a/events/guildLeave.js b/events/guildLeave.js new file mode 100644 index 0000000..a8d1e95 --- /dev/null +++ b/events/guildLeave.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Bot Leave Server", + nameSchemes: ["Store Server As"], + initialize(client, data, run) { + client.on('guildDelete', (guild) => { + run([ + guild + ], {guild}) + }) + } +}; diff --git a/events/guild_ban_add.js b/events/guild_ban_add.js new file mode 100644 index 0000000..29032dd --- /dev/null +++ b/events/guild_ban_add.js @@ -0,0 +1,16 @@ +module.exports = { + name: "Member Ban", + nameSchemes: ["Store Guild As", "Store Member As"], + initialize(client, data, run) { + client.on('guildBanAdd', async (guild, member) => { + if (!guild.createdAt) { + guild = await client.rest.guilds.get(guild.id) + } + + run([ + member.guild, + member + ], { guild }) + }) + } +}; diff --git a/events/guild_ban_remove.js b/events/guild_ban_remove.js new file mode 100644 index 0000000..68a07e3 --- /dev/null +++ b/events/guild_ban_remove.js @@ -0,0 +1,16 @@ +module.exports = { + name: "Member Unban", + nameSchemes: ["Store Guild As", "Store Member As"], + initialize(client, data, run) { + client.on('guildBanRemove', async (guild, member) => { + if (!guild.createdAt) { + guild = await client.rest.guilds.get(guild.id) + } + + run([ + member.guild, + member + ], member) + }) + } +}; diff --git a/events/invite_create.js b/events/invite_create.js new file mode 100644 index 0000000..d4a705f --- /dev/null +++ b/events/invite_create.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Invite Create", + nameSchemes: ["Store Invite As"], + initialize(client, data, run) { + client.on('inviteCreate', (invite) => { + run([ + invite + ], invite) + }) + } +}; diff --git a/events/invite_delete.js b/events/invite_delete.js new file mode 100644 index 0000000..0aba205 --- /dev/null +++ b/events/invite_delete.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Invite Delete", + nameSchemes: ["Store Invite As"], + initialize(client, data, run) { + client.on('inviteDelete', (invite) => { + run([ + invite + ], invite) + }) + } +}; diff --git a/events/member_boost.js b/events/member_boost.js new file mode 100644 index 0000000..d6e0b71 --- /dev/null +++ b/events/member_boost.js @@ -0,0 +1,19 @@ +const { Client } = require("oceanic.js"); + +module.exports = { + name: "Member Boosted Server", + nameSchemes: ["Store Member As", "Store Server As"], + + /** + * @param {Client} client + * @param {*} data + * @param {*} run + */ + initialize(client, data, run) { + client.on('guildMemberUpdate', async (member, oldMember) => { + if (!oldMember.premiumSince && member.premiumSince) { + run([member, member.guild], member); + } + }); + } +}; \ No newline at end of file diff --git a/events/member_join_guild.js b/events/member_join_guild.js new file mode 100644 index 0000000..093e1a8 --- /dev/null +++ b/events/member_join_guild.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Member Join Server", + nameSchemes: ["Store Member As"], + async initialize(client, data, run) { + client.on('guildMemberAdd', async (member) => { + run([ + member + ], member) + }) + } +}; \ No newline at end of file diff --git a/events/member_leave_guild.js b/events/member_leave_guild.js new file mode 100644 index 0000000..274872b --- /dev/null +++ b/events/member_leave_guild.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Member Leave Server", + nameSchemes: ["Store Member As"], + async initialize(client, data, run) { + client.on('guildMemberRemove', async (member) => { + run([ + member + ], member) + }) + } +}; diff --git a/events/member_role_add.js b/events/member_role_add.js new file mode 100644 index 0000000..565fdf1 --- /dev/null +++ b/events/member_role_add.js @@ -0,0 +1,18 @@ +module.exports = { + name: "Member Role Add", + nameSchemes: ["Store Member As", "Store Role As"], + initialize(client, data, run) { + client.on('guildMemberUpdate', (member, oldMember) => { + if (oldMember && member.roles.length > oldMember.roles.length) { + let roleID = member.roles.find(r => !oldMember.roles.includes(r)); + let role = member.guild.roles.get(roleID); + + run([ + member, + role + ], { guild: member.guild }) + } + }) + } + }; + \ No newline at end of file diff --git a/events/member_role_remove.js b/events/member_role_remove.js new file mode 100644 index 0000000..977aae0 --- /dev/null +++ b/events/member_role_remove.js @@ -0,0 +1,18 @@ +module.exports = { + name: "Member Role Remove", + nameSchemes: ["Store Member As", "Store Role As"], + initialize(client, data, run) { + client.on('guildMemberUpdate', (member, oldMember) => { + if (oldMember && member.roles.length < oldMember.roles.length) { + let roleID = oldMember.roles.find(r => !member.roles.includes(r)); + let role = member.guild.roles.get(roleID); + + run([ + member, + role + ], { guild: member.guild }) + } + }) + } + }; + \ No newline at end of file diff --git a/events/member_switch_channel.js b/events/member_switch_channel.js new file mode 100644 index 0000000..f7ca74e --- /dev/null +++ b/events/member_switch_channel.js @@ -0,0 +1,17 @@ +module.exports = { + name: "Member Move Voice Channel", + nameSchemes: ["Store Member As", "Store Old Channel As", "Store New Channel As"], + async initialize(client, data, run) { + client.on('voiceChannelSwitch', async (member, oldChannel, channel) => { + let channel1 = client.getChannel(channel.id) || (await client.rest.channels.get(channel.id)); + let channel2 = client.getChannel(oldChannel.id) || (await client.rest.channels.get(oldChannel.id)); + let user = member.user; + user.member = member; + run([ + user, + channel1, + channel2 + ], {guild: member.guild}) + }) + } +} diff --git a/events/member_update.js b/events/member_update.js new file mode 100644 index 0000000..7baa4b8 --- /dev/null +++ b/events/member_update.js @@ -0,0 +1,22 @@ +const { Client } = require("oceanic.js"); + +module.exports = { + name: "Member Update", + nameSchemes: ["Store Member As", "Store Old Member As"], + + /** + * @param {Client} client + * @param {*} data + * @param {*} run + */ + initialize(client, data, run) { + client.on('guildMemberUpdate', async (member, oldJSONMember) => { + const {Member} = require('oceanic.js'); + let old = new Member(oldJSONMember); + run([ + member, + old + ], member) + }) + } +}; diff --git a/events/member_voice_update.js b/events/member_voice_update.js new file mode 100644 index 0000000..bb8d2e5 --- /dev/null +++ b/events/member_voice_update.js @@ -0,0 +1,13 @@ +module.exports = { + name: "Member Voice Update", + nameSchemes: ["Store Current Member As"], + async initialize(client, data, run) { + client.on('voiceStateUpdate', (member) => { + let user = member.user; + user.member = member; + run([ + user + ], {guild: member.guild}) + }) + } +} diff --git a/events/message_create.js b/events/message_create.js new file mode 100644 index 0000000..02def54 --- /dev/null +++ b/events/message_create.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Message Create", + nameSchemes: ["Store Message As"], + initialize(client, data, run) { + client.on('messageCreate', (message) => { + run([ + message + ], message) + }) + } +}; diff --git a/events/message_delete.js b/events/message_delete.js new file mode 100644 index 0000000..79d4591 --- /dev/null +++ b/events/message_delete.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Message Delete", + nameSchemes: ["Store Message As"], + initialize(client, data, run) { + client.on('messageDelete', async (message) => { + run([ + message + ], message) + }) + } +}; diff --git a/events/message_pin.js b/events/message_pin.js new file mode 100644 index 0000000..9486d11 --- /dev/null +++ b/events/message_pin.js @@ -0,0 +1,24 @@ +const { Client } = require("oceanic.js"); + +module.exports = { + name: "Message Pin", + nameSchemes: ["Store Message As"], + + /** + * @param {Client} client + * @param {*} data + * @param {*} run + */ + initialize(client, data, run) { + client.on('messageCreate', async (message) => { + if (message.type == 6) { + let messageID = message.messageReference?.messageID; + let channelID = message.messageReference?.channelID; + let msg = await (client.getChannel(channelID) || await client.rest.channels.get(channelID)).getMessage(messageID) + run([ + msg + ], msg); + } + }) + } +}; diff --git a/events/message_unpin.js b/events/message_unpin.js new file mode 100644 index 0000000..6e1660d --- /dev/null +++ b/events/message_unpin.js @@ -0,0 +1,14 @@ +module.exports = { + name: "Message Unpin", + nameSchemes: ["Store Message As"], + initialize(client, data, run) { + client.on('messageUpdate', async (message, oldMesssage) => { + if (!oldMesssage) return; + if (oldMesssage.pinned && !message.pinned) { + run([ + endChannel + ], endChannel); + } + }) + } +}; diff --git a/events/message_update.js b/events/message_update.js new file mode 100644 index 0000000..69a60d4 --- /dev/null +++ b/events/message_update.js @@ -0,0 +1,12 @@ +module.exports = { + name: "Message Update", + nameSchemes: ["Store Old Message As", "Store New Message As"], + initialize(client, data, run) { + client.on('messageUpdate', (updated, old) => { + run([ + old, + updated + ], updated) + }) + } +}; \ No newline at end of file diff --git a/events/poll_vote_add.js b/events/poll_vote_add.js new file mode 100644 index 0000000..c0fdc27 --- /dev/null +++ b/events/poll_vote_add.js @@ -0,0 +1,16 @@ +module.exports = { + name: "Poll Vote Add", + nameSchemes: ["Store Poll As"], + initialize(client, data, run) { + client.on('messagePollVoteAdd', (message, author, emoji) => { + run([ + { + emoji: emoji.name, + emojiID: emoji.id, + author, + message: message + } + ], {guild: message.guild}) + }) + } +}; \ No newline at end of file diff --git a/events/queue_end.js b/events/queue_end.js new file mode 100644 index 0000000..a10c83b --- /dev/null +++ b/events/queue_end.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Queue End", + nameSchemes: ["Store Voice Channel As"], + initialize(client, data, run) { + client.on('queueEnd', (guild, channel) => { + run([ + channel + ], {guild}) + }) + } +}; \ No newline at end of file diff --git a/events/queue_song_add.js b/events/queue_song_add.js new file mode 100644 index 0000000..7d903e5 --- /dev/null +++ b/events/queue_song_add.js @@ -0,0 +1,12 @@ +module.exports = { + name: "Queue Song Add", + nameSchemes: ["Store Voice Channel As", "Store Track As"], + initialize(client, data, run) { + client.on('queueSongAdd', (guild, channel, track) => { + run([ + channel, + track + ], {guild}) + }) + } +}; \ No newline at end of file diff --git a/events/queue_song_remove.js b/events/queue_song_remove.js new file mode 100644 index 0000000..c75304e --- /dev/null +++ b/events/queue_song_remove.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Queue Song Remove", + nameSchemes: ["Store Voice Channel As"], + initialize(client, data, run) { + client.on('queueSongRemove', (guild, channel) => { + run([ + channel + ], {guild}) + }) + } +}; \ No newline at end of file diff --git a/events/reaction_add.js b/events/reaction_add.js new file mode 100644 index 0000000..8786cf1 --- /dev/null +++ b/events/reaction_add.js @@ -0,0 +1,19 @@ +module.exports = { + name: "Reaction Add", + nameSchemes: ["Store Reaction As"], + initialize(client, data, run) { + client.on('messageReactionAdd', async (reactionMessage, author, emoji) => { + if (!reactionMessage.author) { + reactionMessage = await (client.getChannel(reactionMessage.channelID) || await client.rest.channels.get(reactionMessage.channelID)).getMessage(reactionMessage.id) + } + run([ + { + emoji: emoji.emoji.name, + emojiID: emoji.emoji.id, + author, + message: reactionMessage + } + ], { guild: reactionMessage.guild }) + }) + } +}; \ No newline at end of file diff --git a/events/reaction_remove.js b/events/reaction_remove.js new file mode 100644 index 0000000..0729e42 --- /dev/null +++ b/events/reaction_remove.js @@ -0,0 +1,20 @@ +module.exports = { + name: "Reaction Remove", + nameSchemes: ["Store Reaction As"], + initialize(client, data, run) { + client.on('messageReactionRemove', async (reactionMessage, author, emoji) => { + if (!reactionMessage.author) { + reactionMessage = await (client.getChannel(reactionMessage.channelID) || await client.rest.channels.get(reactionMessage.channelID)).getMessage(reactionMessage.id) + } + + run([ + { + emoji: emoji.name, + emojiID: emoji.id, + author, + message: reactionMessage + } + ], { guild: reactionMessage.guild }) + }) + } +} diff --git a/events/role_create.js b/events/role_create.js new file mode 100644 index 0000000..4dffdfb --- /dev/null +++ b/events/role_create.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Role Create", + nameSchemes: ["Store Role As"], + initialize(client, data, run) { + client.on('guildRoleCreate', (role) => { + run([ + role + ], role) + }) + } +}; diff --git a/events/role_delete.js b/events/role_delete.js new file mode 100644 index 0000000..d3f98fe --- /dev/null +++ b/events/role_delete.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Role Delete", + nameSchemes: ["Store Role As"], + initialize(client, data, run) { + client.on('guildRoleDelete', (role) => { + run([ + role + ], role) + }) + } +}; diff --git a/events/role_update.js b/events/role_update.js new file mode 100644 index 0000000..9fc579c --- /dev/null +++ b/events/role_update.js @@ -0,0 +1,18 @@ +const oceanic = require('oceanic.js'); + +module.exports = { + name: "Role Update", + nameSchemes: ["Store Role Before Update As", "Store Role After Update As"], + initialize(client, data, run) { + client.on('guildRoleUpdate', /** + * @param {oceanic.Role} updated + * @param {oceanic.JSONRole} old */ + (updated, old) => { + old.permissions = old.permissions.allow.toString() + run([ + (new oceanic.Role(old, old.guildID, client)), + updated + ], updated) + }) + } +}; \ No newline at end of file diff --git a/events/setInterval.js b/events/setInterval.js new file mode 100644 index 0000000..8456582 --- /dev/null +++ b/events/setInterval.js @@ -0,0 +1,10 @@ +module.exports = { + name: "Set Interval", + nameSchemes: ["Call Every ? Seconds"], + preventStorage: ["Call Every ? Seconds"], + initialize(client, data, run) { + setInterval(() => { + run([], {}) + }, parseFloat(data[0]) * 1000); + } +}; \ No newline at end of file diff --git a/events/thread_create.js b/events/thread_create.js new file mode 100644 index 0000000..20d260d --- /dev/null +++ b/events/thread_create.js @@ -0,0 +1,16 @@ +module.exports = { + name: "Thread Create", + nameSchemes: ["Store Thread As", "Store Thread Owner As"], + initialize(client, data, run) { + let createdThreads = {}; + client.on('threadCreate', (thread) => { + if (!createdThreads[thread.id]) { + createdThreads[thread.id] = true + run([ + thread, + thread.owner + ], thread) + } + }) + } +}; diff --git a/events/thread_delete.js b/events/thread_delete.js new file mode 100644 index 0000000..64386f5 --- /dev/null +++ b/events/thread_delete.js @@ -0,0 +1,16 @@ +module.exports = { + name: "Thread Delete", + nameSchemes: ["Store Thread As", "Store Thread Owner As"], + initialize(client, data, run) { + let deletedThreads = {}; + client.on('threadDelete', (thread) => { + if (!deletedThreads[thread.id]) { + deletedThreads[thread.id] = true + run([ + thread, + thread.owner + ], thread) + } + }) + } +}; diff --git a/events/thread_members_update.js b/events/thread_members_update.js new file mode 100644 index 0000000..d26e46a --- /dev/null +++ b/events/thread_members_update.js @@ -0,0 +1,13 @@ +module.exports = { + name: "Thread Members Update", + nameSchemes: ["Store Thread As", "Store Thread Added Members List As", "Store Thread Removed Members List As"], + initialize(client, data, run) { + client.on('threadMembersUpdate', (thread, addedMembers, removedMembers) => { + run([ + thread, + addedMembers, + removedMembers + ], thread) + }) + } +}; \ No newline at end of file diff --git a/events/thread_update.js b/events/thread_update.js new file mode 100644 index 0000000..bd0adfd --- /dev/null +++ b/events/thread_update.js @@ -0,0 +1,13 @@ +module.exports = { + name: "Thread Update", + nameSchemes: ["Store Thread Before Update As", "Store Thread After Update As"], + initialize(client, data, run) { + client.on('threadUpdate', (updated, old) => { + deletedThreads[thread.id] = true + run([ + old, + updated + ], thread) + }) + } +}; \ No newline at end of file diff --git a/events/track_end.js b/events/track_end.js new file mode 100644 index 0000000..01a5bc6 --- /dev/null +++ b/events/track_end.js @@ -0,0 +1,11 @@ +module.exports = { + name: "Track End", + nameSchemes: ["Store Voice Channel As"], + initialize(client, data, run) { + client.on('trackEnd', (guild, channel) => { + run([ + channel + ], {guild}) + }) + } +}; \ No newline at end of file diff --git a/events/track_start.js b/events/track_start.js new file mode 100644 index 0000000..ad4f8d4 --- /dev/null +++ b/events/track_start.js @@ -0,0 +1,12 @@ +module.exports = { + name: "Track Start", + nameSchemes: ["Store Voice Channel As", "Store Track As"], + initialize(client, data, run) { + client.on('trackStart', (guild, channel, track) => { + run([ + channel, + track + ], {guild}) + }) + } +}; \ No newline at end of file diff --git a/events/voice_join.js b/events/voice_join.js new file mode 100644 index 0000000..8a64487 --- /dev/null +++ b/events/voice_join.js @@ -0,0 +1,13 @@ +module.exports = { + name: "Member Join Voice Channel", + nameSchemes: ["Store Member As", "Store Voice Channel As"], + async initialize(client, data, run) { + client.on('voiceChannelJoin', async (member, channel) => { + let chnl = await client.rest.channels.get(channel.id); + run([ + member, + chnl + ], member) + }) + } +}; \ No newline at end of file diff --git a/events/voice_leave.js b/events/voice_leave.js new file mode 100644 index 0000000..6a3a761 --- /dev/null +++ b/events/voice_leave.js @@ -0,0 +1,13 @@ +module.exports = { + name: "Member Leave Voice Channel", + nameSchemes: ["Store Member As", "Store Voice Channel As"], + async initialize(client, data, run) { + client.on('voiceChannelLeave', async (member, channel) => { + let chnl = await client.rest.channels.get(channel.id); + run([ + member, + chnl + ], member) + }) + } +}; \ No newline at end of file diff --git a/events/webhook_update.js b/events/webhook_update.js new file mode 100644 index 0000000..530511b --- /dev/null +++ b/events/webhook_update.js @@ -0,0 +1,15 @@ +module.exports = { + name: "Webhook Update", + nameSchemes: ["Store Channel As"], + + initialize(client, data, run) { + client.on('webhooksUpdate', async (guild, channel) => { + if (!guild.createdAt) { + guild = await client.rest.guilds.get(guild.id) + } + run([ + channel + ], { guild }) + }) + } +};