mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 07:14:14 +02:00
feat(arabot): remove temp ban if ban command is run
This commit is contained in:
parent
922dd7556e
commit
2833c54c75
@ -29,6 +29,7 @@ import { EmbedBuilder } from 'discord.js';
|
||||
import IDs from '#utils/ids';
|
||||
import { addBan, checkBan } from '#utils/database/ban';
|
||||
import { addEmptyUser, updateUser, userExists } from '#utils/database/dbExistingUser';
|
||||
import { checkTempBan, removeTempBan } from '#utils/database/tempBan';
|
||||
|
||||
export class BanCommand extends Command {
|
||||
public constructor(context: Command.Context, options: Command.Options) {
|
||||
@ -188,6 +189,10 @@ export class BanCommand extends Command {
|
||||
// Add ban to database
|
||||
await addBan(userId, modId, reason);
|
||||
|
||||
if (await checkTempBan(userId)) {
|
||||
await removeTempBan(userId);
|
||||
}
|
||||
|
||||
info.message = `${user} has been banned.`;
|
||||
info.success = true;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user