Adds role specific channels.

Read ME update

Updating tile of role will update revelant channels and roles.

Added command examples.

Fixese leaks
This commit is contained in:
Karolis2011
2019-06-20 11:19:39 +03:00
parent 18657d7fab
commit e9f59780ed
16 changed files with 596 additions and 21 deletions

View File

@@ -88,7 +88,7 @@ namespace EventBot.Modules
.Aggregate(true, (a, r) => a && r))
.SelectMany(c => c.Aliases.Select(a => new { CI = c, MA = (c.Aliases[0] == a), A = a }).Reverse())
.Select((e, i) => new { Command = e, Index = i })
.GroupBy(o => o.Index / 20)
.GroupBy(o => o.Index / 15)
.Select(g => g.Select(o => o.Command));
var pager = new PaginatedMessage()
@@ -130,6 +130,9 @@ namespace EventBot.Modules
embed.AddField("Parameters",
string.Join("\r\n", command.Parameters.Select(p => $"`{p.FormatParameter()}` *(Type: {p.FormatParameterType()})* - **{p.Summary}** {(p.IsRemainder ? "_No quotes are needed, when providing this parameter._" : "")}" ))
);
var examples = command.Attributes.Where(a => a is ExampleAttribute).Select(a => ((ExampleAttribute)a).Use).ToArray();
if (examples.Length != 0)
embed.AddField("Examples", $"```{string.Join("\r\n", examples)}```");
await ReplyAsync($"I got this information about command `{commandAlias}`:", embed: embed.Build());
}