Files
Discord.Net/docs/guides/samples/faq/send_message.cs
2016-08-27 22:16:51 -04:00

6 lines
348 B
C#

public async Task SendMessageToChannel(ulong ChannelId)
{
var channel = await _client.GetChannelAsync(ChannelId) as IMessageChannel;
await channel?.SendMessageAsync("aaaaaaaaahhh!!!")
/* ^ This question mark is used to indicate that 'channel' may sometimes be null, and in cases that it is null, we will do nothing here. */
}