Added possibility to add external console commands

This commit is contained in:
2022-05-26 20:53:25 +03:00
parent 16c06c8319
commit e6692e4263
4 changed files with 383 additions and 355 deletions

View File

@@ -47,23 +47,5 @@ namespace PluginManager.Items
this.CommandName = data[0].Substring(1);
this.PrefixUsed = data[0][0];
}
/// <summary>
/// The Command class contructor
/// </summary>
/// <param name="message">The message string itself</param>
/// <param name="hasPrefix">True if the message has a prefix, false if not</param>
public Command(string message, bool hasPrefix)
{
string[] data = message.Split(' ');
this.Author = null;
this.Arguments = new List<string>(data.MergeStrings(1).Split(' '));
this.CommandName = data[0].Substring(1);
if (hasPrefix)
this.PrefixUsed = data[0][0];
else this.PrefixUsed = '\0'; //null
}
}
}