I’m now working on a C# Discord Bot and have recently upgraded to discord.NET 1.0.
I’m attempting to implement a basic echo command, but I’m unsure how to properly convert the incoming message into a string so that I can echo it back to the channel. Any guidance on this issue would be very helpful.
Below is a sample of what I’m trying to achieve:
[Command("repeat")]
private async Task RepeatMessage()
{
string userText = incomingData;
await context.Channel.SendMessageAsync(userText);
}
My goal is simply to capture user input and return it as a message in the same channel. Any suggestions or corrections to improve this approach are much appreciated.