feat(SelectMenu): SelectMenu v2

support channelType
This commit is contained in:
March 7th
2022-11-06 12:34:25 +07:00
parent 0975224da0
commit f671aa3899
4 changed files with 66 additions and 15 deletions

View File

@@ -2,7 +2,6 @@
const process = require('node:process');
const { Collection } = require('@discordjs/collection');
// Disable: const { findBestMatch } = require('string-similarity'); // Not check similarity
const Base = require('./Base');
const BaseMessageComponent = require('./BaseMessageComponent');
const ClientApplication = require('./ClientApplication');
@@ -1074,13 +1073,9 @@ class Message extends Base {
for (const row of this.components) {
for (const component of row.components) {
if (
[
'STRING_SELECT',
'USER_SELECT',
'ROLE_SELECT',
'MENTIONABLE_SELECT',
'CHANNEL_SELECT',
].includes(component.type)
['STRING_SELECT', 'USER_SELECT', 'ROLE_SELECT', 'MENTIONABLE_SELECT', 'CHANNEL_SELECT'].includes(
component.type,
)
) {
menuAll.push(component);
}