Enhance verification module with improved command handling and localization
- Updated the verification command to utilize a new `ephemeral` utility for consistent ephemeral message replies. - Refactored the `buildVerificationPanel` function to include localization support for panel titles and descriptions. - Added permission checks to ensure the bot can post in the designated verification channel. - Introduced a new verification queue in the queue management system for better handling of verification tasks. - Updated localization files to include new keys for verification-related messages in both English and German.
This commit is contained in:
@@ -19,6 +19,7 @@ export const scheduleQueueName = 'schedules';
|
||||
export const guildBackupQueueName = 'guild-backups';
|
||||
export const suggestionsQueueName = 'suggestions';
|
||||
export const messagesQueueName = 'messages';
|
||||
export const verificationQueueName = 'verification';
|
||||
|
||||
const globalForQueues = globalThis as unknown as {
|
||||
__nexumiGiveawayQueue?: Queue;
|
||||
@@ -26,6 +27,7 @@ const globalForQueues = globalThis as unknown as {
|
||||
__nexumiGuildBackupQueue?: Queue;
|
||||
__nexumiSuggestionsQueue?: Queue;
|
||||
__nexumiMessagesQueue?: Queue;
|
||||
__nexumiVerificationQueue?: Queue;
|
||||
__nexumiGiveawayQueueEvents?: QueueEvents;
|
||||
__nexumiGuildBackupQueueEvents?: QueueEvents;
|
||||
__nexumiSuggestionsQueueEvents?: QueueEvents;
|
||||
@@ -76,6 +78,13 @@ export function getMessagesQueue(): Queue {
|
||||
return globalForQueues.__nexumiMessagesQueue;
|
||||
}
|
||||
|
||||
export function getVerificationQueue(): Queue {
|
||||
globalForQueues.__nexumiVerificationQueue ??= new Queue(verificationQueueName, {
|
||||
connection: queueConnection()
|
||||
});
|
||||
return globalForQueues.__nexumiVerificationQueue;
|
||||
}
|
||||
|
||||
/**
|
||||
* QueueEvents instances are only needed for jobs where the dashboard needs
|
||||
* to wait for the bot to finish (e.g. ending a giveaway so the winners list
|
||||
|
||||
Reference in New Issue
Block a user