Enhance scheduler functionality with timezone support and error handling
- Updated scheduling logic to utilize the guild's timezone for cron expressions and one-time scheduling. - Introduced a new `getGuildTimezone` function to retrieve the timezone from guild settings. - Enhanced error handling for scheduling inputs, providing localized error messages for invalid cron expressions and missing schedule times. - Improved the WebUI to support a new timing mode selection (once vs. cron) and updated input fields accordingly. - Added localization entries for new scheduling-related messages in both English and German. - Refactored job scheduling and removal logic to ensure proper handling of scheduled jobs in the queue.
This commit is contained in:
@@ -933,6 +933,11 @@
|
||||
"rolePingId": "Zu erwähnende Rolle",
|
||||
"cron": "Cron-Ausdruck",
|
||||
"runAt": "Ausführen am",
|
||||
"timingMode": "Zeitplan",
|
||||
"timingModes": {
|
||||
"once": "Einmalig",
|
||||
"cron": "Wiederkehrend (Cron)"
|
||||
},
|
||||
"content": "Nachrichtentext",
|
||||
"embed": "Embed (optional)",
|
||||
"components": "Components-V2-Layout",
|
||||
@@ -943,10 +948,15 @@
|
||||
"components_v2": "Components V2"
|
||||
},
|
||||
"componentsPreview": "(Components V2)",
|
||||
"cronHint": "Cron-Ausdruck für wiederkehrende Nachrichten ODER ein einmaliges Datum/Uhrzeit — nicht beides. Wähle Text, Embed oder Components V2 (gegenseitig ausgeschlossen).",
|
||||
"cronHint": "Einmalige Zeit oder Cron-Wiederholung — bezogen auf die Server-Zeitzone unter Allgemeine Einstellungen. Wähle Text, Embed oder Components V2 (gegenseitig ausgeschlossen).",
|
||||
"create": "Nachricht planen",
|
||||
"created": "Nachricht geplant.",
|
||||
"formIncomplete": "Bitte Kanal, Nachrichtenformat mit Inhalt sowie Cron-Ausdruck oder Datum/Uhrzeit ausfüllen.",
|
||||
"errors": {
|
||||
"invalidCron": "Ungültiger Cron-Ausdruck (5–6 Felder, z. B. 0 9 * * *).",
|
||||
"invalidWhen": "Ungültiges Datum/Uhrzeit.",
|
||||
"missingScheduleTime": "Bitte Cron-Ausdruck oder Datum/Uhrzeit angeben."
|
||||
},
|
||||
"confirmDelete": "Diesen Zeitplan wirklich löschen?",
|
||||
"listTitle": "Geplante Nachrichten",
|
||||
"listDescription": "Anstehende und wiederkehrende geplante Nachrichten.",
|
||||
|
||||
@@ -933,6 +933,11 @@
|
||||
"rolePingId": "Role to ping",
|
||||
"cron": "Cron expression",
|
||||
"runAt": "Run at",
|
||||
"timingMode": "Schedule",
|
||||
"timingModes": {
|
||||
"once": "One-time",
|
||||
"cron": "Recurring (cron)"
|
||||
},
|
||||
"content": "Message content",
|
||||
"embed": "Embed (optional)",
|
||||
"components": "Components V2 layout",
|
||||
@@ -943,10 +948,15 @@
|
||||
"components_v2": "Components V2"
|
||||
},
|
||||
"componentsPreview": "(Components V2)",
|
||||
"cronHint": "Set a cron expression for recurring messages, or a one-time date/time — not both. Choose text, embed, or Components V2 (mutually exclusive).",
|
||||
"cronHint": "One-time time or cron recurrence — evaluated in the server timezone under General Settings. Choose text, embed, or Components V2 (mutually exclusive).",
|
||||
"create": "Schedule message",
|
||||
"created": "Message scheduled.",
|
||||
"formIncomplete": "Please fill channel, choose a message format with content, and either a cron expression or a date/time.",
|
||||
"errors": {
|
||||
"invalidCron": "Invalid cron expression (5–6 fields, e.g. 0 9 * * *).",
|
||||
"invalidWhen": "Invalid date/time.",
|
||||
"missingScheduleTime": "Provide a cron expression or a date/time."
|
||||
},
|
||||
"confirmDelete": "Really delete this schedule?",
|
||||
"listTitle": "Scheduled messages",
|
||||
"listDescription": "Upcoming and recurring scheduled messages.",
|
||||
|
||||
Reference in New Issue
Block a user