From 8d9e9714f7bdccd634a5fe89ec29de6a9aefed76 Mon Sep 17 00:00:00 2001 From: Christopher Felegy Date: Thu, 16 Apr 2020 21:44:53 -0400 Subject: [PATCH] meta: bump version to 2.3.0-dev --- CHANGELOG.md | 74 ++++++++++++++++++++++++++++++ Discord.Net.targets | 6 +-- samples/idn/Program.cs | 25 ++++++++-- src/Discord.Net/Discord.Net.nuspec | 34 +++++++------- 4 files changed, 115 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac159d86f..886754052 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,79 @@ # Changelog +## [2.2.0] - 2020-04-16 +### Added +- #1247 Implement Client Status Support (9da11b4) +- #1310 id overload for RemoveReactionAsync (c88b1da) +- #1319 BOOST (faf23de) +- #1326 Added a Rest property to DiscordShardedClient (9fede34) +- #1348 Add Quote Formatting (265da99) +- #1354 Add support for setting X-RateLimit-Precision (9482204) +- #1355 Provide ParameterInfo with error ParseResult (3755a02) +- #1357 add the "Stream" permission. (b00da3d) +- #1358 Add ChannelFollowAdd MessageType (794eba5) +- #1369 Add SelfStream voice state property (9bb08c9) +- #1372 support X-RateLimit-Reset-After (7b9029d) +- #1373 update audit log models (c54867f) +- #1377 Support filtering audit log entries on user, action type, and before entry id (68eb71c) +- #1386 support guild subscription opt-out (0d54207) +- #1387 #1381 Guild PreferredLocale support (a61adb0) +- #1406 CustomStatusGame Activity (79a0ea9) +- #1413 Implemented Message Reference Property (f86c39d) +- #1414 add StartedAt, EndsAt, Elapsed and Remaining to SpotifyGame. (2bba324) +- #1432 Add ability to modify the banner for guilds (d734ce0) +- suppress messages (cd28892) + +### Fixed +- #1318 #1314 Don't parse tags within code blocks (c977f2e) +- #1333 Remove null coalescing on ToEmbedBuilder Color (120c0f7) +- #1337 Fixed attempting to access a non-present optional value (4edda5b) +- #1346 CommandExecuted event will fire when a parameter precondition fails like what happens when standard precondition fails. (e8cb031) +- #1371 Fix keys of guild update audit (b0a595b) +- #1375 Use double precision for X-Reset-After, set CultureInfo when parsing numeric types (606dac3) +- #1392 patch todo in NamedTypeReader (0bda8a4) +- #1405 add .NET Standard 2.1 support for Color (7f0c0c9) +- #1412 GetUsersAsync to use MaxUsersPerBatch const as limit instead of MaxMessagesPerBatch. (5439cba) +- #1416 false-positive detection of CustomStatusGame based on Id property (a484651) +- #1418 #1335 Add isMentionable parameter to CreateRoleAsync in non-breaking manner (1c63fd4) +- #1421 (3ff4e3d) +- include MessageFlags and SuppressEmbedParams (d6d4429) + +### Changed +- #1368 Update ISystemMessage interface to allow reactions (07f4d5f) +- #1417 fix #1415 Re-add support for overwrite permissions for news channels (e627f07) +- use millisecond precision by default (bcb3534) + +### Misc +- #1290 Split Unit and Integration tests into separate projects (a797be9) +- #1328 Fix #1327 Color.ToString returns wrong value (1e8aa08) +- #1329 Fix invalid cref values in docs (363d1c6) +- #1330 Fix spelling mistake in ExclusiveBulkDelete warning (c864f48) +- #1331 Change token explanation (0484fe8) +- #1349 Fixed a spelling error. (af79ed5) +- #1353 [ci skip] Removed duplicate "any" from the readme (15b2a36) +- #1359 Fixing GatewayEncoding comment (52565ed) +- #1379 September 2019 Documentation Update (fd3810e) +- #1382 Fix .NET Core 3.0 compatibility + Drop NS1.3 (d199d93) +- #1388 fix coercion error with DateTime/Offset (3d39704) +- #1393 Utilize ValueTuples (99d7135) +- #1400 Fix #1394 Misworded doc for command params args (1c6ee72) +- #1401 Fix package publishing in azure pipelines (a08d529) +- #1402 Fix packaging (65223a6) +- #1403 Cache regex instances in MessageHelper (007b011) +- #1424 Fix the Comparer descriptions not linking the type (911523d) +- #1426 Fix incorrect and missing colour values for Color fields (9ede6b9) +- #1470 Added System.Linq reference (adf823c) +- temporary sanity checking in SocketGuild (c870e67) +- build and deploy docs automatically (2981d6b) +- 2.2.0 (4b602b4) +- target the Process env-var scope (3c6b376) +- fix metapackage build (1794f95) +- copy only _site to docs-static (a8cdadc) +- do not exit on failed robocopy (fd204ee) +- add idn debugger (91aec9f) +- rename IsStream to IsStreaming (dcd9cdd) +- feature (40844b9) + ## [2.1.1] - 2019-06-08 ### Fixed - #994: Remainder parameters now ignore character escaping, as there is no reason to escape characters here (2e95c49) diff --git a/Discord.Net.targets b/Discord.Net.targets index 3a348e786..a5ab756d9 100644 --- a/Discord.Net.targets +++ b/Discord.Net.targets @@ -1,8 +1,8 @@ - 2.2.0 - - RogueException + 2.3.0 + dev + Discord.Net Contributors discord;discordapp https://github.com/RogueException/Discord.Net http://opensource.org/licenses/MIT diff --git a/samples/idn/Program.cs b/samples/idn/Program.cs index 60af7faf4..ffd8fd1af 100644 --- a/samples/idn/Program.cs +++ b/samples/idn/Program.cs @@ -37,18 +37,22 @@ namespace idn var client = new DiscordSocketClient(new DiscordSocketConfig { LogLevel = LogSeverity.Debug }); var logQueue = new ConcurrentQueue(); var logCancelToken = new CancellationTokenSource(); + int presenceUpdates = 0; client.Log += msg => { logQueue.Enqueue(msg); return Task.CompletedTask; }; + Console.CancelKeyPress += (_ev, _s) => + { + logCancelToken.Cancel(); + }; var logTask = Task.Run(async () => { var fs = new FileStream("idn.log", FileMode.Append); - //var f = File.Open("idn.log", FileMode.Append); - StringBuilder logStringBuilder = new StringBuilder(200); + var logStringBuilder = new StringBuilder(200); string logString = ""; byte[] helloBytes = Encoding.UTF8.GetBytes($"### new log session: {DateTime.Now} ###\n\n"); @@ -58,15 +62,25 @@ namespace idn { if (logQueue.TryDequeue(out var msg)) { + if (msg.Message?.IndexOf("PRESENCE_UPDATE)") > 0) + { + presenceUpdates++; + continue; + } + _ = msg.ToString(builder: logStringBuilder); logStringBuilder.AppendLine(); logString = logStringBuilder.ToString(); Debug.Write(logString, "DNET"); - await fs.WriteAsync(Encoding.UTF8.GetBytes(logString), logCancelToken.Token); + await fs.WriteAsync(Encoding.UTF8.GetBytes(logString)); } await fs.FlushAsync(); - await Task.Delay(100, logCancelToken.Token); + try + { + await Task.Delay(100, logCancelToken.Token); + } + finally { } } byte[] goodbyeBytes = Encoding.UTF8.GetBytes($"#!! end log session: {DateTime.Now} !!#\n\n\n"); @@ -84,6 +98,7 @@ namespace idn var globals = new ScriptGlobals { Client = client, + PUCount = -1, }; while (true) @@ -99,6 +114,7 @@ namespace idn object eval; try { + globals.PUCount = presenceUpdates; eval = await CSharpScript.EvaluateAsync(input, options, globals); } catch (Exception e) @@ -130,6 +146,7 @@ namespace idn public class ScriptGlobals { public DiscordSocketClient Client { get; set; } + public int PUCount { get; set; } } } } diff --git a/src/Discord.Net/Discord.Net.nuspec b/src/Discord.Net/Discord.Net.nuspec index b73d3bf24..5c5ea4072 100644 --- a/src/Discord.Net/Discord.Net.nuspec +++ b/src/Discord.Net/Discord.Net.nuspec @@ -2,10 +2,10 @@ Discord.Net - 2.2.0$suffix$ + 2.3.0-dev$suffix$ Discord.Net Discord.Net Contributors - RogueException + foxbot An asynchronous API wrapper for Discord. This metapackage includes all of the optional Discord.Net components. discord;discordapp https://github.com/RogueException/Discord.Net @@ -14,25 +14,25 @@ https://github.com/RogueException/Discord.Net/raw/dev/docs/marketing/logo/PackageLogo.png - - - - - + + + + + - - - - - + + + + + - - - - - + + + + +