create a javascript bot for discord code example
Example 1: discord.js create channel
guild.channels.create('new-general', { reason: 'Needed a cool new channel' })
.then(console.log)
.catch(console.error);
guild.channels.create('new-voice', {
type: 'voice',
permissionOverwrites: [
{
id: message.author.id,
deny: ['VIEW_CHANNEL'],
},
],
})
Example 2: discord.js bot
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () =>{
client.user.setStatus('your status')
console.log('Connected!')
})
client.login('your-token-here')