send message in multiple channels discord .py code example
Example 1: send message to specific channel discord.py
channel = client.get_channel(12324234183172)
await channel.send('hello')
Example 2: how to have your discord bot send two message
const Discord = require('discord.js');
const Client = new Discord.Client();
const { token, prefix } = require('./config.json');
Client.on('ready',() =>{
console.log('Ready!');
})
Client.on('message', message=>{
let args = message.content.substring(prefix.length).split(" ");
switch(args[0]){
case 'example1':
const example1 = new Discord.MessageEmbed()
.setColor('#FF8D27')
.setAuthor('Test author')
.setDescription('Example text 1')
message.channel.send(example1)
const example2 = new Discord.MessageEmbed()
.setColor('#FF8D27')
.setAuthor('Test Author')
.setDescription('Example text 2')
message.channel.send(example2)
break;
}
})
Client.on(token)