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: "
Without seeing your code there's not much we can help you with, but from the error I would assume that msg
is undefined.
Try logging msg
before creating the collector, if it returns undefined, there's your problem.
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I want to add xray to my Fargate serviceEverything works (synth/deploy) but in the logs I'am seeing the following error:
I'm making an image management system through discord, uploading images on Imgur throug it's apiI know my code was wrong, cause i was trying to upload like 125 images at the exact same time for the initialization of the system, and i got (temp, i think)...
I have an web app that wil be accessed by multiples companies
I want to create an URL that when clicked upon opens a tab, downloads a file, and closes that tabDo you guys know how to do it? Following is an example: https://cdn