using System.Collections.Generic; using Discord.WebSocket; using PluginManager.Others; namespace PluginManager.Items; internal class Command { /// /// The author of the command /// public SocketUser? Author; /// /// The Command class contructor /// /// The message that was sent public Command(SocketMessage message) { Author = message.Author; var data = message.Content.Split(' '); if (data.Length > 1) Arguments = new List(data.MergeStrings(1).Split(' ')); else Arguments = new List(); CommandName = data[0].Substring(1); PrefixUsed = data[0][0]; } /// /// The list of arguments /// public List Arguments { get; } /// /// The command that is executed /// public string CommandName { get; } /// /// The prefix that is used for the command /// public char PrefixUsed { get; } }