mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 15:04:29 +02:00
feat(verify): add verify block dm for timeout/leave
This commit is contained in:
parent
1993682484
commit
9cc7e53ea9
@ -21,6 +21,7 @@ import { container, Listener } from '@sapphire/framework';
|
|||||||
import type {
|
import type {
|
||||||
VoiceState, CategoryChannel, VoiceChannel, TextChannel,
|
VoiceState, CategoryChannel, VoiceChannel, TextChannel,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
|
import { time } from '@discordjs/builders';
|
||||||
import { maxVCs, leaveBan } from '../../utils/verificationConfig';
|
import { maxVCs, leaveBan } from '../../utils/verificationConfig';
|
||||||
import { getUser, checkFinish, countIncomplete } from '../../utils/database/verification';
|
import { getUser, checkFinish, countIncomplete } from '../../utils/database/verification';
|
||||||
import { fetchRoles } from '../../utils/database/dbExistingUser';
|
import { fetchRoles } from '../../utils/database/dbExistingUser';
|
||||||
@ -94,6 +95,9 @@ class VerificationLeaveVCListener extends Listener {
|
|||||||
userId: user.id,
|
userId: user.id,
|
||||||
guildId: guild.id,
|
guildId: guild.id,
|
||||||
}, banLength);
|
}, banLength);
|
||||||
|
|
||||||
|
await user.user.send('You have disconnected or been timed out as a verifier had not joined for 15 minutes from Verification.\n\n'
|
||||||
|
+ `You can verify again at: ${time(Math.round(Date.now() / 1000) + (banLength / 1000))}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user