I'm trying to make it so when my discord bot goes online it will post a message in a specific channel. When I try to run the bot with the command below I just get:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
Any help? I know very little about C# so I may just seem stupid.
client.ExecuteAndWait(async () =>
{
var Chat = client.GetChannel(TheChannelID);
await Chat.SendMessage("Good morning!");
});