From 7ee8dee3eeb24d31e0005bbd41356043ac9fe8f2 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 21 Nov 2016 19:25:38 +0530 Subject: [PATCH 01/68] added emojis to quotes --- .../Modules/Utility/Commands/QuoteCommands.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 36e31eb0..670968fb 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -31,10 +31,10 @@ namespace NadekoBot.Modules.Utility } if (quotes.Any()) - await channel.SendMessageAsync($"`Page {page + 1} of quotes:`\n```xl\n" + String.Join("\n", quotes.Select((q) => $"{q.Keyword,-20} by {q.AuthorName}")) + "\n```") + await channel.SendMessageAsync($"๐Ÿ’ฌ **Page {page + 1}** of **quotes:**\n```xl\n" + String.Join("\n", quotes.Select((q) => $"{q.Keyword,-20} by {q.AuthorName}")) + "\n```") .ConfigureAwait(false); else - await channel.SendMessageAsync("`No quotes on this page.`").ConfigureAwait(false); + await channel.SendMessageAsync("โ„น๏ธ **No quotes** on this page.").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -57,7 +57,7 @@ namespace NadekoBot.Modules.Utility if (quote == null) return; - await channel.SendMessageAsync("๐Ÿ“ฃ " + quote.Text.SanitizeMentions()); + await channel.SendMessageAsync("๐Ÿ–Š " + quote.Text.SanitizeMentions()); } [NadekoCommand, Usage, Description, Aliases] @@ -83,7 +83,7 @@ namespace NadekoBot.Modules.Utility }); await uow.CompleteAsync().ConfigureAwait(false); } - await channel.SendMessageAsync("`Quote added.`").ConfigureAwait(false); + await channel.SendMessageAsync("โœ… **Quote added.**").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -105,7 +105,7 @@ namespace NadekoBot.Modules.Utility if (qs==null || !qs.Any()) { - response = "`No quotes found.`"; + response = "โ„น๏ธ **No quotes found.**"; return; } @@ -113,7 +113,7 @@ namespace NadekoBot.Modules.Utility uow.Quotes.Remove(q); await uow.CompleteAsync().ConfigureAwait(false); - response = "`Deleted a random quote`"; + response = "๐Ÿ—‘ **Deleted a random quote.**"; } await channel.SendMessageAsync(response); } @@ -139,7 +139,7 @@ namespace NadekoBot.Modules.Utility await uow.CompleteAsync(); } - await channel.SendMessageAsync($"`Deleted all quotes with '{keyword}' keyword`"); + await channel.SendMessageAsync($"๐Ÿ—‘ **Deleted all quotes** with **{keyword}** keyword."); } } } From 58ab9ad5819dc713c8e1cf64a9dfbe293c4d5af8 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 21 Nov 2016 19:47:29 +0530 Subject: [PATCH 02/68] added emojis to totube --- src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs b/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs index dbceb1a2..4f7ffd2f 100644 --- a/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs @@ -25,7 +25,7 @@ namespace NadekoBot.Modules.Utility target = res.RequestMessage.RequestUri; } - await channel.SendMessageAsync($"{imsg.Author.Mention}, `Here is the link:` {target}") + await channel.SendMessageAsync($"๐ŸŽž {imsg.Author.Mention}, **Your new video room created. Join and invite to watch videos together with friends:** {target}") .ConfigureAwait(false); } From 33b9681ba7965acf3e42fc8d1f702bea271af801 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 21 Nov 2016 20:14:31 +0530 Subject: [PATCH 03/68] added emojis nothing much changed --- src/NadekoBot/Modules/Utility/Commands/Remind.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index 172282f1..391e9109 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -124,7 +124,7 @@ namespace NadekoBot.Modules.Utility if (ch == null) { - await channel.SendMessageAsync($"{umsg.Author.Mention} Something went wrong (channel cannot be found) ;(").ConfigureAwait(false); + await channel.SendMessageAsync($"โš ๏ธ {umsg.Author.Mention} Something went wrong (channel cannot be found) ;(").ConfigureAwait(false); return; } @@ -132,7 +132,7 @@ namespace NadekoBot.Modules.Utility if (m.Length == 0) { - await channel.SendMessageAsync("Not a valid time format blablabla").ConfigureAwait(false); + await channel.SendMessageAsync("โŽ **Not a valid time format.** type `-h .remind`").ConfigureAwait(false); return; } @@ -157,7 +157,7 @@ namespace NadekoBot.Modules.Utility (groupName == "hours" && value > 23) || (groupName == "minutes" && value > 59)) { - await channel.SendMessageAsync($"Invalid {groupName} value.").ConfigureAwait(false); + await channel.SendMessageAsync($"โš ๏ธ Invalid {groupName} value.").ConfigureAwait(false); return; } else @@ -187,7 +187,7 @@ namespace NadekoBot.Modules.Utility await uow.CompleteAsync(); } - try { await channel.SendMessageAsync($"โฐ I will remind \"{(ch is ITextChannel ? ((ITextChannel)ch).Name : umsg.Author.Username)}\" to \"{message.SanitizeMentions()}\" in {output}. ({time:d.M.yyyy.} at {time:HH:mm})").ConfigureAwait(false); } catch { } + try { await channel.SendMessageAsync($"โฐ I will remind **\"{(ch is ITextChannel ? ((ITextChannel)ch).Name : umsg.Author.Username)}\"** to **\"{message.SanitizeMentions()}\"** in **{output}** `({time:d.M.yyyy.} at {time:HH:mm})`").ConfigureAwait(false); } catch { } await StartReminder(rem); } @@ -206,8 +206,8 @@ namespace NadekoBot.Modules.Utility uow.BotConfig.GetOrCreate().RemindMessageFormat = arg.Trim(); await uow.CompleteAsync().ConfigureAwait(false); } - await channel.SendMessageAsync("`New remind template set.`"); + await channel.SendMessageAsync("๐Ÿ†— New remind template set."); } } } -} \ No newline at end of file +} From 29adf7213aba3f0a15135681f0821c2cb8169456 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 21 Nov 2016 21:16:18 +0530 Subject: [PATCH 04/68] changed brightness emoji to temperature for weather only. nothing else is changed --- src/NadekoBot/Modules/Searches/Searches.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index 70ac29b6..b460d08a 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -47,7 +47,7 @@ namespace NadekoBot.Modules.Searches $@"๐ŸŒ **Weather for** ใ€{obj["target"]}ใ€‘ ๐Ÿ“ **Lat,Long:** ({obj["latitude"]}, {obj["longitude"]}) โ˜ **Condition:** {obj["condition"]} ๐Ÿ˜“ **Humidity:** {obj["humidity"]}% ๐Ÿ’จ **Wind Speed:** {obj["windspeedk"]}km/h / {obj["windspeedm"]}mph -๐Ÿ”† **Temperature:** {obj["centigrade"]}ยฐC / {obj["fahrenheit"]}ยฐF ๐Ÿ”† **Feels like:** {obj["feelscentigrade"]}ยฐC / {obj["feelsfahrenheit"]}ยฐF +๐ŸŒก **Temperature:** {obj["centigrade"]}ยฐC / {obj["fahrenheit"]}ยฐF ๐Ÿ”† **Feels like:** {obj["feelscentigrade"]}ยฐC / {obj["feelsfahrenheit"]}ยฐF ๐ŸŒ„ **Sunrise:** {obj["sunrise"]} ๐ŸŒ‡ **Sunset:** {obj["sunset"]}").ConfigureAwait(false); } @@ -762,4 +762,4 @@ ELO: [{playerELO.ToString()}] return false; } } -} \ No newline at end of file +} From 8569d6bd8e95c10aeeb82368f32f3fb7d62ab26b Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 21 Nov 2016 21:53:17 +0530 Subject: [PATCH 05/68] emoji added to osu profile link --- src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs b/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs index 9f78461a..f31e8eea 100644 --- a/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs @@ -48,7 +48,7 @@ namespace NadekoBot.Modules.Searches MemoryStream ms = new MemoryStream(); res.CopyTo(ms); ms.Position = 0; - await channel.SendFileAsync(ms, $"{usr}.png", $"`Profile Link:`https://osu.ppy.sh/u/{Uri.EscapeDataString(usr)}\n`Image provided by https://lemmmy.pw/osusig`").ConfigureAwait(false); + await channel.SendFileAsync(ms, $"{usr}.png", $"๐ŸŽง **Profile Link:**https://osu.ppy.sh/u/{Uri.EscapeDataString(usr)}\n`Image provided by https://lemmmy.pw/osusig`").ConfigureAwait(false); } catch (Exception ex) { @@ -273,4 +273,4 @@ namespace NadekoBot.Modules.Searches (mods & (1 << pos)) != 0; } } -} \ No newline at end of file +} From 1552c16707651ceb97a1919b71024073f67c02f0 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 21 Nov 2016 22:12:55 +0530 Subject: [PATCH 06/68] added raffle ticket - added raffle ticket emoji. - made raffle look nice. --- src/NadekoBot/Modules/Gambling/Gambling.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 12626123..9227a09e 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -42,7 +42,7 @@ namespace NadekoBot.Modules.Gambling var members = role.Members().Where(u => u.Status != UserStatus.Offline && u.Status != UserStatus.Unknown); var membersArray = members as IUser[] ?? members.ToArray(); var usr = membersArray[new NadekoRandom().Next(0, membersArray.Length)]; - await channel.SendMessageAsync($"**Raffled user:** {usr.Username} (id: {usr.Id})").ConfigureAwait(false); + await channel.SendMessageAsync($"๐ŸŽŸ Raffled user: **{usr.Username}** ID: `{usr.Id}`").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] From 62d5ed58c692bcb20465f890c9aab226430cc152 Mon Sep 17 00:00:00 2001 From: samvaio Date: Mon, 21 Nov 2016 23:50:49 +0530 Subject: [PATCH 07/68] better repeat - emojis - time is now `highlighted` - text to repeat is now bold --- .../Modules/Administration/Commands/MessageRepeater.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs index cdba854e..6c588280 100644 --- a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs +++ b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs @@ -88,7 +88,7 @@ namespace NadekoBot.Modules.Administration RepeatRunner rep; if (!repeaters.TryGetValue(channel.Id, out rep)) { - await channel.SendMessageAsync("`No repeating message found on this server.`").ConfigureAwait(false); + await channel.SendMessageAsync("โ„น๏ธ **No repeating message found on this server.**").ConfigureAwait(false); return; } rep.Reset(); @@ -110,10 +110,10 @@ namespace NadekoBot.Modules.Administration await uow.CompleteAsync(); } rep.Stop(); - await channel.SendMessageAsync("`Stopped repeating a message.`").ConfigureAwait(false); + await channel.SendMessageAsync("โœ… **Stopped repeating a message.**").ConfigureAwait(false); } else - await channel.SendMessageAsync("`No message is repeating.`").ConfigureAwait(false); + await channel.SendMessageAsync("โ„น๏ธ **No message is repeating.**").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -159,8 +159,8 @@ namespace NadekoBot.Modules.Administration return old; }); - await channel.SendMessageAsync($"Repeating \"{rep.Repeater.Message}\" every {rep.Repeater.Interval.Days} days, {rep.Repeater.Interval.Hours} hours and {rep.Repeater.Interval.Minutes} minutes.").ConfigureAwait(false); + await channel.SendMessageAsync($"๐Ÿ” Repeating **\"{rep.Repeater.Message}\"** every `{rep.Repeater.Interval.Days} days, {rep.Repeater.Interval.Hours} hours and {rep.Repeater.Interval.Minutes} minutes`.").ConfigureAwait(false); } } } -} \ No newline at end of file +} From 9797aebdbab723ec151e62d4e89e6476df1b4485 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 00:52:28 +0530 Subject: [PATCH 08/68] two changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ๐Ÿ†™ **Migration done.** - โš ๏ธ **Error while migrating, check `logs` for more informations.** --- src/NadekoBot/Modules/Administration/Commands/Migration.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/Migration.cs b/src/NadekoBot/Modules/Administration/Commands/Migration.cs index fbf24492..5be28145 100644 --- a/src/NadekoBot/Modules/Administration/Commands/Migration.cs +++ b/src/NadekoBot/Modules/Administration/Commands/Migration.cs @@ -54,12 +54,12 @@ namespace NadekoBot.Modules.Administration break; } } - await umsg.Channel.SendMessageAsync("Migration done.").ConfigureAwait(false); + await umsg.Channel.SendMessageAsync("๐Ÿ†™ **Migration done.**").ConfigureAwait(false); } catch (Exception ex) { _log.Error(ex); - await umsg.Channel.SendMessageAsync(":warning: Error while migrating, check logs for more informations.").ConfigureAwait(false); + await umsg.Channel.SendMessageAsync("โš ๏ธ **Error while migrating, check `logs` for more informations.**").ConfigureAwait(false); } } From 8d954e5050e5b8dbbfe053d214823b03559813a9 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 01:01:28 +0530 Subject: [PATCH 09/68] added emojis --- .../Commands/PlayingRotateCommands.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs b/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs index 96dc0ad6..3e047508 100644 --- a/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/PlayingRotateCommands.cs @@ -104,9 +104,9 @@ namespace NadekoBot.Modules.Administration await uow.CompleteAsync(); } if (RotatingStatuses) - await channel.SendMessageAsync("`Rotating playing status enabled.`"); + await channel.SendMessageAsync("๐Ÿ†— **Rotating playing status enabled.**"); else - await channel.SendMessageAsync("`Rotating playing status disabled.`"); + await channel.SendMessageAsync("โ„น๏ธ **Rotating playing status disabled.**"); } [NadekoCommand, Usage, Description, Aliases] @@ -125,7 +125,7 @@ namespace NadekoBot.Modules.Administration await uow.CompleteAsync(); } - await channel.SendMessageAsync("`Added.`").ConfigureAwait(false); + await channel.SendMessageAsync("โœ… **Added.**").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -137,11 +137,11 @@ namespace NadekoBot.Modules.Administration if (!RotatingStatusMessages.Any()) - await channel.SendMessageAsync("`No rotating playing statuses set.`"); + await channel.SendMessageAsync("โŽ **No rotating playing statuses set.**"); else { var i = 1; - await channel.SendMessageAsync($"{umsg.Author.Mention} `Here is a list of rotating statuses:`\n\n\t" + string.Join("\n\t", RotatingStatusMessages.Select(rs => $"`{i++}.` {rs.Status}"))); + await channel.SendMessageAsync($"โ„น๏ธ {umsg.Author.Mention} `Here is a list of rotating statuses:`\n\n\t" + string.Join("\n\t", RotatingStatusMessages.Select(rs => $"`{i++}.` {rs.Status}"))); } } @@ -166,8 +166,8 @@ namespace NadekoBot.Modules.Administration RotatingStatusMessages.RemoveAt(index); await uow.CompleteAsync(); } - await channel.SendMessageAsync($"`Removed the the playing message:` {msg}").ConfigureAwait(false); + await channel.SendMessageAsync($"๐Ÿ—‘ **Removed the the playing message:** {msg}").ConfigureAwait(false); } } } -} \ No newline at end of file +} From b403e804ff832437f7da66add2923ae80c30b454 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 01:14:12 +0530 Subject: [PATCH 10/68] emojis and few other changes --- .../Administration/Commands/RatelimitCommand.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs b/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs index 587d0b65..224461b5 100644 --- a/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/RatelimitCommand.cs @@ -97,7 +97,7 @@ namespace NadekoBot.Modules.Administration if (RatelimitingChannels.TryRemove(channel.Id, out throwaway)) { throwaway.cancelSource.Cancel(); - await channel.SendMessageAsync("`Slow mode disabled.`").ConfigureAwait(false); + await channel.SendMessageAsync("โ„น๏ธ **Slow mode disabled.**").ConfigureAwait(false); return; } } @@ -112,7 +112,7 @@ namespace NadekoBot.Modules.Administration if (msg < 1 || perSec < 1 || msg > 100 || perSec > 3600) { - await channel.SendMessageAsync("`Invalid parameters.`"); + await channel.SendMessageAsync("โš ๏ธ `Invalid parameters.`"); return; } var toAdd = new Ratelimiter() @@ -123,11 +123,11 @@ namespace NadekoBot.Modules.Administration }; if(RatelimitingChannels.TryAdd(channel.Id, toAdd)) { - await channel.SendMessageAsync("`Slow mode initiated.` " + - $"Users can't send more than {toAdd.MaxMessages} message(s) every {toAdd.PerSeconds} second(s).") + await channel.SendMessageAsync("โœ… **Slow mode initiated: " + + $"Users can't send more than `{toAdd.MaxMessages} message(s)` every `{toAdd.PerSeconds} second(s)`.**") .ConfigureAwait(false); } } } } -} \ No newline at end of file +} From aa8d67a1dbac897810bc33a31ab7d24f428b933e Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 01:18:08 +0530 Subject: [PATCH 11/68] changed times - days to day(s) - hours to hour(s) - minutes to minute(s) --- .../Modules/Administration/Commands/MessageRepeater.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs index 6c588280..953f2446 100644 --- a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs +++ b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs @@ -159,7 +159,7 @@ namespace NadekoBot.Modules.Administration return old; }); - await channel.SendMessageAsync($"๐Ÿ” Repeating **\"{rep.Repeater.Message}\"** every `{rep.Repeater.Interval.Days} days, {rep.Repeater.Interval.Hours} hours and {rep.Repeater.Interval.Minutes} minutes`.").ConfigureAwait(false); + await channel.SendMessageAsync($"๐Ÿ” Repeating **\"{rep.Repeater.Message}\"** every `{rep.Repeater.Interval.Days} day(s), {rep.Repeater.Interval.Hours} hour(s) and {rep.Repeater.Interval.Minutes} minute(s)`.").ConfigureAwait(false); } } } From b6811afb34953faa44d98cf90896e12d6253d0f2 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 01:24:53 +0530 Subject: [PATCH 12/68] chaned time and days - days to day(s) - months to month(s) etc --- .../Modules/Utility/Commands/Remind.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index 391e9109..a0e006a7 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -151,11 +151,11 @@ namespace NadekoBot.Modules.Utility continue; } else if (value < 1 || - (groupName == "months" && value > 1) || - (groupName == "weeks" && value > 4) || - (groupName == "days" && value >= 7) || - (groupName == "hours" && value > 23) || - (groupName == "minutes" && value > 59)) + (groupName == "month(s)" && value > 1) || + (groupName == "week(s)" && value > 4) || + (groupName == "day(s)" && value >= 7) || + (groupName == "hour(s)" && value > 23) || + (groupName == "minute(s)" && value > 59)) { await channel.SendMessageAsync($"โš ๏ธ Invalid {groupName} value.").ConfigureAwait(false); return; @@ -164,11 +164,11 @@ namespace NadekoBot.Modules.Utility namesAndValues[groupName] = value; output += m.Groups[groupName].Value + " " + groupName + " "; } - var time = DateTime.Now + new TimeSpan(30 * namesAndValues["months"] + - 7 * namesAndValues["weeks"] + - namesAndValues["days"], - namesAndValues["hours"], - namesAndValues["minutes"], + var time = DateTime.Now + new TimeSpan(30 * namesAndValues["month(s)"] + + 7 * namesAndValues["week(s)"] + + namesAndValues["day(s)"], + namesAndValues["hour(s)"], + namesAndValues["minute(s)"], 0); var rem = new Reminder From 2a3fedec358db879975a33027cd5d1b2e4523f2f Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 02:16:24 +0530 Subject: [PATCH 13/68] reverted last change --- .../Modules/Utility/Commands/Remind.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/Remind.cs b/src/NadekoBot/Modules/Utility/Commands/Remind.cs index a0e006a7..391e9109 100644 --- a/src/NadekoBot/Modules/Utility/Commands/Remind.cs +++ b/src/NadekoBot/Modules/Utility/Commands/Remind.cs @@ -151,11 +151,11 @@ namespace NadekoBot.Modules.Utility continue; } else if (value < 1 || - (groupName == "month(s)" && value > 1) || - (groupName == "week(s)" && value > 4) || - (groupName == "day(s)" && value >= 7) || - (groupName == "hour(s)" && value > 23) || - (groupName == "minute(s)" && value > 59)) + (groupName == "months" && value > 1) || + (groupName == "weeks" && value > 4) || + (groupName == "days" && value >= 7) || + (groupName == "hours" && value > 23) || + (groupName == "minutes" && value > 59)) { await channel.SendMessageAsync($"โš ๏ธ Invalid {groupName} value.").ConfigureAwait(false); return; @@ -164,11 +164,11 @@ namespace NadekoBot.Modules.Utility namesAndValues[groupName] = value; output += m.Groups[groupName].Value + " " + groupName + " "; } - var time = DateTime.Now + new TimeSpan(30 * namesAndValues["month(s)"] + - 7 * namesAndValues["week(s)"] + - namesAndValues["day(s)"], - namesAndValues["hour(s)"], - namesAndValues["minute(s)"], + var time = DateTime.Now + new TimeSpan(30 * namesAndValues["months"] + + 7 * namesAndValues["weeks"] + + namesAndValues["days"], + namesAndValues["hours"], + namesAndValues["minutes"], 0); var rem = new Reminder From ffe8625055ce741fbd7e1872b3fdb362377bbda4 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 02:27:42 +0530 Subject: [PATCH 14/68] added a space betwn profile and link --- src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs b/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs index f31e8eea..e3d663a5 100644 --- a/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/OsuCommands.cs @@ -48,7 +48,7 @@ namespace NadekoBot.Modules.Searches MemoryStream ms = new MemoryStream(); res.CopyTo(ms); ms.Position = 0; - await channel.SendFileAsync(ms, $"{usr}.png", $"๐ŸŽง **Profile Link:**https://osu.ppy.sh/u/{Uri.EscapeDataString(usr)}\n`Image provided by https://lemmmy.pw/osusig`").ConfigureAwait(false); + await channel.SendFileAsync(ms, $"{usr}.png", $"๐ŸŽง **Profile Link: **https://osu.ppy.sh/u/{Uri.EscapeDataString(usr)}\n`Image provided by https://lemmmy.pw/osusig`").ConfigureAwait(false); } catch (Exception ex) { From c6e5b20904d413c6873e7603a8f47ff8504afc3c Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 14:08:10 +0530 Subject: [PATCH 15/68] Update Gambling.cs --- src/NadekoBot/Modules/Gambling/Gambling.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 9227a09e..263f3eb7 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -42,7 +42,7 @@ namespace NadekoBot.Modules.Gambling var members = role.Members().Where(u => u.Status != UserStatus.Offline && u.Status != UserStatus.Unknown); var membersArray = members as IUser[] ?? members.ToArray(); var usr = membersArray[new NadekoRandom().Next(0, membersArray.Length)]; - await channel.SendMessageAsync($"๐ŸŽŸ Raffled user: **{usr.Username}** ID: `{usr.Id}`").ConfigureAwait(false); + await channel.SendMessageAsync($"๐ŸŽŸ Raffled user: **{usr.Username}#{usr.Discriminator}** ID: `{usr.Id}`").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] From 6139cb6ecaf6416bb4106276ba5990a3aefc5c9f Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 14:35:42 +0530 Subject: [PATCH 16/68] reverted original quote emoji --- src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs index 670968fb..c1b35efe 100644 --- a/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs +++ b/src/NadekoBot/Modules/Utility/Commands/QuoteCommands.cs @@ -31,10 +31,10 @@ namespace NadekoBot.Modules.Utility } if (quotes.Any()) - await channel.SendMessageAsync($"๐Ÿ’ฌ **Page {page + 1}** of **quotes:**\n```xl\n" + String.Join("\n", quotes.Select((q) => $"{q.Keyword,-20} by {q.AuthorName}")) + "\n```") + await channel.SendMessageAsync($"๐Ÿ’ฌ **Page {page + 1} of quotes:**\n```xl\n" + String.Join("\n", quotes.Select((q) => $"{q.Keyword,-20} by {q.AuthorName}")) + "\n```") .ConfigureAwait(false); else - await channel.SendMessageAsync("โ„น๏ธ **No quotes** on this page.").ConfigureAwait(false); + await channel.SendMessageAsync("โ„น๏ธ **No quotes on this page.**").ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -57,7 +57,7 @@ namespace NadekoBot.Modules.Utility if (quote == null) return; - await channel.SendMessageAsync("๐Ÿ–Š " + quote.Text.SanitizeMentions()); + await channel.SendMessageAsync("๐Ÿ“ฃ " + quote.Text.SanitizeMentions()); } [NadekoCommand, Usage, Description, Aliases] From 0affabb557b5eda0d26e290d3fcd377562c80037 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 22 Nov 2016 11:42:26 +0100 Subject: [PATCH 17/68] Changed how greetdel and byedel work --- ...2100602_Greet and bye improved.Designer.cs | 785 ++++++++++++++++++ .../20161122100602_Greet and bye improved.cs | 25 + .../NadekoSqliteContextModelSnapshot.cs | 7 +- .../Administration/Commands/Migration.cs | 2 +- .../Commands/ServerGreetCommands.cs | 40 +- src/NadekoBot/Resources/CommandStrings.resx | 8 +- .../Services/Database/Models/GuildConfig.cs | 5 +- .../Services/Database/NadekoContext.cs | 4 + src/NadekoBot/project.json | 2 +- 9 files changed, 851 insertions(+), 27 deletions(-) create mode 100644 src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs create mode 100644 src/NadekoBot/Migrations/20161122100602_Greet and bye improved.cs diff --git a/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs b/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs new file mode 100644 index 00000000..51d8ca7f --- /dev/null +++ b/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.Designer.cs @@ -0,0 +1,785 @@ +๏ปฟusing System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using NadekoBot.Services.Database; +using NadekoBot.Services.Database.Models; +using NadekoBot.Modules.Music.Classes; + +namespace NadekoBot.Migrations +{ + [DbContext(typeof(NadekoContext))] + [Migration("20161122100602_Greet and bye improved")] + partial class Greetandbyeimproved + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("ItemId"); + + b.Property("Type"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("BlacklistItem"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BotConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BufferSize"); + + b.Property("CurrencyGenerationChance"); + + b.Property("CurrencyGenerationCooldown"); + + b.Property("CurrencyName"); + + b.Property("CurrencyPluralName"); + + b.Property("CurrencySign"); + + b.Property("DMHelpString"); + + b.Property("ForwardMessages"); + + b.Property("ForwardToAllOwners"); + + b.Property("HelpString"); + + b.Property("MigrationVersion"); + + b.Property("RemindMessageFormat"); + + b.Property("RotatingStatuses"); + + b.HasKey("Id"); + + b.ToTable("BotConfig"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BaseDestroyed"); + + b.Property("CallUser"); + + b.Property("ClashWarId"); + + b.Property("SequenceNumber"); + + b.Property("Stars"); + + b.Property("TimeAdded"); + + b.HasKey("Id"); + + b.HasIndex("ClashWarId"); + + b.ToTable("ClashCallers"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashWar", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("EnemyClan"); + + b.Property("GuildId"); + + b.Property("Size"); + + b.Property("StartedAt"); + + b.Property("WarState"); + + b.HasKey("Id"); + + b.ToTable("ClashOfClans"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("CommandName"); + + b.Property("GuildConfigId"); + + b.Property("Seconds"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("CommandCooldown"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ConvertUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("InternalTrigger"); + + b.Property("Modifier"); + + b.Property("UnitType"); + + b.HasKey("Id"); + + b.ToTable("ConversionUnits"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Currency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Currency"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CurrencyTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("Reason"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.ToTable("CurrencyTransactions"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CustomReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("GuildId"); + + b.Property("IsRegex"); + + b.Property("OwnerOnly"); + + b.Property("Response"); + + b.Property("Trigger"); + + b.HasKey("Id"); + + b.ToTable("CustomReactions"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Donator", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Amount"); + + b.Property("Name"); + + b.Property("UserId"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Donators"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("Text"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("EightBallResponses"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("GuildConfigId"); + + b.Property("GuildConfigId1"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.HasIndex("GuildConfigId1"); + + b.ToTable("FilterChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("GuildConfigId"); + + b.Property("Word"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FilteredWord"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("GuildConfigId"); + + b.Property("GuildId"); + + b.Property("Type"); + + b.Property("Username"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("FollowedStream"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("GuildConfigId"); + + b.HasKey("Id"); + + b.HasIndex("GuildConfigId"); + + b.ToTable("GCChannelId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AutoAssignRoleId"); + + b.Property("AutoDeleteByeMessages"); + + b.Property("AutoDeleteByeMessagesTimer"); + + b.Property("AutoDeleteGreetMessages"); + + b.Property("AutoDeleteGreetMessagesTimer"); + + b.Property("AutoDeleteSelfAssignedRoleMessages"); + + b.Property("ByeMessageChannelId"); + + b.Property("ChannelByeMessageText"); + + b.Property("ChannelGreetMessageText"); + + b.Property("CleverbotEnabled"); + + b.Property("DefaultMusicVolume"); + + b.Property("DeleteMessageOnCommand"); + + b.Property("DmGreetMessageText"); + + b.Property("ExclusiveSelfAssignedRoles"); + + b.Property("FilterInvites"); + + b.Property("FilterWords"); + + b.Property("GreetMessageChannelId"); + + b.Property("GuildId"); + + b.Property("LogSettingId"); + + b.Property("MuteRoleName"); + + b.Property("PermissionRole"); + + b.Property("RootPermissionId"); + + b.Property("SendChannelByeMessage"); + + b.Property("SendChannelGreetMessage"); + + b.Property("SendDmGreetMessage"); + + b.Property("VerbosePermissions"); + + b.Property("VoicePlusTextEnabled"); + + b.HasKey("Id"); + + b.HasIndex("GuildId") + .IsUnique(); + + b.HasIndex("LogSettingId"); + + b.HasIndex("RootPermissionId"); + + b.ToTable("GuildConfigs"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredLogChannels"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("LogSettingId"); + + b.HasKey("Id"); + + b.HasIndex("LogSettingId"); + + b.ToTable("IgnoredVoicePresenceCHannels"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.LogSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelCreated"); + + b.Property("ChannelDestroyed"); + + b.Property("ChannelId"); + + b.Property("ChannelUpdated"); + + b.Property("IsLogging"); + + b.Property("LogUserPresence"); + + b.Property("LogVoicePresence"); + + b.Property("MessageDeleted"); + + b.Property("MessageUpdated"); + + b.Property("UserBanned"); + + b.Property("UserJoined"); + + b.Property("UserLeft"); + + b.Property("UserPresenceChannelId"); + + b.Property("UserUnbanned"); + + b.Property("UserUpdated"); + + b.Property("VoicePresenceChannelId"); + + b.HasKey("Id"); + + b.ToTable("LogSettings"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("ModuleName"); + + b.Property("Prefix"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("ModulePrefixes"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.MusicPlaylist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Author"); + + b.Property("AuthorId"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.ToTable("MusicPlaylists"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("NextId"); + + b.Property("PrimaryTarget"); + + b.Property("PrimaryTargetId"); + + b.Property("SecondaryTarget"); + + b.Property("SecondaryTargetName"); + + b.Property("State"); + + b.HasKey("Id"); + + b.HasIndex("NextId") + .IsUnique(); + + b.ToTable("Permission"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("Status"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("PlayingStatus"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("MusicPlaylistId"); + + b.Property("Provider"); + + b.Property("ProviderType"); + + b.Property("Query"); + + b.Property("Title"); + + b.Property("Uri"); + + b.HasKey("Id"); + + b.HasIndex("MusicPlaylistId"); + + b.ToTable("PlaylistSong"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Quote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("AuthorName") + .IsRequired(); + + b.Property("GuildId"); + + b.Property("Keyword") + .IsRequired(); + + b.Property("Text") + .IsRequired(); + + b.HasKey("Id"); + + b.ToTable("Quotes"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BotConfigId"); + + b.Property("Icon"); + + b.Property("Name"); + + b.HasKey("Id"); + + b.HasIndex("BotConfigId"); + + b.ToTable("RaceAnimals"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Reminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("IsPrivate"); + + b.Property("Message"); + + b.Property("ServerId"); + + b.Property("UserId"); + + b.Property("When"); + + b.HasKey("Id"); + + b.ToTable("Reminders"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Repeater", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ChannelId"); + + b.Property("GuildId"); + + b.Property("Interval"); + + b.Property("Message"); + + b.HasKey("Id"); + + b.HasIndex("ChannelId") + .IsUnique(); + + b.ToTable("Repeaters"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.SelfAssignedRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("GuildId"); + + b.Property("RoleId"); + + b.HasKey("Id"); + + b.HasIndex("GuildId", "RoleId") + .IsUnique(); + + b.ToTable("SelfAssignableRoles"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("Blacklist") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ClashCaller", b => + { + b.HasOne("NadekoBot.Services.Database.Models.ClashWar", "ClashWar") + .WithMany("Bases") + .HasForeignKey("ClashWarId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.CommandCooldown", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("CommandCooldowns") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.EightBallResponse", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("EightBallResponses") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FilterChannelId", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("FilterInvitesChannelIds") + .HasForeignKey("GuildConfigId"); + + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("FilterWordsChannelIds") + .HasForeignKey("GuildConfigId1"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FilteredWord", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("FilteredWords") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.FollowedStream", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("FollowedStreams") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GCChannelId", b => + { + b.HasOne("NadekoBot.Services.Database.Models.GuildConfig") + .WithMany("GenerateCurrencyChannelIds") + .HasForeignKey("GuildConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.GuildConfig", b => + { + b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany() + .HasForeignKey("LogSettingId"); + + b.HasOne("NadekoBot.Services.Database.Models.Permission", "RootPermission") + .WithMany() + .HasForeignKey("RootPermissionId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredLogChannel", b => + { + b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredChannels") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.IgnoredVoicePresenceChannel", b => + { + b.HasOne("NadekoBot.Services.Database.Models.LogSetting", "LogSetting") + .WithMany("IgnoredVoicePresenceChannelIds") + .HasForeignKey("LogSettingId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.ModulePrefix", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("ModulePrefixes") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.Permission", b => + { + b.HasOne("NadekoBot.Services.Database.Models.Permission", "Next") + .WithOne("Previous") + .HasForeignKey("NadekoBot.Services.Database.Models.Permission", "NextId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.PlayingStatus", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("RotatingStatusMessages") + .HasForeignKey("BotConfigId"); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.PlaylistSong", b => + { + b.HasOne("NadekoBot.Services.Database.Models.MusicPlaylist") + .WithMany("Songs") + .HasForeignKey("MusicPlaylistId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("NadekoBot.Services.Database.Models.RaceAnimal", b => + { + b.HasOne("NadekoBot.Services.Database.Models.BotConfig") + .WithMany("RaceAnimals") + .HasForeignKey("BotConfigId"); + }); + } + } +} diff --git a/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.cs b/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.cs new file mode 100644 index 00000000..8dabc472 --- /dev/null +++ b/src/NadekoBot/Migrations/20161122100602_Greet and bye improved.cs @@ -0,0 +1,25 @@ +๏ปฟusing System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace NadekoBot.Migrations +{ + public partial class Greetandbyeimproved : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "AutoDeleteByeMessagesTimer", + table: "GuildConfigs", + nullable: false, + defaultValue: 0); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "AutoDeleteByeMessagesTimer", + table: "GuildConfigs"); + } + } +} diff --git a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs index 9e58afaa..dd4b8543 100644 --- a/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs +++ b/src/NadekoBot/Migrations/NadekoSqliteContextModelSnapshot.cs @@ -2,7 +2,10 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; using NadekoBot.Services.Database; +using NadekoBot.Services.Database.Models; +using NadekoBot.Modules.Music.Classes; namespace NadekoBot.Migrations { @@ -12,7 +15,7 @@ namespace NadekoBot.Migrations protected override void BuildModel(ModelBuilder modelBuilder) { modelBuilder - .HasAnnotation("ProductVersion", "1.0.0-rtm-21431"); + .HasAnnotation("ProductVersion", "1.1.0-rtm-22752"); modelBuilder.Entity("NadekoBot.Services.Database.Models.BlacklistItem", b => { @@ -319,6 +322,8 @@ namespace NadekoBot.Migrations b.Property("AutoDeleteByeMessages"); + b.Property("AutoDeleteByeMessagesTimer"); + b.Property("AutoDeleteGreetMessages"); b.Property("AutoDeleteGreetMessagesTimer"); diff --git a/src/NadekoBot/Modules/Administration/Commands/Migration.cs b/src/NadekoBot/Modules/Administration/Commands/Migration.cs index 5be28145..5ce821d9 100644 --- a/src/NadekoBot/Modules/Administration/Commands/Migration.cs +++ b/src/NadekoBot/Modules/Administration/Commands/Migration.cs @@ -122,7 +122,7 @@ namespace NadekoBot.Modules.Administration gc.ByeMessageChannelId = byeChannel; gc.ChannelByeMessageText = byeMsg; - gc.AutoDeleteByeMessages = gc.AutoDeleteGreetMessages = grdel; + gc.AutoDeleteGreetMessagesTimer = gc.AutoDeleteByeMessagesTimer = grdel ? 30 : 0; _log.Info(++i); } diff --git a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs index d3c1cede..435dc700 100644 --- a/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs +++ b/src/NadekoBot/Modules/Administration/Commands/ServerGreetCommands.cs @@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Administration try { var toDelete = await channel.SendMessageAsync(msg.SanitizeMentions()).ConfigureAwait(false); - if (conf.AutoDeleteByeMessages) + if (conf.AutoDeleteByeMessagesTimer > 0) { var t = Task.Run(async () => { @@ -90,7 +90,7 @@ namespace NadekoBot.Modules.Administration try { var toDelete = await channel.SendMessageAsync(msg.SanitizeMentions()).ConfigureAwait(false); - if (conf.AutoDeleteGreetMessages) + if (conf.AutoDeleteByeMessagesTimer > 0) { var t = Task.Run(async () => { @@ -126,29 +126,32 @@ namespace NadekoBot.Modules.Administration [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] - public async Task GreetDel(IUserMessage umsg) + public async Task GreetDel(IUserMessage umsg, int timer = 30) { var channel = (ITextChannel)umsg.Channel; + if (timer < 0 || timer > 600) + return; - var enabled = await ServerGreetCommands.SetGreetDel(channel.Guild.Id).ConfigureAwait(false); + await ServerGreetCommands.SetGreetDel(channel.Guild.Id, timer).ConfigureAwait(false); - if (enabled) - await channel.SendMessageAsync("`Automatic deletion of greet messages has been enabled.`").ConfigureAwait(false); + if (timer > 0) + 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); } - private static async Task SetGreetDel(ulong id, bool? value = null) + private static async Task SetGreetDel(ulong id, int timer) { - bool enabled; + if (timer < 0 || timer > 600) + return; + using (var uow = DbHandler.UnitOfWork()) { var conf = uow.GuildConfigs.For(id); - enabled = conf.AutoDeleteGreetMessages = value ?? !conf.AutoDeleteGreetMessages; + conf.AutoDeleteGreetMessagesTimer = timer; uow.GuildConfigs.Update(conf); await uow.CompleteAsync().ConfigureAwait(false); } - return enabled; } [NadekoCommand, Usage, Description, Aliases] @@ -375,29 +378,30 @@ namespace NadekoBot.Modules.Administration [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [RequirePermission(GuildPermission.ManageGuild)] - public async Task ByeDel(IUserMessage umsg) + public async Task ByeDel(IUserMessage umsg, int timer = 30) { var channel = (ITextChannel)umsg.Channel; - var enabled = await ServerGreetCommands.SetByeDel(channel.Guild.Id).ConfigureAwait(false); + await ServerGreetCommands.SetByeDel(channel.Guild.Id, timer).ConfigureAwait(false); - if (enabled) - await channel.SendMessageAsync("`Automatic deletion of bye messages has been enabled.`").ConfigureAwait(false); + if (timer > 0) + 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); } - private static async Task SetByeDel(ulong id, bool? value = null) + private static async Task SetByeDel(ulong id, int timer) { - bool enabled; + if (timer < 0 || timer > 600) + return; + using (var uow = DbHandler.UnitOfWork()) { var conf = uow.GuildConfigs.For(id); - enabled = conf.AutoDeleteByeMessages = value ?? !conf.AutoDeleteByeMessages; + conf.AutoDeleteByeMessagesTimer = timer; uow.GuildConfigs.Update(conf); await uow.CompleteAsync().ConfigureAwait(false); } - return enabled; } } diff --git a/src/NadekoBot/Resources/CommandStrings.resx b/src/NadekoBot/Resources/CommandStrings.resx index aa936b7d..76c0a001 100644 --- a/src/NadekoBot/Resources/CommandStrings.resx +++ b/src/NadekoBot/Resources/CommandStrings.resx @@ -166,10 +166,10 @@ greetdel grdel - Toggles automatic deletion of greet messages. + Sets the time it takes (in seconds) for greet messages to be auto-deleted. Set 0 to disable automatic deletion. - `{0}greetdel` + `{0}greetdel 0` or `{0}greetdel 30` greet @@ -211,10 +211,10 @@ byedel - Toggles automatic deletion of bye messages. + Sets the time it takes (in seconds) for bye messages to be auto-deleted. Set 0 to disable automatic deletion. - `{0}byedel` + `{0}byedel 0` or `{0}byedel 30` greetdm diff --git a/src/NadekoBot/Services/Database/Models/GuildConfig.cs b/src/NadekoBot/Services/Database/Models/GuildConfig.cs index d8ac0ddc..2c39b4a2 100644 --- a/src/NadekoBot/Services/Database/Models/GuildConfig.cs +++ b/src/NadekoBot/Services/Database/Models/GuildConfig.cs @@ -8,9 +8,10 @@ namespace NadekoBot.Services.Database.Models public bool DeleteMessageOnCommand { get; set; } public ulong AutoAssignRoleId { get; set; } //greet stuff - public bool AutoDeleteGreetMessages { get; set; } - public bool AutoDeleteByeMessages { get; set; } + public bool AutoDeleteGreetMessages { get; set; } //unused + public bool AutoDeleteByeMessages { get; set; } // unused public int AutoDeleteGreetMessagesTimer { get; set; } = 30; + public int AutoDeleteByeMessagesTimer { get; set; } = 30; public ulong GreetMessageChannelId { get; set; } public ulong ByeMessageChannelId { get; set; } diff --git a/src/NadekoBot/Services/Database/NadekoContext.cs b/src/NadekoBot/Services/Database/NadekoContext.cs index 5e33bb64..66176ff8 100644 --- a/src/NadekoBot/Services/Database/NadekoContext.cs +++ b/src/NadekoBot/Services/Database/NadekoContext.cs @@ -43,6 +43,10 @@ namespace NadekoBot.Services.Database this.Database.Migrate(); EnsureSeedData(); } + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseSqlite("Filename=./data/NadekoBot.db"); + } public void EnsureSeedData() { diff --git a/src/NadekoBot/project.json b/src/NadekoBot/project.json index 9a7fc61d..7017f62b 100644 --- a/src/NadekoBot/project.json +++ b/src/NadekoBot/project.json @@ -47,7 +47,7 @@ "System.Xml.XPath": "4.3.0" }, "tools": { - "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final" + "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final" }, "frameworks": { "netcoreapp1.0": { From fdfaba5905be7b0f54ffbf51bf843c0494cc5688 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 16:24:14 +0530 Subject: [PATCH 18/68] 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 9397499b426404a122202aebb77982ca4990e2ff Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 22 Nov 2016 12:31:55 +0100 Subject: [PATCH 19/68] Woopsie --- discord.net | 2 +- src/NadekoBot/Services/Database/NadekoContext.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/discord.net b/discord.net index 5fc174fb..9766a978 160000 --- a/discord.net +++ b/discord.net @@ -1 +1 @@ -Subproject commit 5fc174fb328c9782f718c59859645dbb99aedd0f +Subproject commit 9766a978b61294fda58964fc271d9c80c3c36e0b diff --git a/src/NadekoBot/Services/Database/NadekoContext.cs b/src/NadekoBot/Services/Database/NadekoContext.cs index 66176ff8..da16e598 100644 --- a/src/NadekoBot/Services/Database/NadekoContext.cs +++ b/src/NadekoBot/Services/Database/NadekoContext.cs @@ -43,10 +43,10 @@ namespace NadekoBot.Services.Database this.Database.Migrate(); EnsureSeedData(); } - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - optionsBuilder.UseSqlite("Filename=./data/NadekoBot.db"); - } + //protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + //{ + // optionsBuilder.UseSqlite("Filename=./data/NadekoBot.db"); + //} public void EnsureSeedData() { From 7102914b4913636c7d7d86faa0ac0e4fdf6484d0 Mon Sep 17 00:00:00 2001 From: samvaio Date: Tue, 22 Nov 2016 17:27:39 +0530 Subject: [PATCH 20/68] 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 21/68] 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 22/68] 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 23/68] 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 24/68] 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 25/68] 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 26/68] 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 27/68] 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 28/68] 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 29/68] 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 30/68] 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 31/68] 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 32/68] 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 33/68] 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 34/68] 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 35/68] 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 36/68] 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 37/68] 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 38/68] 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 39/68] 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 40/68] 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 41/68] 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 42/68] 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 43/68] 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 44/68] 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 45/68] 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 46/68] 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 47/68] 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 48/68] 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 49/68] 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 50/68] 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 51/68] 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 52/68] 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 53/68] 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 54/68] 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 55/68] 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 56/68] 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 57/68] 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 58/68] 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 59/68] 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 60/68] 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 61/68] 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 62/68] 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 63/68] 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 64/68] 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 65/68] 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 66/68] 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 67/68] 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 68/68] 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; });