I was wondering who can help me with trying to send a message to a specified channel ID in Dsharpplus C# .net. This is my current assumption but it does not work:
await discord.SendMessageAsync(discord.GetChannelAsync(ChannelIDHERE), "Hello");
Here is the error:
Anyone who can help would appreciated. Thanks!
CodePudding user response:
Your error is not related to DSharpPlus, it's simply an async call not being awaited, this should fix your issue:
await discord.SendMessageAsync(await discord.GetChannelAsync(ChannelIDHERE), "Hello");