i am making a discord bot that when you react to a message it makes a channel so when i send a message in that channel the bot made, the bot dms that message (that i said in the channel) to the person who reacted to it. i have so far that when a person reacts to the message the bot dms them a noti saying they reacted. any command so the bot makes a channel??
const Discord = require('discord.js');
const client = new Discord.Client();
client.on("messageReactionAdd", async (reaction, user, message) => { //Add an event listener
if (reaction.message.partial) await reaction.message.fetch();
if (user.id === client.user.id) return;
if (!reaction.message.guild) return;
if (reaction.emoji.name === "😆") {
let guild = reaction.message.guild
guild.channels.create('channelName', {
type: 'text', //Make sure the channel is type is text
permissionOverwrites: [
{
id: guild.id,
allow: ['VIEW_CHANNEL'],
}]
})
}
});
how do i make the channel name the name of the person that reacted?
like
{DiscordUser}???
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.