Skip to content

Commit

Permalink
[PATCH] Verification Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsundso authored Dec 29, 2023
2 parents 4639a4e + 98c08cf commit cf2e454
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const getEmbeds: CT.SettingsFile<typeof name>['getEmbeds'] = (
? [
{
name: lan.fields.kickafter.name,
value: embedParsers.time(Number(settings?.kickafter), language),
value: embedParsers.time(Number(settings?.kickafter) * 1000, language),
inline: true,
},
]
Expand Down
7 changes: 2 additions & 5 deletions src/Events/guildEvents/guildMemberAdd/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type * as Discord from 'discord.js';
import { scheduleJob } from 'node-schedule';
import * as ch from '../../../BaseClient/ClientHelper.js';
import * as CT from '../../../Typings/Typings.js';
import { canRemoveMember } from '../../../BaseClient/ClientHelperModules/requestHandler/guilds/removeMember.js';

export default async (member: Discord.GuildMember) => {
const verification = await ch.DataBase.verification.findUnique({
Expand Down Expand Up @@ -53,11 +54,7 @@ export const kick = async (
if (!verification.kicktof) return;
if (!verification.kickafter) return;
if (member.user.bot) return;

ch.logFiles.console.write(
`Would've tried kicking ${member.user.tag} from ${member.guild.name} (${member.guild.id})\n`,
);
return;
if (!canRemoveMember(await ch.getBotMemberFromGuild(member.guild), member)) return;

const dm = async () => {
ch.send(member.user, {
Expand Down

0 comments on commit cf2e454

Please sign in to comment.