Fixed typing
diff --git a/src/events/guildMemberUpdate.ts b/src/events/guildMemberUpdate.ts
index 41a22c1..34a52b8 100644
--- a/src/events/guildMemberUpdate.ts
+++ b/src/events/guildMemberUpdate.ts
@@ -2,6 +2,7 @@
import type { NucleusClient } from "../utils/client.js";
import type { LoggerOptions } from "../utils/log.js";
import { generalException } from "../utils/createTemporaryStorage.js";
+import { doMemberChecks } from "../reflex/scanners.js";
export const event = "guildMemberUpdate";
@@ -92,6 +93,7 @@
if (!auditLog) return;
if (auditLog.executor!.id === client.user!.id) return;
if (before.nickname !== after.nickname) {
+ doMemberChecks(after, after.guild);
await client.database.history.create(
"nickname",
after.guild.id,
diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts
index 4a8d941..3b0cd62 100644
--- a/src/events/interactionCreate.ts
+++ b/src/events/interactionCreate.ts
@@ -19,10 +19,7 @@
async function errorMessage(interaction: ButtonInteraction, message: string) {
await interaction.reply({
- embeds: [new EmojiEmbed()
- .setDescription(message)
- .setStatus("Danger")
- ],
+ embeds: [new EmojiEmbed().setDescription(message).setStatus("Danger")],
ephemeral: true,
components: []
});
@@ -60,23 +57,27 @@
const member = await interaction.guild?.members.fetch(memberId!);
switch (action) {
case "kick": {
- const check = await kickCheck(interaction, false, member)
+ const check = await kickCheck(interaction, false, member);
if (check !== true) return await errorMessage(interaction, check!);
return await kickCallback(interaction, member);
- } case "ban": {
- const check = await banCheck(interaction, false, member)
+ }
+ case "ban": {
+ const check = await banCheck(interaction, false, member);
if (check !== true) return await errorMessage(interaction, check!);
return await banCallback(interaction, member);
- } case "mute": {
- const check = await muteCheck(interaction, false, member)
+ }
+ case "mute": {
+ const check = await muteCheck(interaction, false, member);
if (check !== true) return await errorMessage(interaction, check!);
return await muteCallback(interaction, member);
- } case "nickname": {
- const check = await nicknameCheck(interaction, false, member)
+ }
+ case "nickname": {
+ const check = await nicknameCheck(interaction, false, member);
if (check !== true) return await errorMessage(interaction, check || "Something went wrong");
return await nicknameCallback(interaction, member);
- } case "warn": {
- const check = await warnCheck(interaction, false, member)
+ }
+ case "warn": {
+ const check = await warnCheck(interaction, false, member);
if (check !== true) return await errorMessage(interaction, check!);
return await warnCallback(interaction, member);
}
diff --git a/src/events/memberJoin.ts b/src/events/memberJoin.ts
index 191ba6b..66abe28 100644
--- a/src/events/memberJoin.ts
+++ b/src/events/memberJoin.ts
@@ -9,7 +9,7 @@
export async function callback(client: NucleusClient, member: GuildMember) {
welcome(member);
statsChannelAdd(member.user, member.guild);
- doMemberChecks(member, member.guild)
+ doMemberChecks(member, member.guild);
const { log, isLogging, NucleusColors, entry, renderUser, renderDelta } = client.logger;
if (!(await isLogging(member.guild.id, "guildMemberUpdate"))) return;
await client.database.history.create("join", member.guild.id, member.user, null, null);