mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
28 lines
935 B
C#
28 lines
935 B
C#
|
using System;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using CommandLine;
|
|||
|
using Wabbajack.Common;
|
|||
|
using Wabbajack.Lib.NexusApi;
|
|||
|
|
|||
|
namespace Wabbajack.CLI.Verbs
|
|||
|
{
|
|||
|
[Verb("nexus-permissions", HelpText = "Get the nexus permissions for a mod")]
|
|||
|
public class NexusPermissions : AVerb
|
|||
|
{
|
|||
|
[Option('m', "mod-id", Required = true, HelpText = "Mod Id")]
|
|||
|
public long ModId { get; set; } = 0;
|
|||
|
|
|||
|
[Option('g', "game", Required = true, HelpText = "Game Name")]
|
|||
|
public string GameName { get; set; } = "";
|
|||
|
protected override async Task<ExitCode> Run()
|
|||
|
{
|
|||
|
var game = GameRegistry.GetByFuzzyName(GameName).Game;
|
|||
|
var p = await HTMLInterface.GetUploadPermissions(game, ModId);
|
|||
|
Console.WriteLine($"Game: {game}");
|
|||
|
Console.WriteLine($"ModId: {ModId}");
|
|||
|
Console.WriteLine($"Permissions: {p}");
|
|||
|
return ExitCode.Ok;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|