From fdfaba5905be7b0f54ffbf51bf843c0494cc5688 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 16:24:14 +0530 Subject: [PATCH 01/54] Update Administration.cs - better emoji for ban reasons and same for others. - IDs are now `highlighted.` - role mention has better __`highlighter`__ --- .../Modules/Administration/Administration.cs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index aeab5df2..42e025a0 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -294,7 +294,7 @@ namespace NadekoBot.Modules.Administration try { await (await user.CreateDMChannelAsync()).SendMessageAsync($"⛔️ **You have been BANNED from `{channel.Guild.Name}` server.**\n" + - $"Reason: {msg}").ConfigureAwait(false); + $"⚖ *Reason:* {msg}").ConfigureAwait(false); await Task.Delay(2000).ConfigureAwait(false); } catch { } @@ -302,7 +302,7 @@ namespace NadekoBot.Modules.Administration { await channel.Guild.AddBanAsync(user, 7).ConfigureAwait(false); - await channel.SendMessageAsync("⛔️ **Banned** user **" + user.Username + "** ID: " + user.Id).ConfigureAwait(false); + await channel.SendMessageAsync("⛔️ **Banned** user **" + user.Username + "** ID: `" + user.Id + "`").ConfigureAwait(false); } catch { @@ -329,7 +329,7 @@ namespace NadekoBot.Modules.Administration try { await user.SendMessageAsync($"☣ **You have been SOFT-BANNED from `{channel.Guild.Name}` server.**\n" + - $"Reason: {msg}").ConfigureAwait(false); + $"⚖ *Reason:* {msg}").ConfigureAwait(false); await Task.Delay(2000).ConfigureAwait(false); } catch { } @@ -339,7 +339,7 @@ namespace NadekoBot.Modules.Administration try { await channel.Guild.RemoveBanAsync(user).ConfigureAwait(false); } catch { await channel.Guild.RemoveBanAsync(user).ConfigureAwait(false); } - await channel.SendMessageAsync("☣ **Soft-Banned** user **" + user.Username + "** ID: " + user.Id).ConfigureAwait(false); + await channel.SendMessageAsync("☣ **Soft-Banned** user **" + user.Username + "** ID: `" + user.Id + "`").ConfigureAwait(false); } catch { @@ -370,7 +370,7 @@ namespace NadekoBot.Modules.Administration try { await user.SendMessageAsync($"‼️**You have been KICKED from `{channel.Guild.Name}` server.**\n" + - $"Reason: {msg}").ConfigureAwait(false); + $"⚖ *Reason:* {msg}").ConfigureAwait(false); await Task.Delay(2000).ConfigureAwait(false); } catch { } @@ -378,7 +378,7 @@ namespace NadekoBot.Modules.Administration try { await user.KickAsync().ConfigureAwait(false); - await channel.SendMessageAsync("‼️**Kicked** user **" + user.Username + "** ID: " + user.Id).ConfigureAwait(false); + await channel.SendMessageAsync("‼️**Kicked** user **" + user.Username + "** ID: `" + user.Id + "`").ConfigureAwait(false); } catch { @@ -587,7 +587,7 @@ namespace NadekoBot.Modules.Administration { var channel = (ITextChannel)umsg.Channel; var ch = await channel.Guild.CreateVoiceChannelAsync(channelName).ConfigureAwait(false); - await channel.SendMessageAsync($"✅ Created voice channel **{ch.Name}**, ID: {ch.Id}.").ConfigureAwait(false); + await channel.SendMessageAsync($"✅ Created voice channel **{ch.Name}**. ID: `{ch.Id}`").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -596,7 +596,7 @@ namespace NadekoBot.Modules.Administration public async Task DelTxtChanl(IUserMessage umsg, [Remainder] ITextChannel toDelete) { await toDelete.DeleteAsync().ConfigureAwait(false); - await umsg.Channel.SendMessageAsync($"🗑 Removed text channel **{toDelete.Name}**, ID: {toDelete.Id}.").ConfigureAwait(false); + await umsg.Channel.SendMessageAsync($"🗑 Removed text channel **{toDelete.Name}**. ID: `{toDelete.Id}`").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -606,7 +606,7 @@ namespace NadekoBot.Modules.Administration { var channel = (ITextChannel)umsg.Channel; var txtCh = await channel.Guild.CreateTextChannelAsync(channelName).ConfigureAwait(false); - await channel.SendMessageAsync($"✅ Added text channel **{txtCh.Name}**, ID: {txtCh.Id}.").ConfigureAwait(false); + await channel.SendMessageAsync($"✅ Added text channel **{txtCh.Name}**. ID: `{txtCh.Id}`").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -805,7 +805,7 @@ namespace NadekoBot.Modules.Administration g.GetDefaultChannelAsync() )).ConfigureAwait(false); - await Task.WhenAll(channels.Select(c => c.SendMessageAsync($"🆕 **Message from {umsg.Author} (Bot Owner):** " + message))) + await Task.WhenAll(channels.Select(c => c.SendMessageAsync($"🆕 **Message from {umsg.Author} `(Bot Owner)`:** " + message))) .ConfigureAwait(false); await channel.SendMessageAsync("🆗").ConfigureAwait(false); @@ -851,10 +851,10 @@ namespace NadekoBot.Modules.Administration { var channel = (ITextChannel)umsg.Channel; - string send = $"❕{umsg.Author.Mention} has invoked a mention on the following roles❕"; + string send = $"❕{umsg.Author.Mention} __`has invoked a mention on the following roles`__❕"; foreach (var role in roles) { - send += $"\n`{role.Name}`\n"; + send += $"\n**{role.Name}**\n"; send += string.Join(", ", (await channel.Guild.GetUsersAsync()).Where(u => u.Roles.Contains(role)).Distinct().Select(u=>u.Mention)); } From 7102914b4913636c7d7d86faa0ac0e4fdf6484d0 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 17:27:39 +0530 Subject: [PATCH 02/54] Update SelfAssignedRolesCommand.cs - added emojis. - improved `placements`. --- .../Commands/SelfAssignedRolesCommand.cs | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs index 4635cf53..1a8bb600 100644 --- a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs @@ -32,7 +32,7 @@ namespace NadekoBot.Modules.Administration await uow.CompleteAsync().ConfigureAwait(false); } - await channel.SendMessageAsync($"Automatic deleting of `iam` and `iamn` confirmations has been {(newval ? "enabled" : "disabled")}.") + await channel.SendMessageAsync($"ℹ️ Automatic deleting of `iam` and `iamn` confirmations has been {(newval ? "**enabled**" : "**disabled**")}.") .ConfigureAwait(false); } @@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Administration roles = uow.SelfAssignedRoles.GetFromGuild(channel.Guild.Id); if (roles.Any(s => s.RoleId == role.Id && s.GuildId == role.GuildId)) { - msg = $":anger:Role **{role.Name}** is already in the list."; + msg = $"💢 Role **{role.Name}** is already in the list."; } else { @@ -60,7 +60,7 @@ namespace NadekoBot.Modules.Administration GuildId = role.GuildId }); await uow.CompleteAsync(); - msg = $":ok:Role **{role.Name}** added to the list."; + msg = $"🆗 Role **{role.Name}** added to the list."; } } await channel.SendMessageAsync(msg.ToString()).ConfigureAwait(false); @@ -81,10 +81,10 @@ namespace NadekoBot.Modules.Administration } if (!success) { - await channel.SendMessageAsync(":anger:That role is not self-assignable.").ConfigureAwait(false); + await channel.SendMessageAsync("❎ That role is not self-assignable.").ConfigureAwait(false); return; } - await channel.SendMessageAsync($":ok:**{role.Name}** has been removed from the list of self-assignable roles").ConfigureAwait(false); + await channel.SendMessageAsync($"🗑 **{role.Name}** has been removed from the list of self-assignable roles.").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -99,7 +99,7 @@ namespace NadekoBot.Modules.Administration using (var uow = DbHandler.UnitOfWork()) { var roleModels = uow.SelfAssignedRoles.GetFromGuild(channel.Guild.Id); - msg.AppendLine($"There are `{roleModels.Count()}` self assignable roles:"); + msg.AppendLine($"ℹ️ There are `{roleModels.Count()}` self assignable roles:"); foreach (var roleModel in roleModels) { @@ -137,8 +137,8 @@ namespace NadekoBot.Modules.Administration areExclusive = config.ExclusiveSelfAssignedRoles = !config.ExclusiveSelfAssignedRoles; await uow.CompleteAsync(); } - string exl = areExclusive ? "exclusive." : "not exclusive."; - await channel.SendMessageAsync("Self assigned roles are now " + exl); + string exl = areExclusive ? "**exclusive**." : "**not exclusive**."; + await channel.SendMessageAsync("ℹ️ Self assigned roles are now " + exl); } [NadekoCommand, Usage, Description, Aliases] @@ -159,12 +159,12 @@ namespace NadekoBot.Modules.Administration SelfAssignedRole roleModel; if ((roleModel = roles.FirstOrDefault(r=>r.RoleId == role.Id)) == null) { - await channel.SendMessageAsync(":anger:That role is not self-assignable.").ConfigureAwait(false); + await channel.SendMessageAsync("💢 That role is not self-assignable.").ConfigureAwait(false); return; } if (guildUser.Roles.Contains(role)) { - await channel.SendMessageAsync($":anger:You already have {role.Name} role.").ConfigureAwait(false); + await channel.SendMessageAsync($"❎ You already have **{role.Name}** role.").ConfigureAwait(false); return; } @@ -173,7 +173,7 @@ namespace NadekoBot.Modules.Administration var sameRoles = guildUser.Roles.Where(r => roles.Any(rm => rm.RoleId == r.Id)); if (sameRoles.Any()) { - await channel.SendMessageAsync($":anger:You already have {sameRoles.FirstOrDefault().Name} exclusive self-assigned role.").ConfigureAwait(false); + await channel.SendMessageAsync($"❎ You already have **{sameRoles.FirstOrDefault().Name}** `exclusive self-assigned` role.").ConfigureAwait(false); return; } } @@ -183,11 +183,11 @@ namespace NadekoBot.Modules.Administration } catch (Exception ex) { - await channel.SendMessageAsync($":anger:`I am unable to add that role to you. I can't add roles to owners or other roles higher than my role in the role hierarchy.`").ConfigureAwait(false); + await channel.SendMessageAsync($"⚠️ I am unable to add that role to you. `I can't add roles to owners or other roles higher than my role in the role hierarchy.`").ConfigureAwait(false); Console.WriteLine(ex); return; } - var msg = await channel.SendMessageAsync($":ok:You now have {role.Name} role.").ConfigureAwait(false); + var msg = await channel.SendMessageAsync($"🆗 You now have **{role.Name}** role.").ConfigureAwait(false); if (conf.AutoDeleteSelfAssignedRoleMessages) { @@ -217,12 +217,12 @@ namespace NadekoBot.Modules.Administration SelfAssignedRole roleModel; if ((roleModel = roles.FirstOrDefault(r => r.RoleId == role.Id)) == null) { - await channel.SendMessageAsync(":anger:That role is not self-assignable.").ConfigureAwait(false); + await channel.SendMessageAsync("💢 That role is not self-assignable.").ConfigureAwait(false); return; } if (!guildUser.Roles.Contains(role)) { - await channel.SendMessageAsync($":anger:You don't have {role.Name} role.").ConfigureAwait(false); + await channel.SendMessageAsync($"❎ You don't have **{role.Name}** role.").ConfigureAwait(false); return; } try @@ -231,10 +231,10 @@ namespace NadekoBot.Modules.Administration } catch (Exception) { - await channel.SendMessageAsync($":anger:`I am unable to add that role to you. I can't remove roles to owners or other roles higher than my role in the role hierarchy.`").ConfigureAwait(false); + await channel.SendMessageAsync($"⚠️ I am unable to add that role to you. `I can't remove roles to owners or other roles higher than my role in the role hierarchy.`").ConfigureAwait(false); return; } - var msg = await channel.SendMessageAsync($":ok: You no longer have {role.Name} role.").ConfigureAwait(false); + var msg = await channel.SendMessageAsync($"🆗 You no longer have **{role.Name}** role.").ConfigureAwait(false); if (conf.AutoDeleteSelfAssignedRoleMessages) { @@ -248,4 +248,4 @@ namespace NadekoBot.Modules.Administration } } } -} \ No newline at end of file +} From c4986126edee1c1ff9b99835112f3f30f9d33863 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 17:59:19 +0530 Subject: [PATCH 03/54] Update ServerGreetCommands.cs - emojis added - bold text added - msg already set are now `highlighted` better. --- .../Commands/ServerGreetCommands.cs | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs index 435dc700..32550225 100644 --- a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs @@ -135,9 +135,9 @@ namespace NadekoBot.Modules.Administration await ServerGreetCommands.SetGreetDel(channel.Guild.Id, timer).ConfigureAwait(false); if (timer > 0) - await channel.SendMessageAsync($"`Greet messages will be deleted after {timer} seconds.`").ConfigureAwait(false); + await channel.SendMessageAsync($"🆗 Greet messages **will be deleted** after `{timer} seconds`.").ConfigureAwait(false); else - await channel.SendMessageAsync("`Automatic deletion of greet messages has been disabled.`").ConfigureAwait(false); + await channel.SendMessageAsync("ℹ️ Automatic deletion of greet messages has been **disabled**.").ConfigureAwait(false); } private static async Task SetGreetDel(ulong id, int timer) @@ -164,9 +164,9 @@ namespace NadekoBot.Modules.Administration var enabled = await ServerGreetCommands.SetGreet(channel.Guild.Id, channel.Id).ConfigureAwait(false); if (enabled) - await channel.SendMessageAsync("Greeting messages enabled on this channel.").ConfigureAwait(false); + await channel.SendMessageAsync("✅ Greeting messages **enabled** on this channel.").ConfigureAwait(false); else - await channel.SendMessageAsync("Greeting messages disabled.").ConfigureAwait(false); + await channel.SendMessageAsync("ℹ️ Greeting messages **disabled**.").ConfigureAwait(false); } private static async Task SetGreet(ulong guildId, ulong channelId, bool? value = null) @@ -197,15 +197,15 @@ namespace NadekoBot.Modules.Administration { config = uow.GuildConfigs.For(channel.Guild.Id); } - await channel.SendMessageAsync("`Current greet message:` " + config.ChannelGreetMessageText?.SanitizeMentions()); + await channel.SendMessageAsync("ℹ️ Current **greet** message: `" + config.ChannelGreetMessageText?.SanitizeMentions() + "`"); return; } var sendGreetEnabled = ServerGreetCommands.SetGreetMessage(channel.Guild.Id, ref text); - await channel.SendMessageAsync("New greet message set.").ConfigureAwait(false); + await channel.SendMessageAsync("🆗 New greet message **set**.").ConfigureAwait(false); if (!sendGreetEnabled) - await channel.SendMessageAsync("Enable greet messsages by typing `.greet`").ConfigureAwait(false); + await channel.SendMessageAsync("ℹ️ Enable greet messsages by typing `.greet`").ConfigureAwait(false); } public static bool SetGreetMessage(ulong guildId, ref string message) @@ -238,9 +238,9 @@ namespace NadekoBot.Modules.Administration var enabled = await ServerGreetCommands.SetGreetDm(channel.Guild.Id).ConfigureAwait(false); if (enabled) - await channel.SendMessageAsync("DM Greet announcements enabled.").ConfigureAwait(false); + await channel.SendMessageAsync("🆗 DM Greet announcements **enabled**.").ConfigureAwait(false); else - await channel.SendMessageAsync("Greet announcements disabled.").ConfigureAwait(false); + await channel.SendMessageAsync("ℹ️ Greet announcements **disabled**.").ConfigureAwait(false); } private static async Task SetGreetDm(ulong guildId, bool? value = null) @@ -270,15 +270,15 @@ namespace NadekoBot.Modules.Administration { config = uow.GuildConfigs.For(channel.Guild.Id); } - await channel.SendMessageAsync("`Current DM greet message:` " + config.ChannelGreetMessageText?.SanitizeMentions()); + await channel.SendMessageAsync("ℹ️ Current **DM greet** message: `" + config.ChannelGreetMessageText?.SanitizeMentions() + "`"); return; } var sendGreetEnabled = ServerGreetCommands.SetGreetMessage(channel.Guild.Id, ref text); - await channel.SendMessageAsync("New DM greet message set.").ConfigureAwait(false); + await channel.SendMessageAsync("🆗 New DM greet message **set**.").ConfigureAwait(false); if (!sendGreetEnabled) - await channel.SendMessageAsync($"Enable DM greet messsages by typing `{NadekoBot.ModulePrefixes[typeof(Administration).Name]}greetdm`").ConfigureAwait(false); + await channel.SendMessageAsync($"ℹ️ Enable DM greet messsages by typing `{NadekoBot.ModulePrefixes[typeof(Administration).Name]}greetdm`").ConfigureAwait(false); } public static bool SetGreetDmMessage(ulong guildId, ref string message) @@ -311,9 +311,9 @@ namespace NadekoBot.Modules.Administration var enabled = await ServerGreetCommands.SetBye(channel.Guild.Id, channel.Id).ConfigureAwait(false); if (enabled) - await channel.SendMessageAsync("Bye announcements enabled on this channel.").ConfigureAwait(false); + await channel.SendMessageAsync("✅ Bye announcements **enabled** on this channel.").ConfigureAwait(false); else - await channel.SendMessageAsync("Bye announcements disabled.").ConfigureAwait(false); + await channel.SendMessageAsync("ℹ️ Bye announcements **disabled**.").ConfigureAwait(false); } private static async Task SetBye(ulong guildId, ulong channelId, bool? value = null) @@ -344,15 +344,15 @@ namespace NadekoBot.Modules.Administration { config = uow.GuildConfigs.For(channel.Guild.Id); } - await channel.SendMessageAsync("`Current bye message:` " + config.ChannelByeMessageText?.SanitizeMentions()); + await channel.SendMessageAsync("ℹ️ Current **bye** message: `" + config.ChannelByeMessageText?.SanitizeMentions() + "`"); return; } var sendByeEnabled = ServerGreetCommands.SetByeMessage(channel.Guild.Id, ref text); - await channel.SendMessageAsync("New bye message set.").ConfigureAwait(false); + await channel.SendMessageAsync("🆗 New bye message **set**.").ConfigureAwait(false); if (!sendByeEnabled) - await channel.SendMessageAsync($"Enable bye messsages by typing `{NadekoBot.ModulePrefixes[typeof(Administration).Name]}bye`").ConfigureAwait(false); + await channel.SendMessageAsync($"ℹ️ Enable bye messsages by typing `{NadekoBot.ModulePrefixes[typeof(Administration).Name]}bye`").ConfigureAwait(false); } public static bool SetByeMessage(ulong guildId, ref string message) @@ -385,9 +385,9 @@ namespace NadekoBot.Modules.Administration await ServerGreetCommands.SetByeDel(channel.Guild.Id, timer).ConfigureAwait(false); if (timer > 0) - await channel.SendMessageAsync($"`Bye messages will be deleted after {timer} seconds.`").ConfigureAwait(false); + await channel.SendMessageAsync($"🆗 Bye messages **will be deleted** after `{timer} seconds`.").ConfigureAwait(false); else - await channel.SendMessageAsync("`Automatic deletion of bye messages has been disabled.`").ConfigureAwait(false); + await channel.SendMessageAsync("ℹ️ Automatic deletion of bye messages has been **disabled**.").ConfigureAwait(false); } private static async Task SetByeDel(ulong id, int timer) @@ -406,4 +406,4 @@ namespace NadekoBot.Modules.Administration } } -} \ No newline at end of file +} From 3e5a7defea0301db1736d2a5eec009a636d2df62 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 18:27:38 +0530 Subject: [PATCH 04/54] Update VoicePlusTextCommands.cs - emojis added or changed - text bold and `highlighted` --- .../Commands/VoicePlusTextCommands.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs index 5a1b12ac..98c39fc8 100644 --- a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs @@ -52,8 +52,8 @@ namespace NadekoBot.Modules.Administration try { await (await guild.GetOwnerAsync()).SendMessageAsync( - "I don't have manage server and/or Manage Channels permission," + - $" so I cannot run voice+text on **{guild.Name}** server.").ConfigureAwait(false); + "⚠️ I don't have **manage server** and/or **manage channels** permission," + + $" so I cannot run `voice+text` on **{guild.Name}** server.").ConfigureAwait(false); } catch { } using (var uow = DbHandler.UnitOfWork()) @@ -116,7 +116,7 @@ namespace NadekoBot.Modules.Administration var botUser = await guild.GetCurrentUserAsync().ConfigureAwait(false); if (!botUser.GuildPermissions.ManageRoles || !botUser.GuildPermissions.ManageChannels) { - await channel.SendMessageAsync(":anger: `I require atleast manage roles and manage channels permissions to enable this feature (preffered Administration permission).`"); + await channel.SendMessageAsync("💢 I require atleast **manage roles** and **manage channels permissions** to enable this feature. `(preffered Administration permission)`"); return; } @@ -124,8 +124,8 @@ namespace NadekoBot.Modules.Administration { try { - await channel.SendMessageAsync(":warning: `You are enabling this feature and I do not have ADMINISTRATOR permissions, " + - "this may cause some issues, and you will have to clean up text channels yourself afterwards.`"); + await channel.SendMessageAsync("⚠️ You are enabling this feature and **I do not have ADMINISTRATOR permissions**. " + + "`This may cause some issues, and you will have to clean up text channels yourself afterwards.`"); } catch { } } @@ -145,11 +145,11 @@ namespace NadekoBot.Modules.Administration { try { await textChannel.DeleteAsync().ConfigureAwait(false); } catch { } } - await channel.SendMessageAsync("Successfuly removed voice + text feature.").ConfigureAwait(false); + await channel.SendMessageAsync("ℹ️ Successfuly **removed** voice + text feature.").ConfigureAwait(false); return; } voicePlusTextCache.Add(guild.Id); - await channel.SendMessageAsync("Successfuly enabled voice + text feature.").ConfigureAwait(false); + await channel.SendMessageAsync("🆗 Successfuly **enabled** voice + text feature.").ConfigureAwait(false); } catch (Exception ex) @@ -168,7 +168,7 @@ namespace NadekoBot.Modules.Administration var botUser = await guild.GetCurrentUserAsync().ConfigureAwait(false); if (!botUser.GuildPermissions.Administrator) { - await channel.SendMessageAsync("`I need Administrator permission to do that.`").ConfigureAwait(false); + await channel.SendMessageAsync("⚠️ I need **Administrator permission** to do that.").ConfigureAwait(false); return; } @@ -187,4 +187,4 @@ namespace NadekoBot.Modules.Administration } } } -} \ No newline at end of file +} From cb6089ca26787b5ebf64ee051cf0a986fc1a5075 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 18:31:22 +0530 Subject: [PATCH 05/54] Update VoicePlusTextCommands.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - added ✅ to .cv+t --- .../Modules/Administration/Commands/VoicePlusTextCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs index 98c39fc8..96906532 100644 --- a/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommands.cs @@ -183,7 +183,7 @@ namespace NadekoBot.Modules.Administration await Task.Delay(500); } - await channel.SendMessageAsync("`Done.`").ConfigureAwait(false); + await channel.SendMessageAsync("✅ Done.").ConfigureAwait(false); } } } From 4f55f7e23640a73b2debf149c91a740e2069337e Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 23:51:25 +0530 Subject: [PATCH 06/54] check --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 8bfde110..0ef6e555 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -106,7 +106,7 @@ namespace NadekoBot.Modules.Administration { punishment = "BANNED"; } - await logChannel.SendMessageAsync(String.Join("\n",users.Select(user=>$"{Format.Bold(user.ToString())} was **{punishment}** due to `{protection}` protection on **{user.Guild.Name}** server."))) + await logChannel.SendMessageAsync(String.Join("\n",users.Select(user=>$"‼️ {Format.Bold(user.ToString())} got **{punishment}** due to `{protection}` protection on **{user.Guild.Name}** server."))) .ConfigureAwait(false); } @@ -410,7 +410,7 @@ namespace NadekoBot.Modules.Administration try { var str = $@"🕔`{prettyCurrentTime}` **Message** 🚮 `#{channel.Name}` -👤`{msg.Author.Username}`: {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; +👤`{msg.Author.Username}{msg.Author.Discriminator}`: {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}`Attachements`: {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; await logChannel.SendMessageAsync(str.SanitizeMentions()).ConfigureAwait(false); @@ -724,4 +724,4 @@ namespace NadekoBot.Modules.Administration //} } } -} \ No newline at end of file +} From fc6adb824df607c06734d883db9e37ae28fb5c31 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 00:03:25 +0530 Subject: [PATCH 07/54] Update LogCommand.cs --- 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 0ef6e555..c48ae6ea 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -409,8 +409,8 @@ namespace NadekoBot.Modules.Administration { try { - var str = $@"🕔`{prettyCurrentTime}` **Message** 🚮 `#{channel.Name}` -👤`{msg.Author.Username}{msg.Author.Discriminator}`: {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; + var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}`**Message DELETED** #⃣ `{channel.Name}` +🗑 {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}`Attachements`: {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; await logChannel.SendMessageAsync(str.SanitizeMentions()).ConfigureAwait(false); From e602bbb7ab113df6d3f5b27b03bbf4bfa66dcbc0 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 00:08:05 +0530 Subject: [PATCH 08/54] Update LogCommand.cs --- 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 c48ae6ea..8c32f386 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -409,8 +409,8 @@ namespace NadekoBot.Modules.Administration { try { - var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}`**Message DELETED** #⃣ `{channel.Name}` -🗑 {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; + var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator} `**Deleted Message** #⃣ `{channel.Name}` +🗑 `{msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}`"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}`Attachements`: {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; await logChannel.SendMessageAsync(str.SanitizeMentions()).ConfigureAwait(false); From a96d62d40c6f8f2d662b27b798f1a5bfed9d01a1 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 00:11:48 +0530 Subject: [PATCH 09/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 8c32f386..7b9abba7 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -409,7 +409,7 @@ namespace NadekoBot.Modules.Administration { try { - var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator} `**Deleted Message** #⃣ `{channel.Name}` + var str = $@"🕔`{prettyCurrentTime}`\t👤`{msg.Author.Username}#{msg.Author.Discriminator}`\t**Deleted Message**\t#⃣ `{channel.Name}` 🗑 `{msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}`"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}`Attachements`: {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; From f04ce0c3172f7460f7025549b65dcfc6866b07e5 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 00:18:38 +0530 Subject: [PATCH 10/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 7b9abba7..ce9947b9 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -409,7 +409,7 @@ namespace NadekoBot.Modules.Administration { try { - var str = $@"🕔`{prettyCurrentTime}`\t👤`{msg.Author.Username}#{msg.Author.Discriminator}`\t**Deleted Message**\t#⃣ `{channel.Name}` + var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** #⃣ `{channel.Name}` 🗑 `{msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}`"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}`Attachements`: {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; From 042160e1637a826dc52121dd14c468cd01051e0f Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 00:42:16 +0530 Subject: [PATCH 11/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index ce9947b9..8cbac7f5 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -410,7 +410,7 @@ namespace NadekoBot.Modules.Administration try { var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** #⃣ `{channel.Name}` -🗑 `{msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}`"; +🗑 {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}`Attachements`: {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; await logChannel.SendMessageAsync(str.SanitizeMentions()).ConfigureAwait(false); From d489b986d643f09e7be3cade95f013c4956b13aa Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 00:51:56 +0530 Subject: [PATCH 12/54] Update LogCommand.cs --- 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 8cbac7f5..1b7abbc4 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -410,9 +410,9 @@ namespace NadekoBot.Modules.Administration try { var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** #⃣ `{channel.Name}` -🗑 {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; +🗑 `{msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}`"; if (msg.Attachments.Any()) - str += $"{Environment.NewLine}`Attachements`: {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; + str += $"{Environment.NewLine}📎 {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; await logChannel.SendMessageAsync(str.SanitizeMentions()).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } From 117f8136e785d1740e8c8e77a4b588e860231175 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 00:59:38 +0530 Subject: [PATCH 13/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 1b7abbc4..58830a9c 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -410,7 +410,7 @@ namespace NadekoBot.Modules.Administration try { var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** #⃣ `{channel.Name}` -🗑 `{msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}`"; +🗑 {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}📎 {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; await logChannel.SendMessageAsync(str.SanitizeMentions()).ConfigureAwait(false); From 1330bd4883b2911ba6ef26da0d3af45405cec71b Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 01:58:58 +0530 Subject: [PATCH 14/54] Update LogCommand.cs better placements and emojis to - user joined - user left - user unbanned - user banned - message deleted - punishments --- .../Modules/Administration/Commands/LogCommand.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 58830a9c..4b3395c6 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -318,7 +318,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"`{prettyCurrentTime}`❗`User left:` **{usr.Username}** ({usr.Id})").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"❗️🕛`{prettyCurrentTime}`👤`{usr.Username}#{usr.Discriminator}`❌ **USER LEFT** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -338,7 +338,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"`{prettyCurrentTime}`❗`User joined:` **{usr.Username}** ({usr.Id})").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"❕🕓`{prettyCurrentTime}`👤`{usr.Username}#{usr.Discriminator}`✅ **USER JOINED** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -358,7 +358,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"`{prettyCurrentTime}`♻`User unbanned:` **{usr.Username}** ({usr.Id})").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"❕🕘`{prettyCurrentTime}`👤`{usr.Username}#{usr.Discriminator}`♻️ **USER UN-BANNED** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -378,7 +378,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"❗`{prettyCurrentTime}`❌`User banned:` **{usr.Username}** ({usr.Id})").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"‼️🕕`{prettyCurrentTime}`👤`{usr.Username}#{usr.Discriminator}`🚫 **USER BANNED** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; From 30977051632c1f88abce8ae6fdf3836a4886bf81 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 02:19:24 +0530 Subject: [PATCH 15/54] Update LogCommand.cs - emojis to punishments --- .../Modules/Administration/Commands/LogCommand.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 4b3395c6..86c85ff8 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -96,17 +96,17 @@ namespace NadekoBot.Modules.Administration var punishment = ""; if (action == PunishmentAction.Mute) { - punishment = "MUTED"; + punishment = "🔇 MUTED"; } else if (action == PunishmentAction.Kick) { - punishment = "KICKED"; + punishment = "☣ KICKED"; } else if (action == PunishmentAction.Ban) { - punishment = "BANNED"; + punishment = "⛔️ BANNED"; } - await logChannel.SendMessageAsync(String.Join("\n",users.Select(user=>$"‼️ {Format.Bold(user.ToString())} got **{punishment}** due to `{protection}` protection on **{user.Guild.Name}** server."))) + await logChannel.SendMessageAsync(String.Join("\n",users.Select(user=>$"‼️ {Format.Bold(user.ToString())} got **{punishment}** due to __**{protection}**__ protection on **{user.Guild.Name}** server."))) .ConfigureAwait(false); } From 511a643b8e2c2033e52accc329665edc451878c6 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 02:35:19 +0530 Subject: [PATCH 16/54] Update LogCommand.cs - added better explaination to kick punisment - changed just kick to (soft-ban and kick) --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 86c85ff8..88efd537 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -100,7 +100,7 @@ namespace NadekoBot.Modules.Administration } else if (action == PunishmentAction.Kick) { - punishment = "☣ KICKED"; + punishment = "☣ SOFT-BANNED (KICKED)"; } else if (action == PunishmentAction.Ban) { From 3939aefa56fab878cdbd466226b9346a7fe0864b Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 03:48:18 +0530 Subject: [PATCH 17/54] Global Quotes - made quotes global because its better to have quotes global while custom reaction can be both --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index c1b35efe..0d307905 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -51,7 +51,8 @@ namespace NadekoBot.Modules.Utility Quote quote; using (var uow = DbHandler.Instance.GetUnitOfWork()) { - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); +// quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(keyword).ConfigureAwait(false); } if (quote == null) From b0e92ea4d2b49dac9bed686f6bf5d054e5b3b33c Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 03:58:51 +0530 Subject: [PATCH 18/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 0d307905..e1f71064 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -38,7 +38,7 @@ namespace NadekoBot.Modules.Utility } [NadekoCommand, Usage, Description, Aliases] - [RequireContext(ContextType.Guild)] +// [RequireContext(ContextType.Guild)] public async Task ShowQuote(IUserMessage umsg, [Remainder] string keyword) { var channel = (ITextChannel)umsg.Channel; @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(keyword).ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync.ConfigureAwait(false); } if (quote == null) From b3bca6c3c3f34d9ee4c4eb6e048857930ef5992d Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 04:11:15 +0530 Subject: [PATCH 19/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index e1f71064..7b6c4d70 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync.ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(, keyword).ConfigureAwait(false); } if (quote == null) From 555779e3ca9d8d2531a2c26da6849145ee295791 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 04:14:08 +0530 Subject: [PATCH 20/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 7b6c4d70..f2ef8289 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(, keyword).ConfigureAwait(false); + quote = await Quotes.GetRandomQuoteByKeywordAsync(keyword).ConfigureAwait(false); } if (quote == null) From 13d7ec2805170df3a488d8b9e995b8ca9d9faeb9 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 04:23:50 +0530 Subject: [PATCH 21/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index f2ef8289..5b8427c8 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -49,11 +49,10 @@ namespace NadekoBot.Modules.Utility keyword = keyword.ToUpperInvariant(); Quote quote; - using (var uow = DbHandler.Instance.GetUnitOfWork()) - { +// using (var uow = DbHandler.Instance.GetUnitOfWork()) +// { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await Quotes.GetRandomQuoteByKeywordAsync(keyword).ConfigureAwait(false); - } +// } if (quote == null) return; From 6217ec96684934c10663d838ff9b3d56136b790b Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 04:30:44 +0530 Subject: [PATCH 22/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 5b8427c8..a012fbcc 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -49,10 +49,11 @@ namespace NadekoBot.Modules.Utility keyword = keyword.ToUpperInvariant(); Quote quote; -// using (var uow = DbHandler.Instance.GetUnitOfWork()) -// { + using (var uow = DbHandler.Instance.GetUnitOfWork()) + { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); -// } + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(keyword, keyword).ConfigureAwait(false); + } if (quote == null) return; From 84c811bcd1141a5c9e209535c6a54e323fc81fea Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 04:36:35 +0530 Subject: [PATCH 23/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index a012fbcc..73dd4adf 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(keyword, keyword).ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Id, keyword).ConfigureAwait(false); } if (quote == null) From 396f6b55248e43a9bae9f93ab6ed7faabc33132d Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 04:40:39 +0530 Subject: [PATCH 24/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 73dd4adf..47709235 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Id, keyword).ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(Id, keyword).ConfigureAwait(false); } if (quote == null) From 9895f37c5347ddadab7ef2314a17743f6a541d13 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 04:46:16 +0530 Subject: [PATCH 25/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 47709235..7467bfd3 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(Id, keyword).ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeyword.ConfigureAwait(false); } if (quote == null) From 52118505366bf787b12fba389269bc9f58082404 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 04:48:51 +0530 Subject: [PATCH 26/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 7467bfd3..e6b16b96 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeyword.ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(null, keyword).ConfigureAwait(false); } if (quote == null) From eea70209848b7255049f023bf770b13c0c353f71 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 05:01:58 +0530 Subject: [PATCH 27/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index e6b16b96..30626813 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(null, keyword).ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(ulong, keyword).ConfigureAwait(false); } if (quote == null) From c83c31e254cad7df3daf98c5158be5fa5d171957 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 05:06:35 +0530 Subject: [PATCH 28/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 30626813..1f27dc8e 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -52,7 +52,7 @@ namespace NadekoBot.Modules.Utility using (var uow = DbHandler.Instance.GetUnitOfWork()) { // quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(ulong, keyword).ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(1 * 9999999, keyword).ConfigureAwait(false); } if (quote == null) From fb7980566acd9f2673712bdd84421b28fcbed347 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 05:09:41 +0530 Subject: [PATCH 29/54] Update QuoteCommands.cs --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 1f27dc8e..c1b35efe 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -38,7 +38,7 @@ namespace NadekoBot.Modules.Utility } [NadekoCommand, Usage, Description, Aliases] -// [RequireContext(ContextType.Guild)] + [RequireContext(ContextType.Guild)] public async Task ShowQuote(IUserMessage umsg, [Remainder] string keyword) { var channel = (ITextChannel)umsg.Channel; @@ -51,8 +51,7 @@ namespace NadekoBot.Modules.Utility Quote quote; using (var uow = DbHandler.Instance.GetUnitOfWork()) { -// quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); - quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(1 * 9999999, keyword).ConfigureAwait(false); + quote = await uow.Quotes.GetRandomQuoteByKeywordAsync(channel.Guild.Id, keyword).ConfigureAwait(false); } if (quote == null) From c4379e65006e076afb5e4ffb280d1ac62edbb54c Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 15:36:09 +0530 Subject: [PATCH 30/54] Update LogCommand.cs - userid added to deleted messeges --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 88efd537..6637105f 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -409,7 +409,7 @@ namespace NadekoBot.Modules.Administration { try { - var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** #⃣ `{channel.Name}` + var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** 🆔 `{usr.Id}` #⃣ `{channel.Name}` 🗑 {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}📎 {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; From 23a5801790e8507058fad9f3cd7573e052e270ab Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 15:40:10 +0530 Subject: [PATCH 31/54] Update LogCommand.cs - added userID to deleted messages log to aid discord.net/ discord issue where bot can't identify username#discriminator --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 6637105f..6b4e715f 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -409,7 +409,7 @@ namespace NadekoBot.Modules.Administration { try { - var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** 🆔 `{usr.Id}` #⃣ `{channel.Name}` + var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** 🆔 `{msg.Author.Id}` #⃣ `{channel.Name}` 🗑 {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}📎 {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; From 8fda7ad06a72b135f04ee2bc9ff8f4ac2711c742 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 15:55:42 +0530 Subject: [PATCH 32/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 6b4e715f..60e1d4ce 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Administration 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 Roles Removed** 🆔 {before.Id}\n⚔➖{string.Join(", ", diffRoles)}"; } } else From 91764ceee8b6c4b87cd6c444607a0f2f0b3bc028 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 16:00:14 +0530 Subject: [PATCH 33/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 60e1d4ce..42c2b944 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Administration else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "`" + r.Name + "`"); - str += $"👤`{before.ToString()}` **User's Roles Removed** 🆔 {before.Id}\n⚔➖{string.Join(", ", diffRoles)}"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔➖{string.Join(", ", diffRoles)}"; } } else From 6467226fa63e1002a10fe12183652e55a36ebcba Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 16:04:04 +0530 Subject: [PATCH 34/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 42c2b944..cbb4ee08 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Administration else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "`" + r.Name + "`"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔➖{string.Join(", ", diffRoles)}"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔➖ **No Longer has {string.Join(", ", diffRoles)} role**"; } } else From 23bfcb55d81f538242aa80dbd04645035d12bae6 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 16:28:25 +0530 Subject: [PATCH 35/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index cbb4ee08..293a2def 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Administration else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "`" + r.Name + "`"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔➖ **No Longer has {string.Join(", ", diffRoles)} role**"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)}, **Remaining:** `{string.Join(", ", user.Roles.Select(r => r.Name)).SanitizeMentions()}`"; } } else From 9491d7d5e04e68ee648e33642ddd158d0b6fdd7c Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 16:32:04 +0530 Subject: [PATCH 36/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 293a2def..65c6d669 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Administration else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "`" + r.Name + "`"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)}, **Remaining:** `{string.Join(", ", user.Roles.Select(r => r.Name)).SanitizeMentions()}`"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)}, **Remaining:** `{string.Join(", ", before.Roles.Select(r => r.Name)).SanitizeMentions()}`"; } } else From 0d3c61628402181d1c7fa3d3587a7ed0622d5c31 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 16:36:26 +0530 Subject: [PATCH 37/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 65c6d669..09c774c6 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -143,7 +143,7 @@ namespace NadekoBot.Modules.Administration else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "`" + r.Name + "`"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)}, **Remaining:** `{string.Join(", ", before.Roles.Select(r => r.Name)).SanitizeMentions()}`"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)}, **Remaining:** `{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`"; } } else From 815aa7459e16ed0190f2122089bcb2f17d73acab Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 16:49:09 +0530 Subject: [PATCH 38/54] Update LogCommand.cs --- .../Modules/Administration/Commands/LogCommand.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 09c774c6..fbadc3b5 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -137,13 +137,14 @@ namespace NadekoBot.Modules.Administration { if (before.Roles.Count() < after.Roles.Count()) { - 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."; + 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⚔⏫ {string.Join(", ", diffRoles)} `Now has:` **{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}** `role(s).`"; } else if (before.Roles.Count() > after.Roles.Count()) { - var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "`" + r.Name + "`"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)}, **Remaining:** `{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`"; + var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "**" + r.Name + "**"); + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)} `Now has:` **{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}** `role(s).`"; } } else From 2ef1289fb172bae31dd5a151d4f040a612bc4d75 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 16:56:41 +0530 Subject: [PATCH 39/54] Update LogCommand.cs --- 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 fbadc3b5..47732508 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -139,12 +139,12 @@ 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⚔⏫ {string.Join(", ", diffRoles)} `Now has:` **{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}** `role(s).`"; + str += $"👤`{before.ToString()}` **User's Role Added** 🆔 `{before.Id}`\n⚔⏫ {string.Join(", ", diffRoles)} `Now has:` *{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}* `role(s)`"; } else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "**" + r.Name + "**"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)} `Now has:` **{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}** `role(s).`"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)} `Now has:` *{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}* `role(s)`"; } } else From 2ff403702ee27835efed06bbc392e03e94555184 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 17:04:55 +0530 Subject: [PATCH 40/54] Update LogCommand.cs --- 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 47732508..5765ee28 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -139,12 +139,12 @@ 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⚔⏫ {string.Join(", ", diffRoles)} `Now has:` *{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}* `role(s)`"; + str += $"👤`{before.ToString()}` **User's Role Added** 🆔 `{before.Id}`\n⚔⏫ {string.Join(", ", diffRoles)} **`Now has: {string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()} role(s)`**"; } else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "**" + r.Name + "**"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)} `Now has:` *{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}* `role(s)`"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)} **`Now has: {string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()} role(s)`**"; } } else From 828a2c98cab3218e3edf88b7ff21e60b54708faf Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 17:13:52 +0530 Subject: [PATCH 41/54] Update LogCommand.cs --- 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 5765ee28..d0a72328 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -139,12 +139,12 @@ 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⚔⏫ {string.Join(", ", diffRoles)} **`Now has: {string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()} role(s)`**"; + str += $"👤`{before.ToString()}` **User's Role Added** 🆔 `{before.Id}`\n⚔⏫ {string.Join(", ", diffRoles)}\n☑️`Now has:` **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** `role(s)`"; } else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "**" + r.Name + "**"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)} **`Now has: {string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()} role(s)`**"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)}\n☑️`Now has:` **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** `role(s)`"; } } else From b123fcf37a3d55c20f155e424dffe7d5da99b82e Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 17:23:38 +0530 Subject: [PATCH 42/54] Update LogCommand.cs --- 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 d0a72328..dac9e5fe 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -139,12 +139,12 @@ 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⚔⏫ {string.Join(", ", diffRoles)}\n☑️`Now has:` **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** `role(s)`"; + str += $"👤`{before.ToString()}` **User's Role Added** 🆔 `{before.Id}`\n⏫ {string.Join(", ", diffRoles)} ⚔Now has: **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** role(s)"; } else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "**" + r.Name + "**"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⚔⏬ {string.Join(", ", diffRoles)}\n☑️`Now has:` **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** `role(s)`"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⏬ {string.Join(", ", diffRoles)} ⚔Now has: **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** role(s)"; } } else From c51bd7f36262c4a6b1020eb638d442ea140ab556 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 17:28:33 +0530 Subject: [PATCH 43/54] Update LogCommand.cs --- 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 dac9e5fe..14739fc1 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -139,12 +139,12 @@ 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⏫ {string.Join(", ", diffRoles)} ⚔Now has: **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** role(s)"; + str += $"👤`{before.ToString()}` **User's Role Added** 🆔 `{before.Id}`\n🆙 {string.Join(", ", diffRoles)} Now has: **`{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 += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n⏬ {string.Join(", ", diffRoles)} ⚔Now has: **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** role(s)"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n🚮 {string.Join(", ", diffRoles)} Now has: **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; } } else From a716328b5a559cd15da2811e72a4e46540a9e65f Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 17:35:38 +0530 Subject: [PATCH 44/54] Update LogCommand.cs --- 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 14739fc1..207b25fb 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -139,12 +139,12 @@ 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🆙 {string.Join(", ", diffRoles)} Now has: **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; + str += $"👤`{before.ToString()}` **User's Role Added** 🆔 `{before.Id}`\n✅ {string.Join(", ", diffRoles)} ⚔ **`{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 += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n🚮 {string.Join(", ", diffRoles)} Now has: **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; + str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n🚮 {string.Join(", ", diffRoles)} ⚔ **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; } } else From caddd7109f60f745e6653fa0aa37c20015c3568c Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 17:57:54 +0530 Subject: [PATCH 45/54] Update LogCommand.cs --- 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 207b25fb..2c657bd2 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -139,12 +139,12 @@ 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✅ {string.Join(", ", diffRoles)} ⚔ **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; + 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()}`** ⚔"; } else if (before.Roles.Count() > after.Roles.Count()) { var diffRoles = before.Roles.Where(r => !after.Roles.Contains(r)).Select(r => "**" + r.Name + "**"); - str += $"👤`{before.ToString()}` **User's Role Removed** 🆔 `{before.Id}`\n🚮 {string.Join(", ", diffRoles)} ⚔ **`{string.Join(", ", after.Roles.Select(r => r.Name)).SanitizeMentions()}`** ⚔"; + 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()}`** ⚔"; } } else From 6c1e467653ecfe96a80006f2a7c06f2e31cabe7c Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 19:50:12 +0530 Subject: [PATCH 46/54] Update LogCommand.cs --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 2c657bd2..b881d934 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -128,7 +128,7 @@ namespace NadekoBot.Modules.Administration { string str = $"🕔`{prettyCurrentTime}`"; if (before.Username != after.Username) - str += $"**Name Changed**👤`{before.Username}#{before.Discriminator}`\n\t\t`New:`{after.ToString()}`"; + str += $"👤__**{before.Username}#{before.Discriminator}**__ **| Name Changed |**\n\t\t`New:`**{after.Username}#{before.Discriminator}**"; else if (before.Nickname != after.Nickname) str += $"**Nickname Changed**👤`{before.Username}#{before.Discriminator}`\n\t\t`Old:` {before.Nickname}#{before.Discriminator}\n\t\t`New:` {after.Nickname}#{after.Discriminator}"; else if (before.AvatarUrl != after.AvatarUrl) From 1b88253ce08365e836784a2fdbdf5195a75f7492 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 21:47:57 +0530 Subject: [PATCH 47/54] done (almost done) --- .../Administration/Commands/LogCommand.cs | 73 +++++++++++-------- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index b881d934..edc1385d 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -97,16 +97,20 @@ namespace NadekoBot.Modules.Administration if (action == PunishmentAction.Mute) { punishment = "🔇 MUTED"; + //punishment = "MUTED"; } else if (action == PunishmentAction.Kick) { punishment = "☣ SOFT-BANNED (KICKED)"; + //punishment = "KICKED"; } else if (action == PunishmentAction.Ban) { punishment = "⛔️ BANNED"; + //punishment = "BANNED"; } await logChannel.SendMessageAsync(String.Join("\n",users.Select(user=>$"‼️ {Format.Bold(user.ToString())} got **{punishment}** due to __**{protection}**__ protection on **{user.Guild.Name}** server."))) + //await logChannel.SendMessageAsync(String.Join("\n",users.Select(user=>$"{Format.Bold(user.ToString())} was **{punishment}** due to `{protection}` protection on **{user.Guild.Name}** server."))) .ConfigureAwait(false); } @@ -128,11 +132,14 @@ namespace NadekoBot.Modules.Administration { string str = $"🕔`{prettyCurrentTime}`"; if (before.Username != after.Username) - str += $"👤__**{before.Username}#{before.Discriminator}**__ **| Name Changed |**\n\t\t`New:`**{after.Username}#{before.Discriminator}**"; + //str += $"**Name Changed**`{before.Username}#{before.Discriminator}`\n\t\t`New:`{after.ToString()}`"; + str += $"👤__**{before.Username}#{before.Discriminator}**__ **| Name Changed |** 🆔 `{before.Id}`\n\t\t`New:` **{after.ToString()}**"; else if (before.Nickname != after.Nickname) - str += $"**Nickname Changed**👤`{before.Username}#{before.Discriminator}`\n\t\t`Old:` {before.Nickname}#{before.Discriminator}\n\t\t`New:` {after.Nickname}#{after.Discriminator}"; + str += $"👤__**{before.Username}#{before.Discriminator}**__ **| Nickname Changed |** 🆔 `{before.Id}`\n\t\t`Old:` **{before.Nickname}#{before.Discriminator}**\n\t\t`New:` **{after.Nickname}#{after.Discriminator}**"; + //str += $"**Nickname Changed**`{before.Username}#{before.Discriminator}`\n\t\t`Old:` {before.Nickname}#{before.Discriminator}\n\t\t`New:` {after.Nickname}#{after.Discriminator}"; else if (before.AvatarUrl != after.AvatarUrl) - str += $"**Avatar Changed**👤`{before.Username}#{before.Discriminator}`\n\t {await _google.ShortenUrl(before.AvatarUrl)} `=>` {await _google.ShortenUrl(after.AvatarUrl)}"; + //str += $"**Avatar Changed**👤`{before.Username}#{before.Discriminator}`\n\t {await _google.ShortenUrl(before.AvatarUrl)} `=>` {await _google.ShortenUrl(after.AvatarUrl)}"; + str += $"👤__**{before.Username}#{before.Discriminator}**__ **| Avatar Changed |** 🆔 `{before.Id}`\n\t🖼 {await _google.ShortenUrl(before.AvatarUrl)} `=>` {await _google.ShortenUrl(after.AvatarUrl)}"; else if (!before.Roles.SequenceEqual(after.Roles)) { if (before.Roles.Count() < after.Roles.Count()) @@ -144,6 +151,7 @@ namespace NadekoBot.Modules.Administration 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()}`** ⚔"; } } @@ -180,13 +188,15 @@ namespace NadekoBot.Modules.Administration try { if (before.Name != after.Name) - await logChannel.SendMessageAsync($@"`{prettyCurrentTime}` **Channel Name Changed** `#{after.Name}` ({after.Id}) + //await logChannel.SendMessageAsync($@"`{prettyCurrentTime}` **Channel Name Changed** `#{after.Name}` ({after.Id}) + await logChannel.SendMessageAsync($@"🕓`{prettyCurrentTime}`ℹ️ **| Channel Name Changed |** #⃣ `{after.Name} ({after.Id})` `Old:` {before.Name} - `New:` {after.Name}").ConfigureAwait(false); + **`New:` {after.Name}**").ConfigureAwait(false); else if ((before as ITextChannel).Topic != (after as ITextChannel).Topic) - await logChannel.SendMessageAsync($@"`{prettyCurrentTime}` **Channel Topic Changed** `#{after.Name}` ({after.Id}) + //await logChannel.SendMessageAsync($@"`{prettyCurrentTime}` **Channel Topic Changed** `#{after.Name}` ({after.Id}) + await logChannel.SendMessageAsync($@"🕘`{prettyCurrentTime}`ℹ️ **| Channel Topic Changed |** #⃣ `{after.Name} ({after.Id})` `Old:` {((ITextChannel)before).Topic} - `New:` {((ITextChannel)after).Topic}").ConfigureAwait(false); + **`New:` {((ITextChannel)after).Topic}**").ConfigureAwait(false); } catch { } }); @@ -213,7 +223,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"❗`{prettyCurrentTime}` `{(ch is IVoiceChannel ? "Voice" : "Text")} Channel Deleted:` **#{ch.Name}** ({ch.Id})").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"🕕`{prettyCurrentTime}`🗑 **| {(ch is IVoiceChannel ? "Voice" : "Text")} Channel Deleted #⃣ {ch.Name}** `({ch.Id})`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -237,7 +247,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"`{prettyCurrentTime}`🆕`{(ch is IVoiceChannel ? "Voice" : "Text")} Channel Created:` **#{ch.Name}** ({ch.Id})").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"🕓`{prettyCurrentTime}`🆕 **| {(ch is IVoiceChannel ? "Voice" : "Text")} Channel Created: #⃣ {ch.Name}** `({ch.Id})`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -267,15 +277,15 @@ namespace NadekoBot.Modules.Administration string str = null; if (beforeVch?.Guild == afterVch?.Guild) { - str = $"🎼`{prettyCurrentTime}` {usr.Username} moved from **{beforeVch.Name}** to **{afterVch.Name}** voice channel."; + str = $"🎙`{prettyCurrentTime}`👤__**{usr.Username}#{usr.Discriminator}**__ moved from **{beforeVch.Name}** to **{afterVch.Name}** voice channel."; } else if (beforeVch == null) { - str = $"🎼`{prettyCurrentTime}` {usr.Username} has joined **{afterVch.Name}** voice channel."; + str = $"🎙`{prettyCurrentTime}`👤__**{usr.Username}#{usr.Discriminator}**__ has joined **{afterVch.Name}** voice channel."; } else if (afterVch == null) { - str = $"🎼`{prettyCurrentTime}` {usr.Username} has left **{beforeVch.Name}** voice channel."; + str = $"🎙`{prettyCurrentTime}`👤__**{usr.Username}#{usr.Discriminator}**__ has left **{beforeVch.Name}** voice channel."; } if(str != null) UserPresenceUpdates.AddOrUpdate(logChannel, new List() { str }, (id, list) => { list.Add(str); return list; }); @@ -296,9 +306,9 @@ namespace NadekoBot.Modules.Administration return Task.CompletedTask; string str; if (before.Status != after.Status) - str = $"`{prettyCurrentTime}`**{usr.Username}** is now **{after.Status}**."; + str = $"🔵`{prettyCurrentTime}`👤__**{usr.Username}**__ is now **{after.Status}**."; else - str = $"`{prettyCurrentTime}`**{usr.Username}** is now playing **{after.Game}**."; + str = $"🔷`{prettyCurrentTime}`👤__**{usr.Username}**__ is now playing **{after.Game}**."; UserPresenceUpdates.AddOrUpdate(logChannel, new List() { str }, (id, list) => { list.Add(str); return list; }); @@ -319,7 +329,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"❗️🕛`{prettyCurrentTime}`👤`{usr.Username}#{usr.Discriminator}`❌ **USER LEFT** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"❗️🕛`{prettyCurrentTime}`👤__**{usr.Username}#{usr.Discriminator}**__❌ **| USER LEFT |** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -339,7 +349,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"❕🕓`{prettyCurrentTime}`👤`{usr.Username}#{usr.Discriminator}`✅ **USER JOINED** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"❕🕓`{prettyCurrentTime}`👤__**{usr.Username}#{usr.Discriminator}**__✅ **| USER JOINED |** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -359,7 +369,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"❕🕘`{prettyCurrentTime}`👤`{usr.Username}#{usr.Discriminator}`♻️ **USER UN-BANNED** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"❕🕘`{prettyCurrentTime}`👤__**{usr.Username}#{usr.Discriminator}**__♻️ **| USER UN-BANNED |** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -379,7 +389,7 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($"‼️🕕`{prettyCurrentTime}`👤`{usr.Username}#{usr.Discriminator}`🚫 **USER BANNED** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($"‼️🕕`{prettyCurrentTime}`👤__**{usr.Username}#{usr.Discriminator}**__🚫 **| USER BANNED |** 🆔 `{usr.Id}`").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -410,7 +420,7 @@ namespace NadekoBot.Modules.Administration { try { - var str = $@"🕔`{prettyCurrentTime}`👤`{msg.Author.Username}#{msg.Author.Discriminator}` **Deleted Message** 🆔 `{msg.Author.Id}` #⃣ `{channel.Name}` + var str = $@"🕔`{prettyCurrentTime}`👤__**{msg.Author.Username}#{msg.Author.Discriminator}**__ **| Deleted Message |** 🆔 `{msg.Author.Id}` #⃣ `{channel.Name}` 🗑 {msg.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator)}"; if (msg.Attachments.Any()) str += $"{Environment.NewLine}📎 {string.Join(", ", msg.Attachments.Select(a => a.ProxyUrl))}"; @@ -449,10 +459,11 @@ namespace NadekoBot.Modules.Administration var task = Task.Run(async () => { - try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}` **Message** 📝 `#{channel.Name}` -👤`{before.Author.Username}` - `Old:` {before.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()} - `New:` {after.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()}").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + //try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}` **Message** 📝 `#{channel.Name}` +//👤`{before.Author.Username}` + try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}`👤__**{msg.Author.Username}#{msg.Author.Discriminator}**__ **| Edited Message |** 🆔 `{msg.Author.Id}` #⃣ `{channel.Name}` + 📄`Old:` {before.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()} + 📝**`New:`** {after.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()}").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; @@ -551,9 +562,9 @@ namespace NadekoBot.Modules.Administration } if (logSetting.IsLogging) - await channel.SendMessageAsync("`Logging enabled.`").ConfigureAwait(false); + await channel.SendMessageAsync("✅ **Logging enabled.**").ConfigureAwait(false); else - await channel.SendMessageAsync("`Logging disabled.`").ConfigureAwait(false); + await channel.SendMessageAsync("ℹ️ **Logging disabled.**").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -580,9 +591,9 @@ namespace NadekoBot.Modules.Administration } if (removed == 0) - await channel.SendMessageAsync($"`Logging will now ignore {channel.Name} ({channel.Id}) channel.`").ConfigureAwait(false); + await channel.SendMessageAsync($"🆗 Logging will **now ignore** #⃣ `{channel.Name} ({channel.Id})`").ConfigureAwait(false); else - await channel.SendMessageAsync($"`Logging will no longer ignore {channel.Name} ({channel.Id}) channel.`").ConfigureAwait(false); + await channel.SendMessageAsync($"ℹ️ Logging will **no longer ignore** #⃣ `{channel.Name} ({channel.Id})`").ConfigureAwait(false); } //[LocalizedCommand, LocalizedRemarks, LocalizedSummary, LocalizedAlias] @@ -673,9 +684,9 @@ namespace NadekoBot.Modules.Administration } if (enabled) - await channel.SendMessageAsync($"`Logging user presence updates in {channel.Name} ({channel.Id}) channel.`").ConfigureAwait(false); + await channel.SendMessageAsync($"✅ Logging **user presence** updates in #⃣ `{channel.Name} ({channel.Id})`").ConfigureAwait(false); else - await channel.SendMessageAsync($"`Stopped logging user presence updates.`").ConfigureAwait(false); + await channel.SendMessageAsync($"ℹ️ Stopped logging **user presence** updates.").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -696,9 +707,9 @@ namespace NadekoBot.Modules.Administration } if (enabled) - await channel.SendMessageAsync($"`Logging voice presence updates in {channel.Name} ({channel.Id}) channel.`").ConfigureAwait(false); + await channel.SendMessageAsync($"✅ Logging **voice presence** updates in #⃣ `{channel.Name} ({channel.Id})`").ConfigureAwait(false); else - await channel.SendMessageAsync($"`Stopped logging voice presence updates.`").ConfigureAwait(false); + await channel.SendMessageAsync($"ℹ️ Stopped logging **voice presence** updates.").ConfigureAwait(false); } //[LocalizedCommand, LocalizedDescription, LocalizedSummary, LocalizedAlias] From 069d238136b5146613308e1a31d8a84c8a5f58df Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 22:03:33 +0530 Subject: [PATCH 48/54] done maybe --- src/NadekoBot/Modules/Administration/Commands/LogCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index edc1385d..0fed6657 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -461,7 +461,7 @@ namespace NadekoBot.Modules.Administration { //try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}` **Message** 📝 `#{channel.Name}` //👤`{before.Author.Username}` - try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}`👤__**{msg.Author.Username}#{msg.Author.Discriminator}**__ **| Edited Message |** 🆔 `{msg.Author.Id}` #⃣ `{channel.Name}` + try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}`👤__**{before.Author.Username}#{before.Author.Discriminator}**__ **| Edited Message |** 🆔 `{before.Author.Id}` #⃣ `{channel.Name}` 📄`Old:` {before.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()} 📝**`New:`** {after.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()}").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); From 6224e6f59e8289afc5c04e99cdfe8533e8b466f8 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 22:16:14 +0530 Subject: [PATCH 49/54] thats it --- .../Modules/Administration/Commands/LogCommand.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 0fed6657..08eebfe4 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -191,12 +191,12 @@ namespace NadekoBot.Modules.Administration //await logChannel.SendMessageAsync($@"`{prettyCurrentTime}` **Channel Name Changed** `#{after.Name}` ({after.Id}) await logChannel.SendMessageAsync($@"🕓`{prettyCurrentTime}`ℹ️ **| Channel Name Changed |** #⃣ `{after.Name} ({after.Id})` `Old:` {before.Name} - **`New:` {after.Name}**").ConfigureAwait(false); + **`New:`** {after.Name}").ConfigureAwait(false); else if ((before as ITextChannel).Topic != (after as ITextChannel).Topic) //await logChannel.SendMessageAsync($@"`{prettyCurrentTime}` **Channel Topic Changed** `#{after.Name}` ({after.Id}) await logChannel.SendMessageAsync($@"🕘`{prettyCurrentTime}`ℹ️ **| Channel Topic Changed |** #⃣ `{after.Name} ({after.Id})` `Old:` {((ITextChannel)before).Topic} - **`New:` {((ITextChannel)after).Topic}**").ConfigureAwait(false); + **`New:`** {((ITextChannel)after).Topic}").ConfigureAwait(false); } catch { } }); @@ -306,9 +306,9 @@ namespace NadekoBot.Modules.Administration return Task.CompletedTask; string str; if (before.Status != after.Status) - str = $"🔵`{prettyCurrentTime}`👤__**{usr.Username}**__ is now **{after.Status}**."; + str = $"⚪️`{prettyCurrentTime}`👤__**{usr.Username}**__ is now **{after.Status}**."; else - str = $"🔷`{prettyCurrentTime}`👤__**{usr.Username}**__ is now playing **{after.Game}**."; + str = $"◻️`{prettyCurrentTime}`👤__**{usr.Username}**__ is now playing **{after.Game}**."; UserPresenceUpdates.AddOrUpdate(logChannel, new List() { str }, (id, list) => { list.Add(str); return list; }); @@ -461,9 +461,9 @@ namespace NadekoBot.Modules.Administration { //try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}` **Message** 📝 `#{channel.Name}` //👤`{before.Author.Username}` - try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}`👤__**{before.Author.Username}#{before.Author.Discriminator}**__ **| Edited Message |** 🆔 `{before.Author.Id}` #⃣ `{channel.Name}` - 📄`Old:` {before.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()} - 📝**`New:`** {after.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()}").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } + try { await logChannel.SendMessageAsync($@"🕔`{prettyCurrentTime}`👤__**{before.Author.Username}#{before.Author.Discriminator}**__ **| 📝 Edited Message |** 🆔 `{before.Author.Id}` #⃣ `{channel.Name}` + `Old:` {before.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()} + **`New:`** {after.Resolve(userHandling: UserMentionHandling.NameAndDiscriminator).SanitizeMentions()}").ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); } }); return Task.CompletedTask; From 3a046bbd2c7d63f2e9fce0dd95ba050989d15cd8 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 23 Nov 2016 22:26:23 +0530 Subject: [PATCH 50/54] done --- 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 08eebfe4..42faf111 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -306,9 +306,9 @@ namespace NadekoBot.Modules.Administration return Task.CompletedTask; string str; if (before.Status != after.Status) - str = $"⚪️`{prettyCurrentTime}`👤__**{usr.Username}**__ is now **{after.Status}**."; + str = $"🔵`{prettyCurrentTime}`👤__**{usr.Username}**__ is now **{after.Status}**."; else - str = $"◻️`{prettyCurrentTime}`👤__**{usr.Username}**__ is now playing **{after.Game}**."; + str = $"👾`{prettyCurrentTime}`👤__**{usr.Username}**__ is now playing **{after.Game}**."; UserPresenceUpdates.AddOrUpdate(logChannel, new List() { str }, (id, list) => { list.Add(str); return list; }); From e11a3e30518635960256b7ad8ec0c2736b95d5dc Mon Sep 17 00:00:00 2001 From: samvaio Date: Thu, 24 Nov 2016 03:34:50 +0530 Subject: [PATCH 51/54] Update Utility.cs - removed a white space from list servers --- src/NadekoBot/Modules/Utility/Utility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Utility.cs b/src/NadekoBot/Modules/Utility/Utility.cs index 17885f24..3e191577 100644 --- a/src/NadekoBot/Modules/Utility/Utility.cs +++ b/src/NadekoBot/Modules/Utility/Utility.cs @@ -193,7 +193,7 @@ namespace NadekoBot.Modules.Utility return; } - 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); + await channel.SendMessageAsync(String.Join("\n", guilds.Select(g => $"```css\nName: {g.Name} ID:{g.Id} Members:#{g.GetUsers().Count} OwnerID: {g.OwnerId} ```"))).ConfigureAwait(false); } //[NadekoCommand, Usage, Description, Aliases] From b02da6f23c85a2258f9ded78b0110aa686481a76 Mon Sep 17 00:00:00 2001 From: samvaio Date: Fri, 25 Nov 2016 07:46:40 +0530 Subject: [PATCH 52/54] More Info and gifs - Updated infos - Added advance guide - Added gifs --- docs/guides/Linux Guide.md | 87 +++++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 15 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 00be496e..165b15bf 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -6,6 +6,8 @@ If you want Nadeko to play music for you 24/7 without having to hosting it on yo ####Setting up NadekoBot Assuming you have followed the link above to setup an account and Droplet with 64bit OS in Digital Ocean and got the `IP address and root password (in email)` to login, its time to get started. +**Go through this whole guide before setting up Nadeko** + #### Prerequisites - Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) - Download [CyberDuck](https://cyberduck.io) or [WinSCP](https://winscp.net/eng/download.php) @@ -24,12 +26,16 @@ If you entered your Droplets IP address correctly, it should show **login as:** ####Installing Git +![img1](https://cdn.discordapp.com/attachments/251504306010849280/251504416019054592/git.gif) + `sudo apt-get install git -y` **NOTE:** If the command is not being initiated, hit **Enter** ####Installing .NET Core SDK +![img2](https://cdn.discordapp.com/attachments/251504306010849280/251504746987388938/dotnet.gif) + Go to [this link](https://www.microsoft.com/net/core#ubuntu) provided by microsoft for instructions on how to get the most up to date version of the dotnet core sdk! Make sure that you're on the correct page for your distribution of linux as the guides are different for the various distributions @@ -41,24 +47,18 @@ sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 sudo apt-get update && sudo apt-get install dotnet-dev-1.0.0-preview2-003131 -y ``` -**NOTE:** - -.NET CORE SDK only supports 64-bit Linux Operating Systems (Raspberry Pis are not supported because of this) - -If you are running Ubuntu 16.10, follow these instructions before installing .NET Core: - -- Go to [Download Page for libicu55_55.1-7_amd64.deb](http://packages.ubuntu.com/en/xenial/amd64/libicu55/download) -- Copy the link with a download option closest to you -- `wget ` (make sure it is downloaded) *e.g.* `wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb` -- Install with: `dpkg –i libicu55_55.1-7_amd64.deb` -- Now go back and install the .NET Core +**NOTE:** .NET CORE SDK only supports 64-bit Linux Operating Systems (Raspberry Pis are not supported because of this) ####Installing Opus Voice Codec and libsodium +![img3](https://cdn.discordapp.com/attachments/251504306010849280/251505294654308353/libopus.gif) + `sudo apt-get install libopus0 opus-tools libopus-dev libsodium-dev -y` ####Installing FFMPEG +![img4](https://cdn.discordapp.com/attachments/251504306010849280/251505443111829505/ffmpeg.gif) + `apt-get install ffmpeg -y` **NOTE:** If you are running **UBUNTU 14.04**, you must run these first: @@ -86,13 +86,17 @@ sudo apt-get update && sudo apt-get install ffmpeg -y ####Installing TMUX +![img5](https://cdn.discordapp.com/attachments/251504306010849280/251505519758409728/tmux.gif) + `sudo apt-get install tmux -y` ####Getting NadekoBot +![img6](https://cdn.discordapp.com/attachments/251504306010849280/251505587089571850/getting_nadeko.gif) + `cd ~ && curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh` -####Setting up and Inviting bot +####Creating and Inviting bot - Read here how to [create a DiscordBot application](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#creating-discordbot-application) - [Visual Invite Guide](http://discord.kongslien.net/guide.html) *NOTE: Client ID is your Bot ID* @@ -102,7 +106,24 @@ sudo apt-get update && sudo apt-get install ffmpeg -y - Go to the newly created link and pick the server we created, and click `Authorize`. - The bot should have been added to your server. -####Setting up NadekoBot +####Guide for Advance Users + +**Skip this step if you are a Regular User or New to Linux.** + +[![img7][img7]](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#getting-nadekobot) + +- Right after [Getting NadekoBot](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#getting-nadekobot) +- `cd NadekoBot/src/NadekoBot/` (go to this folder) +- `pico credentials.json` (open credentials.json to edit) +- Insert your bot's **Client ID, Bot ID** (should be same as your Client ID) **and Token** if you got it following [Creating and Inviting bot](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#creating-and-inviting-bot). +- Insert your own ID in Owners ID follow: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#setting-up-credentialsjson-file) +- And Google API from [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/1.0/guides/Windows%20Guide/#setting-up-nadekobot-for-music) +- Once done, press `CTRL+X` +- It will ask for "Save Modified Buffer?", press `Y` for yes +- It will then ask "File Name to Write" (rename), just hit `Enter` and Done. +- You can now move to [Running NadekoBot](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#running-nadekobot) + +####Setting up SFTP - Open **CyberDuck** - Click on **Open Connection** (top-left corner), a new window should appear. @@ -131,30 +152,65 @@ Once done, go back to **PuTTY** ####Running NadekoBot +![img8](https://cdn.discordapp.com/attachments/251504306010849280/251506149973557259/running_nadeko.gif) + +**Create a new Session:** + - `tmux new -s nadeko` That command will create a new session named **nadeko** *(you can replace “nadeko” with anything you prefer and remember its your session name)* so you can run the bot in background without having to keep running the PuTTY. - `cd NadekoBot/src/NadekoBot/` + +**Without Auto Restart:** + - `dotnet run --configuration Release` +**With Auto Restart:** + +- `while :; do dotnet run -c Release; sleep 5s; done` + +**NOTE:** With Auto Restart, bot will auto run if you use `.die` [command](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/#administration) so you do not have to manual restart if you ever want to. +See how that happens below: + +![img9](https://cdn.discordapp.com/attachments/251504306010849280/251506312893038592/die_explaination.gif) + **Now check your Discord, the bot should be online** Now time to **move the bot to background** and to do that, press **CTRL+B+D** (this will detach the nadeko session using TMUX), and you can finally close PuTTY now. ####Some more Info (just in case) +**Info about tmux:** + - If you want to **see the sessions** after logging back again, type `tmux ls`, and that will give you the list of sessions running. - If you want to **switch to/ see that session**, type `tmux a -t nadeko` (**nadeko** is the name of the session we created before so, replace **“nadeko”** with the session name you created.) - If you want to **kill** NadekoBot **session**, type `tmux kill-session -t nadeko` -####Restarting Nadeko with the Server +**If you are running Ubuntu 16.10, and having trouble installing .NET Core:** + +- Go to [Download Page for libicu55_55.1-7_amd64.deb](http://packages.ubuntu.com/en/xenial/amd64/libicu55/download) +- Copy the link with a download option closest to you +- `wget ` *e.g.* `wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb` (make sure it is downloaded) +- Install with: `dpkg –i libicu55_55.1-7_amd64.deb` +- Now go back and install the .NET Core + +####Restarting Nadeko + +**Restarting Nadeko with the Server:** + Open **PuTTY** and login as you have before, type `reboot` and hit Enter. +**Restarting Manually:** + +- Kill your previous session, check with `tmux ls` +- `tmux kill-session -t nadeko` (don't forget to replace "nadeko" to what ever you named your bot's session) +- Follow: [Running NadekoBot](http://nadekobot.readthedocs.io/en/1.0/guides/Linux%20Guide/#running-nadekobot) + ####Updating Nadeko -- Make sure the bot is **not** running - Connect to the terminal +- Make sure the bot is **not** running. - `cd ~ && curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh` (The same command used to install earlier) - Run the bot again as normal. @@ -173,3 +229,4 @@ cd ~/NadekoBot/discord.net/src/Discord.Net && dotnet restore && cd ../Discord.Ne cd ~/NadekoBot/discord.net && dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json && dotnet restore cd ~/NadekoBot/src/NadekoBot/ && dotnet restore && dotnet build --configuration Release ``` +[img7]: https://cdn.discordapp.com/attachments/251504306010849280/251505766370902016/setting_up_credentials.gif From 04d309c0c22c2086c101e583031449359dbc9e81 Mon Sep 17 00:00:00 2001 From: samvaio Date: Fri, 25 Nov 2016 07:51:10 +0530 Subject: [PATCH 53/54] Added Info and gifs - added info - changed .Net core - added advance users guide - added gifs --- docs/guides/Linux Guide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index 165b15bf..cf15dedc 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -39,12 +39,12 @@ If you entered your Droplets IP address correctly, it should show **login as:** Go to [this link](https://www.microsoft.com/net/core#ubuntu) provided by microsoft for instructions on how to get the most up to date version of the dotnet core sdk! Make sure that you're on the correct page for your distribution of linux as the guides are different for the various distributions -We'll go over the steps here for Ubuntu 16.04 anyway (these will **only** work on Ubuntu 16.04), accurate as of 16/10/2016 +We'll go over the steps here for Ubuntu 16.04 anyway (these will **only** work on Ubuntu 16.04), accurate as of 25/11/2016 ``` sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' -sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 -sudo apt-get update && sudo apt-get install dotnet-dev-1.0.0-preview2-003131 -y +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 +sudo apt-get update ``` **NOTE:** .NET CORE SDK only supports 64-bit Linux Operating Systems (Raspberry Pis are not supported because of this) From 43b5d0695aa5b47faa0e12be9403b0df3fed8885 Mon Sep 17 00:00:00 2001 From: samvaio Date: Fri, 25 Nov 2016 07:53:24 +0530 Subject: [PATCH 54/54] Update Linux Guide.md added the dot net installer (updated) --- docs/guides/Linux Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/Linux Guide.md b/docs/guides/Linux Guide.md index cf15dedc..8874c3d3 100644 --- a/docs/guides/Linux Guide.md +++ b/docs/guides/Linux Guide.md @@ -44,7 +44,7 @@ We'll go over the steps here for Ubuntu 16.04 anyway (these will **only** work o ``` sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 -sudo apt-get update +sudo apt-get update && sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177 -y ``` **NOTE:** .NET CORE SDK only supports 64-bit Linux Operating Systems (Raspberry Pis are not supported because of this)