Merge pull request #776 from samdivaio/dev

Added colours to some outputs
This commit is contained in:
Master Kwoth 2016-11-20 04:14:44 +01:00 committed by GitHub
commit 0e1f644d7f
4 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ namespace NadekoBot.Modules.Help
public async Task Modules(IUserMessage umsg) public async Task Modules(IUserMessage umsg)
{ {
await umsg.Channel.SendMessageAsync("📜 **List of modules:** ```xl\n• " + string.Join("\n• ", _commands.Modules.Select(m => m.Name)) + $"\n``` **Type** `-commands module_name` **to get a list of commands in that module.** ***e.g.*** `-commands games`") await umsg.Channel.SendMessageAsync("📜 **List of modules:** ```css\n• " + string.Join("\n• ", _commands.Modules.Select(m => m.Name)) + $"\n``` **Type** `-commands module_name` **to get a list of commands in that module.** ***e.g.*** `-commands games`")
.ConfigureAwait(false); .ConfigureAwait(false);
} }

View File

@ -51,7 +51,7 @@ __`Owner:`__ **{await server.GetUserAsync(server.OwnerId)}**
__`ID:`__ **{server.Id}** __`ID:`__ **{server.Id}**
__`Icon URL:`__ { server.IconUrl} __`Icon URL:`__ { server.IconUrl}
__`TextChannels:`__ **{(await server.GetTextChannelsAsync()).Count()}** `VoiceChannels:` **{(await server.GetVoiceChannelsAsync()).Count()}** __`TextChannels:`__ **{(await server.GetTextChannelsAsync()).Count()}** `VoiceChannels:` **{(await server.GetVoiceChannelsAsync()).Count()}**
__`Members:`__ **{users.Count}** `-` {users.Count(u => u.Status == UserStatus.Online)}:green_heart: {users.Count(u => u.Status == UserStatus.Idle)}:yellow_heart: {users.Count(u => u.Status == UserStatus.DoNotDisturb)}:heart: {users.Count(u=> u.Status == UserStatus.Offline || u.Status == UserStatus.Unknown)}:black_heart: __`Members:`__ **{users.Count}** `-` {users.Count(u => u.Status == UserStatus.Online)}💚 {users.Count(u => u.Status == UserStatus.Idle)}🔶 {users.Count(u => u.Status == UserStatus.DoNotDisturb)}🔴 {users.Count(u=> u.Status == UserStatus.Offline || u.Status == UserStatus.Unknown)}
__`Roles:`__ **{server.Roles.Count()}** __`Roles:`__ **{server.Roles.Count()}**
__`Created At:`__ **{createdAt.ToString("dd.MM.yyyy HH:mm")}** __`Created At:`__ **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
"); ");

View File

@ -64,8 +64,8 @@ namespace NadekoBot.Services.Impl
return $@"```css return $@"```css
Author: [Kwoth#2560] | Library: [Discord.Net] Author: [Kwoth#2560] | Library: [Discord.Net]
Bot Version: [{BotVersion}] Bot Version: [{BotVersion}]
Bot id: {curUser.Id} Bot ID: {curUser.Id}
Owners Ids: {string.Join(", ", NadekoBot.Credentials.OwnerIds)} Owner ID(s): {string.Join(", ", NadekoBot.Credentials.OwnerIds)}
Uptime: {GetUptimeString()} Uptime: {GetUptimeString()}
Servers: {client.GetGuilds().Count} | TextChannels: {client.GetGuilds().SelectMany(g => g.GetChannels().Where(c => c is ITextChannel)).Count()} | VoiceChannels: {client.GetGuilds().SelectMany(g => g.GetChannels().Where(c => c is IVoiceChannel)).Count()} Servers: {client.GetGuilds().Count} | TextChannels: {client.GetGuilds().SelectMany(g => g.GetChannels().Where(c => c is ITextChannel)).Count()} | VoiceChannels: {client.GetGuilds().SelectMany(g => g.GetChannels().Where(c => c is IVoiceChannel)).Count()}
Commands Ran this session: {commandsRan} Commands Ran this session: {commandsRan}

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)))))}
```"); ```");