Trying to read channels name after it's deleting

How can i fix this error: { name: "Kanaal:", value: > ${interaction.channel.name} }, ^ TypeError: Cannot read properties of null (reading 'name') The code related to this command: https://pastebin.com/rE69zw3S
Pastebin
var ticketLoggingChannel = interaction.member.guild.channels.c...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
5 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! - Marked as resolved by OP
darp
darp7mo ago
interaction.channel is null show intents
Daniël
DaniëlOP7mo ago
const { SlashCommandBuilder, ActionRow, ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, ChannelType, PermissionFlagsBits } = require("discord.js"); const { createTranscript } = require("discord-html-transcripts"); in the file self const { Client, GatewayIntentBits, Collection, Partials } = require(discord.js); const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessageReactions], partials: [Partials.Reaction, Partials.Message, Partials.Channel] }); in the index
darp
darp7mo ago
>Partials.Channel
Daniël
DaniëlOP7mo ago
?
Want results from more Discord servers?
Add your server