Improved error handling; Introduced i18n for /register, /unregister and /guess

This commit is contained in:
2025-04-29 13:50:38 +02:00
parent 28d6340847
commit 9d39b803f3
8 changed files with 177 additions and 76 deletions

View File

@@ -1,14 +1,30 @@
{
"messages": {
"operation_unconfirmed": "Operation not confirmed.",
"admin_user_channel_creation_failed": "Event channel could not be created for user **{display_name}** ({mention}) and event **{event_name}**.",
"admin_user_completed_event": "User **{display_name}** ({mention}) has completed the event",
"admin_user_completed_stage": "User **{display_name}** ({mention}) has completed the stage {stage_sequence} of the event **{event_name}**.",
"config_reset": "Configuration has been reset. You can update it using `/config set`, otherwise no events can be held.",
"config_set": "Configuration has been updated. You can review it anytime using `/config show`.",
"config_show": "**Guild config**\n\nChannel: <#{channel_id}>\nCategory: <#{category_id}>\nTimezone: `{timezone}`",
"event_not_found": "Event was not found.",
"guess_completed_event": "Congratulations! You have completed the event!",
"guess_incorrect_channel": "Usage outside own event channel is not allowed.",
"guess_incorrect_event": "Your event could not be found. Please, contact the administrator.",
"guess_unregistered": "You have no ongoing events. You can register for events using the `/register` command.",
"guild_unconfigured": "Guild is not configured. Please, report this to the administrator.",
"guild_unconfigured_admin": "Guild is not configured. Please, configure it using `/config set`.",
"timezone_invalid": "Timezone **{timezone}** was not found. Please, select one of the timezones provided by the autocompletion.",
"config_set": "Configuration has been updated. You can review it anytime using `/config show`.",
"config_reset": "Configuration has been reset. You can update it using `/config set`, otherwise no events can be held.",
"config_show": "**Guild config**\n\nChannel: <#{channel_id}>\nCategory: <#{category_id}>\nTimezone: `{timezone}`",
"jailed_error": "You are jailed and cannot interact with events. Please, contact the administrator.",
"operation_unconfirmed": "Operation not confirmed.",
"register_already_registered": "You are already registered for this event.",
"register_already_started": "Event **{event_name}** has already started!\n\nUse slash command `/guess` to suggest your answers to each event stage.",
"register_success_ongoing": "You are now registered for the event **{event_name}**.\n\nNew channel has been created for you and further instructions will are provided in it. Good luck!",
"register_success_scheduled": "You are now registered for the event **{event_name}**.\n\nNew channel will be created for you and further instructions will be provided as soon as the event starts <t:{event_starts}:R>. Good luck!",
"status": "**QuizBot** v{version}\n\nUptime: since <t:{start_time}>",
"status_git": "**QuizBot** v{version} (`{commit}`)\n\nUptime: up since <t:{start_time}>"
"status_git": "**QuizBot** v{version} (`{commit}`)\n\nUptime: up since <t:{start_time}>",
"timezone_invalid": "Timezone **{timezone}** was not found. Please, select one of the timezones provided by the autocompletion.",
"unexpected_error": "An unexpected error has occurred. Please, contact the administrator.",
"unregister_not_registered": "You are not registered for this event.",
"unregister_unregistered": "You are no longer registered for this event."
},
"commands": {
"config": {