feat(arabot): add bans on join for temp ban

This commit is contained in:
smyalygames
2023-02-17 01:26:33 +00:00
parent 2833c54c75
commit ef164125ea

View File

@@ -20,6 +20,7 @@
import { Listener } from '@sapphire/framework'; import { Listener } from '@sapphire/framework';
import type { GuildMember } from 'discord.js'; import type { GuildMember } from 'discord.js';
import { checkBan, getBanReason } from '#utils/database/ban'; import { checkBan, getBanReason } from '#utils/database/ban';
import { checkTempBan } from '#utils/database/tempBan';
export class BanJoinListener extends Listener { export class BanJoinListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) { public constructor(context: Listener.Context, options: Listener.Options) {
@@ -31,7 +32,8 @@ export class BanJoinListener extends Listener {
public async run(user: GuildMember) { public async run(user: GuildMember) {
// Check if the user is banned // Check if the user is banned
if (!await checkBan(user.id)) { if (!await checkBan(user.id)
&& !await checkTempBan(user.id)) {
return; return;
} }