I have created a Discord Bot using Discord.net and at the moment, I have a command that outputs a fixed string. However, I would like to implement a command that replies with a string provided by the user instead. Here is a basic structure I am working with:
using System;
using System.Threading.Tasks;
using Discord.Commands;
using Discord.WebSocket;
namespace MyDiscordBot.Modules
{
public class UserInputModule : ModuleBase<SocketCommandContext>
{
[Command("save")]
public async Task SaveInputAsync([Remainder] string userInput)
{
await ReplyAsync(userInput);
}
}
}
I have prior experience with console applications, but I’m not familiar with handling user input in this context. Any guidance would be helpful!