| @@ -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) | |||
| @@ -1,8 +1,8 @@ | |||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup> | |||
| <VersionPrefix>2.2.0</VersionPrefix> | |||
| <VersionSuffix></VersionSuffix> | |||
| <Authors>RogueException</Authors> | |||
| <VersionPrefix>2.3.0</VersionPrefix> | |||
| <VersionSuffix>dev</VersionSuffix> | |||
| <Authors>Discord.Net Contributors</Authors> | |||
| <PackageTags>discord;discordapp</PackageTags> | |||
| <PackageProjectUrl>https://github.com/RogueException/Discord.Net</PackageProjectUrl> | |||
| <PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl> | |||
| @@ -37,18 +37,22 @@ namespace idn | |||
| var client = new DiscordSocketClient(new DiscordSocketConfig { LogLevel = LogSeverity.Debug }); | |||
| var logQueue = new ConcurrentQueue<LogMessage>(); | |||
| 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; } | |||
| } | |||
| } | |||
| } | |||
| @@ -2,10 +2,10 @@ | |||
| <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | |||
| <metadata> | |||
| <id>Discord.Net</id> | |||
| <version>2.2.0$suffix$</version> | |||
| <version>2.3.0-dev$suffix$</version> | |||
| <title>Discord.Net</title> | |||
| <authors>Discord.Net Contributors</authors> | |||
| <owners>RogueException</owners> | |||
| <owners>foxbot</owners> | |||
| <description>An asynchronous API wrapper for Discord. This metapackage includes all of the optional Discord.Net components.</description> | |||
| <tags>discord;discordapp</tags> | |||
| <projectUrl>https://github.com/RogueException/Discord.Net</projectUrl> | |||
| @@ -14,25 +14,25 @@ | |||
| <iconUrl>https://github.com/RogueException/Discord.Net/raw/dev/docs/marketing/logo/PackageLogo.png</iconUrl> | |||
| <dependencies> | |||
| <group targetFramework="net461"> | |||
| <dependency id="Discord.Net.Core" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Rest" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.WebSocket" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Commands" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Webhook" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Core" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Rest" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.WebSocket" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Commands" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Webhook" version="2.3.0-dev$suffix$" /> | |||
| </group> | |||
| <group targetFramework="netstandard2.0"> | |||
| <dependency id="Discord.Net.Core" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Rest" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.WebSocket" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Commands" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Webhook" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Core" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Rest" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.WebSocket" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Commands" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Webhook" version="2.3.0-dev$suffix$" /> | |||
| </group> | |||
| <group targetFramework="netstandard2.1"> | |||
| <dependency id="Discord.Net.Core" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Rest" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.WebSocket" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Commands" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Webhook" version="2.2.0$suffix$" /> | |||
| <dependency id="Discord.Net.Core" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Rest" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.WebSocket" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Commands" version="2.3.0-dev$suffix$" /> | |||
| <dependency id="Discord.Net.Webhook" version="2.3.0-dev$suffix$" /> | |||
| </group> | |||
| </dependencies> | |||
| </metadata> | |||