diff --git a/src/structures/Message.js b/src/structures/Message.js index 90931d7..78610b5 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1133,7 +1133,14 @@ class Message extends Base { const menuAll = this.components .flatMap(row => row.components) .filter(b => - ['STRING_SELECT', 'USER_SELECT', 'ROLE_SELECT', 'MENTIONABLE_SELECT', 'CHANNEL_SELECT'].includes(b.type), + [ + 'STRING_SELECT', + 'USER_SELECT', + 'ROLE_SELECT', + 'MENTIONABLE_SELECT', + 'CHANNEL_SELECT', + 'SELECT_MENU', + ].includes(b.type), ); if (menuAll.length == 0) throw new TypeError('MENU_NOT_FOUND'); if (menuID) { @@ -1142,7 +1149,7 @@ class Message extends Base { menuID = menuAll[0]; } } - if (!menuID.type.includes('_SELECT')) throw new TypeError('MENU_NOT_FOUND'); + if (!menuID.type.includes('SELECT')) throw new TypeError('MENU_NOT_FOUND'); return menuID.select(this, Array.isArray(menuID) ? menuID : options); } // diff --git a/src/structures/MessageSelectMenu.js b/src/structures/MessageSelectMenu.js index 03db2e3..2270d99 100644 --- a/src/structures/MessageSelectMenu.js +++ b/src/structures/MessageSelectMenu.js @@ -293,6 +293,7 @@ class MessageSelectMenu extends BaseMessageComponent { }); const parseValues = value => { switch (this.type) { + case 'SELECT_MENU': case 'STRING_SELECT': { if (typeof value !== 'string') throw new TypeError('[INVALID_VALUE] Please pass a string value'); const value_ = this.options.find(obj => obj.value === value || obj.label === value);