Release/1.0.0 beta.3 #10

Merged
AstroGD merged 20 commits from release/1.0.0-beta.3 into main 2022-11-25 19:49:57 +01:00
2 changed files with 19 additions and 1 deletions
Showing only changes of commit d9c81ef3f2 - Show all commits

17
src/events/guildDelete.ts Normal file
View File

@ -0,0 +1,17 @@
import client from "../client";
import { Events } from "discord.js";
import { getGuildSetting } from "../tools/data";
import { Badword, database, GuildSetting } from "../data";
client.on(Events.GuildDelete, async (guild) => {
const settings = await getGuildSetting(guild.id);
if (settings.preserveDataOnGuildLeave) return;
await database.getRepository(GuildSetting).delete({
id: guild.id
});
await database.getRepository(Badword).delete({
guildID: guild.id
});
});

View File

@ -1 +1,2 @@
import "./channelUpdate";
import "./channelUpdate";
import "./guildDelete";