Closed chemokita13 closed 12 months ago
AI-Generated Summary: This pull request includes updates to multiple files with the major changes being an upgrade to the zumito-framework
from version 1.1.69
to 1.1.71
. There were also modifications to the src/config/Global.ts
, src/modules/global/translations/en.json
, src/modules/global/translations/es.json
, and src/modules/info/commands/help.ts
files. In the config file, the bot name has been changed from 'Zumito Team Bot' to 'Zumito'. The en.json
and es.json
files have updated translations with the emoji for "information" changing to "đŗī¸". Lastly, the help.ts
file has several updates improving the layout arrangement, changing the array methods, and expanding the execute method among other changes. All file endings have newline characters added at the end.
Thank you @chemokita13 for this first contribution!
Reviewpad Report
:warning: Warnings
:bangbang: Errors
AI-Generated Summary: This pull request updates various parts of the code. It includes changes to 'package-lock.json' and 'package.json' to bump the version of 'zumito-framework' from 1.1.69 to 1.1.71. The name of the bot is also changed from 'Zumito Team Bot' to 'Zumito' in 'Global.ts'. Changes are applied to the English and Spanish translations in 'en.json' and 'es.json' respectively, where the emoji for the information command category is changed, and the emoji for the Spanish information command category is added. Significant refactoring and additions are made to 'help.ts' file in the modules, improving the handling of commands and the interaction of the bot with Discord users. Also, the code structure has been cleaned up for readability.
I have solved that issue in 2 parts:
Title duplication bug
For start, we have to get some context in help command file:
for
iteration in lines 86 to 91:That bucle when the help argument is configuration, only runs 1 time (i==0) and because
0 % 4 == 0
it executescategoryEmbed.addField
once.But in the other hand, when help argument is information it runs 8 times (i == 0,1,2,3,4,5,6,7) but only executes
categoryEmbed.addField
2 times (i==0,4) because0 % 4 == 0
and4 % 4 == 0
. So, that 2 times it executes:But we do not want to have two names and two values, we have to have only one name, and 2 values, when
i==0 && i==4
So, wheni==0
and help argument is configuration we have to executecategoryEmbed.addField [...]
but when is information we have to save the following string:So I have created a new array before the bucle:
And in the bucle we check if
interaction.values[0] === "information"
orinteraction.values[0] === "configuration"
. The bucle will be like that:Emojis in help command
But when the languaje was changed to spanish it didn't show the information's emoji, so I had to add the emoji in the translation file.
âšī¸ => đŗī¸