“Discord.js membuat saluran” Kode Jawaban

Saluran Buat Kustom Discord.js

let channelName = args.slice(0).join(' '); //Arguments to set the channel name
message.guild.channels.create(channelName, {
        type: "text", //This create a text channel, you can make a voice one too, by changing "text" to "voice"
        permissionOverwrites: [
           {
             id: message.guild.roles.everyone, //To make it be seen by a certain role, user an ID instead
             allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], //Allow permissions
             deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] //Deny permissions
		   }
        ],
      })

//Note, you cant have, for example, VIEW_CHANNEL, in both allow and deny.
HeyItsDeveloperRhys

cara membuat saluran di discord.js

// -- Create Channel/Room
message.guild.channels.create('name', {
	type: 'GUILD_TEXT',
    permissionOverwrites: [{
    	id: message.guild.id,
        allow: ['VIEW_CHANNEL'],
        deny: ['SEND_MESSAGES'],
	}]
});
console.info(`name channel: name | type: text channel`)
SupYay

Perselisihan JS Channel Kirim

const user = <client>.users.cache.get('<id>');
user.send('<content>');
Witty Wildebeest

Discord.js membuat saluran

This is not possible in discord.js.
Faithful Flamingo

Jawaban yang mirip dengan “Discord.js membuat saluran”

Pertanyaan yang mirip dengan “Discord.js membuat saluran”

Lebih banyak jawaban terkait untuk “Discord.js membuat saluran” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya