Im trying to fix this error that I keep getting when I run /help
, and don't know what I did wrong, I tried to do what I could with the error, but im getting annoyed at this point.
My error:
/app/slashCommands/Miscellaneous/help.js:138
const collector = msg.createMessageComponentCollector({ filter, componentType: "SELECT_MENU" });
^
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
Code:
const { MessageEmbed, Message, Client } = require("discord.js");
const { readdirSync } = require("fs");
const client = require("../../index");
const config = require("../../botconfig");
const create_menu = require("../../models/helpMenu.js");
const prefixSchema = require("../../models/prefix");
module.exports = {
name: "help",
description: "Displays all available command categories!",
aliases: ["h"],
usage: "<command> or <category>",
run: async (client, interaction, args, db) => {
const data = await prefixSchema.findOne({ Guild: interaction.guild.id });
if (data) {
let categories = [];
let cots = [];
if (!args[0]) {
let ignored = ["Giveaway", "Owner"];
const emoji = {
Action: "