added colours to list of commands

This commit is contained in:
samvaio 2016-11-19 23:51:45 +05:30 committed by GitHub
parent f00bedaecb
commit cb96837678

View File

@ -158,7 +158,7 @@ namespace NadekoBot.Extensions
public static Task<IUserMessage> SendTableAsync<T>(this IMessageChannel ch, string seed, IEnumerable<T> items, Func<T, string> howToPrint, int columns = 3) public static Task<IUserMessage> SendTableAsync<T>(this IMessageChannel ch, string seed, IEnumerable<T> items, Func<T, string> howToPrint, int columns = 3)
{ {
var i = 0; var i = 0;
return ch.SendMessageAsync($@"{seed}```xl return ch.SendMessageAsync($@"{seed}```css
{string.Join("\n", items.GroupBy(item => (i++) / columns) {string.Join("\n", items.GroupBy(item => (i++) / columns)
.Select(ig => string.Concat(ig.Select(el => howToPrint(el)))))} .Select(ig => string.Concat(ig.Select(el => howToPrint(el)))))}
```"); ```");
@ -346,4 +346,4 @@ namespace NadekoBot.Extensions
public static bool IsDiscordInvite(this string str) public static bool IsDiscordInvite(this string str)
=> filterRegex.IsMatch(str); => filterRegex.IsMatch(str);
} }
} }