I am currently in the process of making my own discord bot using C# and the Discord.NET API, but as the documentation is limited and i've only been coding in C# for a limited time, I've encountered an issue.
I've made a command to shut down the bot from inside the Discord chat, my problem is that everyone can actually use this command to shut it down, and I have no idea how to target a specific user so that it won't be executed when someone else uses the command.
My code:
private void RegisterShutdownCommand()
{
commands.CreateCommand("exit")
.Do((e) =>
{
Environment.Exit(0);
});
}
Thanks in advance, if there is any information I missed that could be useful for a fix, ask me. :)