Introduced i18n for /event, /guess, /register and /unregister. Prepared other commands for i18n too

This commit is contained in:
2025-04-27 22:04:14 +02:00
parent 12a88d5a23
commit 9a5edbaa4d
6 changed files with 273 additions and 37 deletions

View File

@@ -4,6 +4,7 @@ from bson.errors import InvalidId
from discord import ApplicationContext, Attachment, SlashCommandGroup, option
from discord.ext.commands import Cog
from discord.utils import basic_autocomplete
from libbot.i18n import in_every_locale, _
from classes import PycordEvent, PycordEventStage, PycordGuild
from classes.pycord_bot import PycordBot
@@ -21,7 +22,11 @@ class CogStage(Cog):
def __init__(self, bot: PycordBot):
self.bot: PycordBot = bot
command_group: SlashCommandGroup = SlashCommandGroup("stage", "Event stage management")
command_group: SlashCommandGroup = SlashCommandGroup(
"stage",
description=_("description", "commands", "stage"),
description_localizations=in_every_locale("description", "commands", "stage"),
)
# TODO Introduce i18n
# TODO Maybe add an option for order?