From bfaf241ecc78cd03432e839c5d5b9b0fc126e79e Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 6 Dec 2016 22:02:07 +0530 Subject: [PATCH 1/3] Update Help.cs removed the authr avatar --- src/NadekoBot/Modules/Help/Help.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index 5661c2b0..33fd3298 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -92,7 +92,7 @@ namespace NadekoBot.Modules.Help var erro = new EmbedBuilder() .WithAuthor(eau => eau.WithName("Sorry!") .WithUrl("http://nadekobot.readthedocs.io/en/latest/Commands%20List/") - .WithIconUrl(NadekoBot.Client.GetCurrentUser().AvatarUrl)) + //.WithIconUrl(NadekoBot.Client.GetCurrentUser().AvatarUrl)) //.WithTitle("Sorry!") .WithDescription("I can't find that command. Please check the **command** and **command prefix** before trying again.") .WithColor(NadekoBot.ErrorColor); @@ -106,7 +106,7 @@ namespace NadekoBot.Modules.Help var embed = new EmbedBuilder() .WithAuthor(eau => eau.WithName("Command") .WithUrl("http://nadekobot.readthedocs.io/en/latest/Commands%20List/") - .WithIconUrl(NadekoBot.Client.GetCurrentUser().AvatarUrl)) + //.WithIconUrl(NadekoBot.Client.GetCurrentUser().AvatarUrl)) //.WithTitle(str) //.WithDescription($"{ string.Format(com.Summary, com.Module.Prefix)}{ GetCommandRequirements(com)}") .AddField(fb => fb.WithIndex(1).WithName(str).WithValue($"{ string.Format(com.Summary, com.Module.Prefix)} { GetCommandRequirements(com)}").WithIsInline(true)) From 1accdb3d1fc1f8fe00dd13f71ae391c97611625a Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 7 Dec 2016 08:47:47 +0530 Subject: [PATCH 2/3] Add files via upload --- src/NadekoBot/Modules/Help/Help.cs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/NadekoBot/Modules/Help/Help.cs b/src/NadekoBot/Modules/Help/Help.cs index 33fd3298..0166cf4c 100644 --- a/src/NadekoBot/Modules/Help/Help.cs +++ b/src/NadekoBot/Modules/Help/Help.cs @@ -88,15 +88,7 @@ namespace NadekoBot.Modules.Help if (com == null) { - //await channel.SendMessageAsync("🔍 **I can't find that command.**"); - var erro = new EmbedBuilder() - .WithAuthor(eau => eau.WithName("Sorry!") - .WithUrl("http://nadekobot.readthedocs.io/en/latest/Commands%20List/") - //.WithIconUrl(NadekoBot.Client.GetCurrentUser().AvatarUrl)) - //.WithTitle("Sorry!") - .WithDescription("I can't find that command. Please check the **command** and **command prefix** before trying again.") - .WithColor(NadekoBot.ErrorColor); - await channel.EmbedAsync(erro.Build()); + await channel.SendErrorAsync("I can't find that command. Please check the **command** and **command prefix** before trying again."); return; } var str = $"**`{com.Text}`**"; @@ -104,19 +96,11 @@ namespace NadekoBot.Modules.Help if (alias != null) str += $" **/** **`{alias}`**"; var embed = new EmbedBuilder() - .WithAuthor(eau => eau.WithName("Command") - .WithUrl("http://nadekobot.readthedocs.io/en/latest/Commands%20List/") - //.WithIconUrl(NadekoBot.Client.GetCurrentUser().AvatarUrl)) - //.WithTitle(str) - //.WithDescription($"{ string.Format(com.Summary, com.Module.Prefix)}{ GetCommandRequirements(com)}") .AddField(fb => fb.WithIndex(1).WithName(str).WithValue($"{ string.Format(com.Summary, com.Module.Prefix)} { GetCommandRequirements(com)}").WithIsInline(true)) .AddField(fb => fb.WithIndex(2).WithName("**Usage**").WithValue($"{string.Format(com.Remarks, com.Module.Prefix)}").WithIsInline(false)) - //.AddField(fb => fb.WithIndex(3).WithName("**Description**").WithValue($"{ string.Format(com.Summary, com.Module.Prefix)}{ GetCommandRequirements(com)}").WithIsInline(true)) .WithColor(NadekoBot.OkColor); if (com != null) await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); - //await channel.SendMessageAsync(str + $@"{Environment.NewLine}**Desc:** {string.Format(com.Summary, com.Module.Prefix)} {GetCommandRequirements(com)} -//**Usage:** {string.Format(com.Remarks, com.Module.Prefix)}").ConfigureAwait(false); } private string GetCommandRequirements(Command cmd) From 85b15b442719e1648a36575f77d5ca77311383ed Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 7 Dec 2016 08:52:03 +0530 Subject: [PATCH 3/3] fix for random role change everyone mention --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index ed0aee0d..674bc681 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -147,13 +147,13 @@ namespace NadekoBot.Modules.Administration { var diffRoles = after.Roles.Where(r => !before.Roles.Contains(r)).Select(r => "**" + r.Name + "**"); //str += $"**User's Roles changed ⚔➕**👤`{before.ToString()}`\n\tNow has {string.Join(", ", diffRoles)} role."; - str += $"👤__**{before.ToString()}**__ **| User's Role Added |** 🆔 `{before.Id}`\n\t✅ {string.Join(", ", diffRoles)}\n\t\t⚔ **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; + str += $"👤__**{before.ToString()}**__ **| User's Role Added |** 🆔 `{before.Id}`\n\t✅ {string.Join(", ", diffRoles).SanitizeMentions()}\n\t\t⚔ **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; } else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "**" + r.Name + "**"); //str += $"**User's Roles changed **`{before.ToString()}`\n\tNo longer has {string.Join(", ", diffRoles)} role."; - str += $"👤__**{before.ToString()}**__ **| User's Role Removed |** 🆔 `{before.Id}`\n\t🚮 {string.Join(", ", diffRoles)}\n\t\t⚔ **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; + str += $"👤__**{before.ToString()}**__ **| User's Role Removed |** 🆔 `{before.Id}`\n\t🚮 {string.Join(", ", diffRoles).SanitizeMentions()}\n\t\t⚔ **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; } } else