Skip to content

Commit d55b968

Browse files
committed
fix: added and compacted translation for commands on help
1 parent 255c96b commit d55b968

File tree

5 files changed

+21
-14
lines changed

5 files changed

+21
-14
lines changed

bot.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ async def help(ctx):
109109

110110
user = await GetTranslatedText(ctx.guild.id, "user")
111111
reason = await GetTranslatedText(ctx.guild.id, "reason")
112+
seconds = await GetTranslatedText(ctx.guild.id, "seconds")
113+
channel = await GetTranslatedText(ctx.guild.id, "channel")
112114
embed.add_field(
113115
name=await GetTranslatedText(ctx.guild.id, "help_moderation_title"),
114116
value=f"""
@@ -133,17 +135,22 @@ async def help(ctx):
133135

134136
embed.add_field(
135137
name=await GetTranslatedText(ctx.guild.id, "help_chatmod_title"),
136-
value=await GetTranslatedText(ctx.guild.id,
137-
"help_chatmod_description",
138-
COMMAND_PREFIX=COMMAND_PREFIX),
138+
value=f"""
139+
{COMMAND_PREFIX}setdelay [{seconds}] <{reason}>\n
140+
{COMMAND_PREFIX}mute [{user}] <{reason}>\n
141+
{COMMAND_PREFIX}unmute [{user}] <{reason}>\n
142+
{COMMAND_PREFIX}lock <{channel}> <{reason}>\n
143+
{COMMAND_PREFIX}unlock <{channel}> <{reason}>\n
144+
{COMMAND_PREFIX}bulkdelete [{channel}] [{user}] <{reason}>",
145+
""",
139146
inline=True,
140147
)
141148

142149
embed.add_field(
143150
name=await GetTranslatedText(ctx.guild.id, "help_various_title"),
144-
value=await GetTranslatedText(ctx.guild.id,
145-
"help_various_description",
146-
COMMAND_PREFIX=COMMAND_PREFIX),
151+
value=f"""
152+
{COMMAND_PREFIX}whois [{user}]
153+
""",
147154
inline=True,
148155
)
149156

langs/cat.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"help_moderation_title": "Comandes de Moderació :tools:",
44
"user": "usuari",
55
"reason": "motiu",
6+
"seconds": "segons",
7+
"channel": "canal",
68
"help_automod_title": "Serveis d'AutoMod :robot:",
79
"help_automod_description": "Detecta paraules obscenes i adverteix automàticament. \nUtilitza una base de dades de més de 880 paraules obscenes \n\n Personalitza-ho amb:\n {COMMAND_PREFIX}automod [add/remove] [paraula]\nO activa/desactiva-ho amb:\n{COMMAND_PREFIX}settings [automod] [on/off]",
810
"help_chatmod_title": "Comandes de Moderació de Xat :file_folder:",
9-
"help_chatmod_description": "{COMMAND_PREFIX}setdelay [segons] <motiu>\n{COMMAND_PREFIX}mute [usuari] <motiu>\n{COMMAND_PREFIX}unmute [usuari] <motiu>\n{COMMAND_PREFIX}lock <canal> <motiu>\n{COMMAND_PREFIX}unlock <canal> <motiu>\n",
1011
"help_various_title": "Utilitats Diverses :screwdriver:",
11-
"help_various_description": "{COMMAND_PREFIX}whois [usuari]",
1212
"help_links_title": "Enllaços Útils: :link:",
1313
"help_links_description": "[:classical_building: Suport del Hammer Bot](https://discord.gg/fMSyQA6)\n[:link: Enllaç d'Invitació del Hammer](https://discordapp.com/api/oauth2/authorize?client_id=591633652493058068&permissions=8&scope=bot)\n[:newspaper: Vota per al Hammer](https://top.gg/bot/591633652493058068)]",
1414
"help_commands_title": "Comandes d'Ajuda",

langs/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"help_moderation_title": "Moderation Commands :tools:",
44
"user": "user",
55
"reason": "reason",
6+
"seconds": "seconds",
7+
"channel": "channel",
68
"help_automod_title": "AutoMod Services :robot:",
79
"help_automod_description": "Swear Word Detector and wuto warn. \n Using a +880 swear word database \n\n Customize it with:\n {COMMAND_PREFIX}automod [add/remove] [word]\nOr switch it on/off with:\n{COMMAND_PREFIX}settings [automod] [on/off]",
810
"help_chatmod_title": "Chat Moderation Commands :file_folder:",
9-
"help_chatmod_description": "{COMMAND_PREFIX}setdelay [seconds] <reason>\n{COMMAND_PREFIX}mute [user] <reason>\n{COMMAND_PREFIX}unmute [user] <reason>\n{COMMAND_PREFIX}lock <channel> <reason>\n{COMMAND_PREFIX}unlock <channel> <reason>\n",
1011
"help_various_title": "Various Utilities :screwdriver:",
11-
"help_various_description": "{COMMAND_PREFIX}whois [user]",
1212
"help_links_title": "Useful Links: :link:",
1313
"help_links_description": "[:classical_building: Hammer Bot Support](https://discord.gg/fMSyQA6)\n[:link: Hammer Invite Link](https://discordapp.com/api/oauth2/authorize?client_id=591633652493058068&permissions=8&scope=bot)\n[:newspaper: Vote Hammer](https://top.gg/bot/591633652493058068)}",
1414
"help_commands_title": "Help Commands",

langs/es.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"help_moderation_title": "Comandos de Moderación :tools:",
44
"user": "usuario",
55
"reason": "razón",
6+
"seconds": "segundos",
7+
"channel": "canal",
68
"help_automod_title": "Servicios de AutoMod :robot:",
79
"help_automod_description": "Detector de lenguaje obsceno con aviso automático. \n Utiliza una base de datos con más de 880 palabras \n\n Personalízalo con:\n {COMMAND_PREFIX}automod [agregar/eliminar] [palabra]\nO activa/desactiva esta función con:\n{COMMAND_PREFIX}configuración [automod] [encender/apagar]",
810
"help_chatmod_title": "Comandos de Moderación de Chat :file_folder:",
9-
"help_chatmod_description": "{COMMAND_PREFIX}setdelay [segundos] <razón>\n{COMMAND_PREFIX}mute [usuario] <razón>\n{COMMAND_PREFIX}unmute [usuario] <razón>\n{COMMAND_PREFIX}lock <canal> <razón>\n{COMMAND_PREFIX}unlock <canal> <razón>\n",
1011
"help_various_title": "Utilidades Varias :screwdriver:",
11-
"help_various_description": "{COMMAND_PREFIX}whois [usuario]",
1212
"help_links_title": "Enlaces Útiles :link:",
1313
"help_links_description": "[:classical_building: Soporte de Hammer Bot](https://discord.gg/fMSyQA6)\n[:link: Enlace de Invitación de Hammer Bot](https://discordapp.com/api/oauth2/authorize?client_id=591633652493058068&permissions=8&scope=bot)\n[:newspaper: Vota por Hammer](https://top.gg/bot/591633652493058068)}",
1414
"help_commands_title": "Comandos de Ayuda",

tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ def jsonToDict(filename):
2121
"help_moderation_title",
2222
"user",
2323
"reason",
24+
"seconds",
25+
"channel",
2426
"help_automod_title",
2527
"help_automod_description",
2628
"help_chatmod_title",
27-
"help_chatmod_description",
2829
"help_various_title",
29-
"help_various_description",
3030
"help_links_title",
3131
"help_links_description",
3232
"help_commands_title",

0 commit comments

Comments
 (0)