Skip to content

Commit 212e93d

Browse files
committed
Fix minor issues
1 parent b5f31d5 commit 212e93d

File tree

7 files changed

+5886
-11662
lines changed

7 files changed

+5886
-11662
lines changed

package-lock.json

+5,843-9,594
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/discordEvents/guildMemberRemove.js

-54
This file was deleted.

src/discordTools/discord-select-menus.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,17 @@ export function getSelectMenu(guildId: string, options: discordjs.StringSelectMe
5353
}
5454

5555
if (options.hasOwnProperty('options') && options.options !== undefined) {
56-
for (const option of options.options) {
56+
/* Convert the readonly array into a mutable one */
57+
const mutableOptions = [...options.options];
58+
59+
for (const option of mutableOptions) {
5760
if (option.description === undefined) {
5861
option.description = lm.getIntl(instance.generalSettings.language, 'empty');
5962
continue;
6063
}
6164
option.description = option.description.substring(0, constants.SELECT_MENU_MAX_DESCRIPTION_CHARACTERS);
6265
}
63-
selectMenu.setOptions(options.options);
66+
selectMenu.setOptions(mutableOptions);
6467
}
6568

6669
return selectMenu;

0 commit comments

Comments
 (0)