Exemplo n.º 1
0
        public AddMangaCommand(MiniMALClient client)
            : base(client, "add-manga", "Add an manga in the user's mangalist")
        {
            RequiredArguments.Add(new Argument<int>("id", "manga id in MyAnimeList database"));
            RequiredArguments.Add(new Argument<ReadingStatus>("status",
                "1-reading, 2-completed, 3-on hold, 4-dropped, 6-plan to read"));

            var score = new Option("s", "score", "change score");
            score.Arguments.Add(new Argument<int>("value", "1-10, 0=none", Validator.ValueRange("value", 0, 10)));
            Options.Add(score);

            var priority = new Option("p", "priority", "define priority");
            priority.Arguments.Add(new Argument<Priority>("value", "0-low, 1-medium, 2-high"));
            Options.Add(priority);
        }
Exemplo n.º 2
0
        public UpdateMangaCommand(MiniMALClient client)
            : base(client, "update-manga", "Update an manga in the user's mangalist")
        {
            RequiredArguments.Add(new Argument<int>("id", "manga id in MyAnimeList database"));

            var scoreOption = new Option("s", "score", "change score");
            scoreOption.Arguments.Add(new Argument<int>("value", "value between 1 and 10, 0 = none",
                Validator.ValueRange("value", 0, 10)));
            Options.Add(scoreOption);

            var statusOption = new Option("S", "status", "change status");
            statusOption.Arguments.Add(new Argument<ReadingStatus>("value",
                "1-reading, 2-completed, 3-on hold, 4-dropped, 6-plan to read"));
            Options.Add(statusOption);
        }