mirror of
https://github.com/danbulant/Shasha
synced 2026-06-19 06:11:26 +00:00
Begin guildUpdate logger
This commit is contained in:
parent
7388f70bbb
commit
28347f073f
2 changed files with 17 additions and 0 deletions
4
Main.js
4
Main.js
|
|
@ -109,6 +109,10 @@ client.on("guildBanAdd", async (GUILD, USER) => {
|
|||
|
||||
client.on("guildBanRemove", async (GUILD, USER) => {
|
||||
lgr.guildBanRemove(GUILD, USER);
|
||||
});
|
||||
|
||||
client.on("guildUpdate", async (oldGuild, newGuild) => {
|
||||
lgr.guildUpdate(oldGuild, newGuild);
|
||||
})
|
||||
|
||||
client.on("messageDelete", async (msg) => {
|
||||
|
|
|
|||
13
resources/eventsLogger/guildUpdate.js
Normal file
13
resources/eventsLogger/guildUpdate.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
const { Guild } = require("discord.js");
|
||||
|
||||
/**
|
||||
* @param {Guild} oldGuild
|
||||
* @param {Guild} newGuild
|
||||
*/
|
||||
module.exports = async (oldGuild, newGuild) => {
|
||||
if (!newGuild.DB) await newGuild.dbLoad();
|
||||
let audit = (await newGuild.fetchAuditLogs({ "limit": 1, "type": "GUILD_UPDATE" })).entries.first();
|
||||
console.log(audit);
|
||||
}
|
||||
Loading…
Reference in a new issue