From caa1666ef7309f76a6dc3cefd3552c19bcd2b107 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 21 Nov 2016 05:54:15 +0530 Subject: [PATCH] lot of changes - added colors - added emojis - changes few others - added css to server info --- src/NadekoBot/Modules/Utility/Utility.cs | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index c2b5cdae..7d37550b 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -37,9 +37,9 @@ namespace NadekoBot.Modules.Utility int i = 0; if (!arr.Any()) - await channel.SendMessageAsync(_l["`Nobody is playing that game.`"]).ConfigureAwait(false); + await channel.SendMessageAsync(_l["🚧 `Nobody is playing that game.`"]).ConfigureAwait(false); else - await channel.SendMessageAsync("```xl\n" + string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Concat(ig.Select(el => $"• {el,-35}")))) + "\n```").ConfigureAwait(false); + await channel.SendMessageAsync("```css\n" + string.Join("\n", arr.GroupBy(item => (i++) / 3).Select(ig => string.Concat(ig.Select(el => $"• {el,-35}")))) + "\n```").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -50,20 +50,20 @@ namespace NadekoBot.Modules.Utility return; var channel = (ITextChannel)umsg.Channel; var arg = roles.Split(',').Select(r => r.Trim().ToUpperInvariant()); - string send = _l["`Here is a list of users in a specfic role:`"]; + string send = _l["ℹ️ **Here is a list of users in a specfic role:**"]; foreach (var roleStr in arg.Where(str => !string.IsNullOrWhiteSpace(str) && str != "@EVERYONE" && str != "EVERYONE")) { var role = channel.Guild.Roles.Where(r => r.Name.ToUpperInvariant() == roleStr).FirstOrDefault(); if (role == null) continue; - send += $"\n`{role.Name}`\n"; - send += string.Join(", ", channel.Guild.GetUsers().Where(u => u.Roles.Contains(role)).Select(u => u.ToString())); + send += $"__**{role.Name}**__\n```css\n"; + send += string.Join(", ```", channel.Guild.GetUsers().Where(u => u.Roles.Contains(role)).Select(u => u.ToString())); } var usr = umsg.Author as IGuildUser; while (send.Length > 2000) { if (!usr.GetPermissions(channel).ManageMessages) { - await channel.SendMessageAsync($"{usr.Mention} you are not allowed to use this command on roles with a lot of users in them to prevent abuse.").ConfigureAwait(false); + await channel.SendMessageAsync($"⚠️ {usr.Mention} **you are not allowed to use this command on roles with a lot of users in them to prevent abuse.**").ConfigureAwait(false); return; } var curstr = send.Substring(0, 2000); @@ -80,7 +80,7 @@ namespace NadekoBot.Modules.Utility public async Task CheckMyPerms(IUserMessage msg) { - StringBuilder builder = new StringBuilder("```\n"); + StringBuilder builder = new StringBuilder("```http\n"); var user = msg.Author as IGuildUser; var perms = user.GetPermissions((ITextChannel)msg.Channel); foreach (var p in perms.GetType().GetProperties().Where(p => !p.GetGetMethod().GetParameters().Any())) @@ -97,20 +97,20 @@ namespace NadekoBot.Modules.Utility public async Task UserId(IUserMessage msg, IGuildUser target = null) { var usr = target ?? msg.Author; - await msg.Reply($"Id of the user { usr.Username } is { usr.Id }").ConfigureAwait(false); + await msg.Reply($"🆔 of the user **{ usr.Username }** is `{ usr.Id }`").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] public async Task ChannelId(IUserMessage msg) { - await msg.Reply($"This Channel's ID is {msg.Channel.Id}").ConfigureAwait(false); + await msg.Reply($"ℹ️ This **Channel's ID** is `{msg.Channel.Id}`").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] public async Task ServerId(IUserMessage msg) { - await msg.Reply($"This server's ID is {((ITextChannel)msg.Channel).Guild.Id}").ConfigureAwait(false); + await msg.Reply($"ℹ️ This **Server's ID** is `{((ITextChannel)msg.Channel).Guild.Id}`").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -126,11 +126,11 @@ namespace NadekoBot.Modules.Utility return; if (target != null) { - await msg.Reply($"`Page #{page} of roles for **{target.Username}**:` \n• " + string.Join("\n• ", target.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions()); + await msg.Reply($"⚔ **Page #{page} of roles for {target.Username}:** ```css\n• " + string.Join("\n• ```", target.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions()); } else { - await msg.Reply($"`Page #{page} of all roles on this server:` \n• " + string.Join("\n• ", guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions()); + await msg.Reply($"⚔ **Page #{page} of all roles on this server:** ```css\n• " + string.Join("\n• ```", guild.Roles.Except(new[] { guild.EveryoneRole }).OrderBy(r => r.Position).Skip((page - 1) * RolesPerPage).Take(RolesPerPage)).SanitizeMentions()); } } @@ -147,9 +147,9 @@ namespace NadekoBot.Modules.Utility var topic = channel.Topic; if (string.IsNullOrWhiteSpace(topic)) - await channel.SendMessageAsync("`No topic set.`"); + await channel.SendMessageAsync("❎ **No topic set.**"); else - await channel.SendMessageAsync("`Topic:` " + topic); + await channel.SendMessageAsync("ℹ️ **Topic:** " + topic); } [NadekoCommand, Usage, Description, Aliases] @@ -167,7 +167,7 @@ namespace NadekoBot.Modules.Utility var matches = emojiFinder.Matches(emojis); var result = string.Join("\n", matches.Cast() - .Select(m => $"`Name:` {m.Groups["name"]} `Link:` http://discordapp.com/api/emojis/{m.Groups["id"]}.png")); + .Select(m => $"**Name:** {m.Groups["name"]} **Link:** http://discordapp.com/api/emojis/{m.Groups["id"]}.png")); await msg.Channel.SendMessageAsync(result).ConfigureAwait(false); } @@ -188,11 +188,11 @@ namespace NadekoBot.Modules.Utility if (!guilds.Any()) { - await channel.SendMessageAsync("`No servers found on that page.`").ConfigureAwait(false); + await channel.SendMessageAsync("❎ No servers found on that page.").ConfigureAwait(false); return; } - await channel.SendMessageAsync(String.Join("\n", guilds.Select(g => $"`Name:` {g.Name} `Id:` {g.Id} `Members:` {g.GetUsers().Count} `OwnerId:`{g.OwnerId}"))).ConfigureAwait(false); + await channel.SendMessageAsync(String.Join("\n", guilds.Select(g => $"```css\n Name: {g.Name} ID: {g.Id} Members: #{g.GetUsers().Count} OwnerID:{g.OwnerId} ```"))).ConfigureAwait(false); } //[NadekoCommand, Usage, Description, Aliases]