This commit is contained in:
2025-05-04 22:30:54 +02:00
parent 6b5a276f00
commit 9d562e2e9d
5 changed files with 121 additions and 34 deletions

View File

@@ -44,10 +44,18 @@ class CogConfig(Cog):
required=True,
)
@option(
"channel",
description=_("description", "commands", "config_set", "options", "channel"),
"general_channel",
description=_("description", "commands", "config_set", "options", "general_channel"),
description_localizations=in_every_locale(
"description", "commands", "config_set", "options", "channel"
"description", "commands", "config_set", "options", "general_channel"
),
required=True,
)
@option(
"management_channel",
description=_("description", "commands", "config_set", "options", "management_channel"),
description_localizations=in_every_locale(
"description", "commands", "config_set", "options", "management_channel"
),
required=True,
)
@@ -72,7 +80,8 @@ class CogConfig(Cog):
self,
ctx: ApplicationContext,
category: CategoryChannel,
channel: TextChannel,
general_channel: TextChannel,
management_channel: TextChannel,
timezone: str,
prefer_emojis: bool,
) -> None:
@@ -92,7 +101,8 @@ class CogConfig(Cog):
await guild.update(
self.bot.cache,
channel_id=channel.id,
general_channel_id=general_channel.id,
management_channel_id=management_channel.id,
category_id=category.id,
timezone=str(timezone_parsed),
prefer_emojis=prefer_emojis,
@@ -145,7 +155,8 @@ class CogConfig(Cog):
await ctx.respond(
self.bot._("config_show", "messages", locale=ctx.locale).format(
channel_id=guild.channel_id,
general_channel_id=guild.general_channel_id,
management_channel_id=guild.management_channel_id,
category_id=guild.category_id,
timezone=guild.timezone,
prefer_emojis=guild.prefer_emojis,