Receiving undefined for Message#guild although it should be Guild or null

undefined
4 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Berrie
BerrieOP7mo ago
@Qjuh went to here due slowmode :p but my index exist of //level system, report, autorole, mod user i've defined this at the top: const { Channel } = require('diagnostics_channel'); const { Client, GatewayIntentBits, ModalBuilder, TextInputBuilder, TextInputStyle, ActivityType, EmbedBuilder, Events, Partials, PermissionsBitField, Permissions, MessageManager, Embed, Collection, ButtonBuilder, ActionRowBuilder, ButtonStyle, DefaultDeviceProperty, ChannelType, AttachmentBuilder } = require(discord.js); const fs = require('fs'); const internal = require('stream'); const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, GatewayIntentBits.DirectMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.DirectMessageReactions, GatewayIntentBits.GuildVoiceStates], partials: [Partials.Message, Partials.Channel, Partials.Reaction] }); const { createTranscript } = require('discord-html-transcripts'); const inviteSchema = require('./Schemas/inviteSchema'); //invite-logger @duck what do i need to console.log? oke brb console.log(message.constructor.name); if (channel) { const embed = new MessageEmbed() .setAuthor({ name: message.author.tag, name: m,essage.author.tag is line 28
Zerls
Zerls7mo ago
duck wanted to know what it logs, not how you implemented it
Berrie
BerrieOP7mo ago
it's an outdated code, im trying to get it to v14:p
Want results from more Discord servers?
Add your server