Пример #1
0
        private FormattedEmbedBuilder AppendRemindHelp(FormattedEmbedBuilder message)
        {
            string timeUnits = ListUtil.BuildEnumeration(TimeUnit.Values());

            this.AppendDescriptionTitle(message, _cRemindTitle)
            .AppendDescription("If you tend to forget things or just need someone to handle your appointments this is your solution.")
            .AppendDescriptionNewLine(2)
            .AppendDescription($"Currently they are capped at `{Property.RemindDayCap}` days with only `{Property.RemindTextCap}` characters.")
            .AppendDescriptionNewLine(2);
            this.AppendDescriptionTitle(message, "Usage")
            .AppendDescription("This command is split in three parts:")
            .AppendDescriptionNewLine()
            .AppendDescription("- `remind me [number] [time-unit] [text]`; while number and time-unit tell me how long to wait, the text is the message I'll remind you with")
            .AppendDescriptionNewLine()
            .AppendDescription("- `remind me list` shows a list of your active reminders")
            .AppendDescriptionNewLine()
            .AppendDescription("- `remind me clear` if you want to get rid of them")
            .AppendDescriptionNewLine(2)
            .AppendDescription($"Tip: The possible time-units are `{timeUnits}`.", AppendOption.Italic)
            .AppendDescriptionNewLine(2);
            this.AppendDescriptionTitle(message, "Examples")
            .AppendDescription($"{this.Context.Client.CurrentUser.Mention} remind me 2 days finally take the trash out")
            .AppendDescriptionNewLine()
            .AppendDescription($"{this.Context.Client.CurrentUser.Mention} remind me list")
            .AppendDescriptionNewLine()
            .AppendDescription($"{this.Context.Client.CurrentUser.Mention} remind me clear");
            return(message);
        }
Пример #2
0
 public override Task <TypeReaderResult> Read(ICommandContext context, string input, IServiceProvider services)
 {
     try
     {
         LeagueRole match = LeagueRole.Get(input);
         return(Task.FromResult(TypeReaderResult.FromSuccess(match)));
     }
     catch (NotExistingException)
     {
         string roles = ListUtil.BuildEnumeration(LeagueRole.Values());
         return(Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, $"Role `{input}` doesn't exist. Choose one of `{roles}`")));
     }
 }
Пример #3
0
 public override string ToString()
 {
     return(ListUtil.BuildEnumeration(this._matches));
 }