Ive been trying to figure this out and even looking at other plugins is this even possible with this?
Send a message to a certain channel?Solved
Yeah, there are multiple ways to go about doing this. Please see my examples below.
[DiscordClient] private DiscordClient _client;
private const string MyChannelId = "76561############";
private void DoTest4()
{
//First way
Guild server = _client.DiscordServers[0];
Channel channel = server.channels.FirstOrDefault(c => c.id == MyChannelId);
channel?.CreateMessage(_client, "Hello I am a bot.");
//Second way
Channel.GetChannel(_client, MyChannelId , channelWay2 =>
{
channelWay2.CreateMessage(_client, "This is the 2nd way to send a message to a channel");
});
} Thank You! Sorry Another question is there a way to send an embed?
It's the same as above but instead of a string, you pass an Embed object or a Message object to the channel CreateMessage method.
I See Thank You
Locked automatically