using System;
using System.Collections.Generic;
using Discord.WebSocket;
using PluginManager.Others;
namespace PluginManager.Items;
public 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(' ');
Arguments = data.Length > 1 ? new List(data.MergeStrings(1).Split(' ')) : 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; }
}
public class ConsoleCommand
{
public string CommandName { get; init; }
public string Description { get; init; }
public string Usage { get; init; }
public Action Action { get; init; }
}