#[antiCrash] Unhandled RejectionCatchError Found unknown component type undefined

2 messages · Page 1 of 1 (latest)

grand tideBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

shy summit
#

Here's the code where it's saying the error is at!

components: [
                    {
                        type: 1,
                        components: [
                            categories.map(
                                category => {
                                    console.log(category);
                                    return {
                                        type: 2,
                                        label: `${category.charAt(0).toUpperCase()}${category.slice(1).toLowerCase()}`,
                                        custom_id: `${category.toLowerCase()}`,
                                        style: 2,
                                        disabled: false,
                                    }
                                }
                            )
                        ]
                    },
                    {
                        type: 1,
                        components: [
                            {
                                type: 2,
                                label: "Support Server",
                                url: "my sevrer invite",
                                style: 5,
                            },
                            {
                                type: 2,
                                label: "My Developer(s) Profile",
                                style: 5,
                                disabled: false,
                                url: `https://discord.com/users/622903645268344835`
                            },
                            {
                                type: 2,
                                label: "Invite Bot",
                                style: 5,
                                disabled: false,
                                url: this.client.generateInvite({ scopes: [OAuth2Scopes.Bot, OAuth2Scopes.ApplicationsCommands], permissions: ["Administrator"] })
                            },
                        ]
                    }
                ]