using SharedLibraryCore; using SharedLibraryCore.Commands; using SharedLibraryCore.Configuration; using SharedLibraryCore.Database.Models; using SharedLibraryCore.Interfaces; using System.Threading.Tasks; namespace ClanTagRankCommands.Commands { /// /// Example script command /// /// public class UnMuteCommand : Command { public UnMuteCommand(CommandConfiguration config, ITranslationLookup lookup, IMetaService metaService, IConfigurationHandlerFactory configurationHandlerFactory) : base(config, lookup) { Name = "Unmute"; Description = "Unmutes a player's chat."; Alias = "Unmute"; Permission = EFClient.Permission.Administrator; RequiresTarget = true; Arguments = new[] { new CommandArgument() { Name = "player", Required = true } }; } public override async Task ExecuteAsync(GameEvent E) { //var S = E.Owner; if(E.Target.IsIngame && E.Target is object) { await E.Owner.ExecuteCommandAsync("unmute_player" + " " + E.Target.ClientNumber.ToString()); E.Target.WarnClear(E.Origin); E.Target.Tell("You have been Unmuted"); } } } }