#In a thread or normal text channel

1 messages · Page 1 of 1 (latest)

clear prawn
winter sleet
#

normal text

clear prawn
#

Like that

#

If you need more help just mention me :)

winter sleet
#
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