[CLI] Cleanup

This commit is contained in:
Alexey Golub
2020-02-04 12:14:53 +02:00
parent 1d39fe9c53
commit a01835efb6
8 changed files with 17 additions and 18 deletions

View File

@@ -11,18 +11,18 @@ namespace DiscordChatExporter.Cli.Commands
protected DataService DataService { get; }
[CommandOption("token", 't', IsRequired = true, Description = "Authorization token.")]
public string TokenValue { get; set; }
public string TokenValue { get; set; } = "";
[CommandOption("bot", 'b', Description = "Whether this authorization token belongs to a bot.")]
public bool IsBotToken { get; set; }
protected AuthToken Token => new AuthToken(IsBotToken ? AuthTokenType.Bot : AuthTokenType.User, TokenValue);
protected TokenCommandBase(DataService dataService)
{
DataService = dataService;
}
protected AuthToken GetToken() => new AuthToken(IsBotToken ? AuthTokenType.Bot : AuthTokenType.User, TokenValue);
public abstract ValueTask ExecuteAsync(IConsole console);
}
}