How to get the current channel a slash command was used in
I took a look at the following post https://discord.com/channels/737141877803057244/1061609301556346921 and
comes up as undefined. I am needing to get returned as if I were running
client.channels.fetch(process.env.BOT_REPORT_CHANNEL_ID)
Solution:Jump to solution
https://discord.js.org/#/docs/discord.js/main/class/CommandInteraction?scrollTo=channel
Also this is a question for #discordjs-support...
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
1 Reply
Solution
https://discord.js.org/#/docs/discord.js/main/class/CommandInteraction?scrollTo=channel
Also this is a question for #discordjs-support
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.