Skip to content

Commit

Permalink
Fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexemanuelol committed Sep 19, 2024
1 parent b5f31d5 commit 212e93d
Show file tree
Hide file tree
Showing 7 changed files with 5,886 additions and 11,662 deletions.
15,437 changes: 5,843 additions & 9,594 deletions package-lock.json

Large diffs are not rendered by default.

54 changes: 0 additions & 54 deletions src/discordEvents/guildMemberRemove.js

This file was deleted.

7 changes: 5 additions & 2 deletions src/discordTools/discord-select-menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,17 @@ export function getSelectMenu(guildId: string, options: discordjs.StringSelectMe
}

if (options.hasOwnProperty('options') && options.options !== undefined) {
for (const option of options.options) {
/* Convert the readonly array into a mutable one */
const mutableOptions = [...options.options];

for (const option of mutableOptions) {
if (option.description === undefined) {
option.description = lm.getIntl(instance.generalSettings.language, 'empty');
continue;
}
option.description = option.description.substring(0, constants.SELECT_MENU_MAX_DESCRIPTION_CHARACTERS);
}
selectMenu.setOptions(options.options);
selectMenu.setOptions(mutableOptions);
}

return selectMenu;
Expand Down
Loading

0 comments on commit 212e93d

Please sign in to comment.