#In a thread or normal text channel
1 messages · Page 1 of 1 (latest)
normal text
You can call .permissionOverwrites and create a overwrite for the targeted user which allows them to chat
Like that
If you need more help just mention me :)
module.exports = {
name: 'ticket-create',
async runInteraction(client, message) {
const channelName = `ticket-${message.user.tag}`;
await message.guild.channels.create(channelName, {
type: "GUILD_TEXT",
permissionOverwrites: [
{
id: message.guild.roles.everyone,
allow: ['BAN_MEMBERS', 'KICK_MEMBERS', 'ADMINISTRATOR'],
deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
}
]
});
// Try code
await channelName.permissionOverwrites.edit(message.user.fetch(), {
SEND_MESSAGES: true,
VIEW_CHANNEL: true
});
}
}
I tried the code (below the comment) and it doesn’t add the user to my channel
@clear prawn