Skip to content

Releases: Sythsaz/Giveaway-Bot

v1.5.11

11 Feb 11:52
9d3859a

Choose a tag to compare

Added

  • Tests: Added comprehensive unit tests for UpdateService SHA256 checksum validation, including tests for
    checksum extraction, file verification, and invalid format handling.
  • Tests: Enhanced UpdateServiceTests with whitespace-only checksum test cases (space, tab, mixed whitespace)
    to ensure edge cases are properly handled.
  • Metrics Service: Implemented MetricsService and MetricsContainer for comprehensive cross-profile analytics,
    tracking global entries, wins, and draws.
  • Unified Event Bus: Implemented a thread-safe EventBus pub/sub system with 11 event types
    (e.g., WinnerDrawnEvent, EntryAcceptedEvent) to decouple business logic from notification systems.

Changed

  • Code Quality: Updated ValidateChecksum to use IsNullOrWhiteSpace instead of IsNullOrEmpty,
    ensuring whitespace-only checksums are treated the same as null/empty (allow update with warning).

  • Code Quality: Narrowed #pragma warning disable scope in UpdateServiceTests.cs to only affect
    the specific lines that need suppression, improving code maintainability and making it easier to spot new issues.

  • Build: Updated StreamerBot.csproj to conditionally use Newtonsoft.Json NuGet package for CI builds
    (when local Streamer.bot DLL is unavailable) while maintaining local reference for development builds.

  • Refactoring: Replaced direct Messenger and ObsController calls with event publications (Bus.Publish)
    using simplified event signatures, improving code maintainability and testability.

Infrastructure

  • Code Analysis: Disabled CA1850 diagnostic ("Prefer static HashData method") in .editorconfig as the
    recommended HashData method is not available in .NET Framework 4.8.
  • Code Analysis: Disabled CA1510 diagnostic ("Use ArgumentNullException.ThrowIfNull") in .editorconfig for
    .NET Framework 4.8 compatibility.

Fixed

  • Documentation: Resolved markdown linting warnings in Roadmap.md (duplicate headings, mixed list styles).
  • Stability: Fixed Collection Modified exception in SyncAllVariables by iterating over a snapshot of the
    profiles collection, preventing concurrent modification errors during config sync.

SHA256: aa4f29b4a3a4c49524f9313255942f8746ae8328cda512a6ad7066d13d6b792a


Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki

v1.5.10

09 Feb 04:11
fe6dca5

Choose a tag to compare

Fixed

  • Update Service: Fixed second duplicate update command handler at line 3466 that was still using chat broadcast
    instead of toast notification.
  • Localization: Fixed Loc.Get() parameter ordering bug where format arguments weren't being passed correctly,
    causing placeholders like {0} and {1} to appear literally in toast messages instead of showing actual values.

Improved

  • Code Quality: Added Loc.GetGlobal() helper method to improve readability by eliminating explicit null parameters
    in localization calls.
  • Code Quality: Centralized ToastTitle localization key as a constant (Loc.ToastTitle) for better maintainability.

Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki

v1.5.9

08 Feb 21:35
fe6dca5

Choose a tag to compare

Fixed

  • Update Service: Fixed second duplicate update command handler at line 3466 that was still using chat broadcast
    instead of toast notification.
  • Localization: Fixed Loc.Get() parameter ordering bug where format arguments weren't being passed correctly,
    causing placeholders like {0} and {1} to appear literally in toast messages instead of showing actual values.

Improved

  • Code Quality: Added Loc.GetGlobal() helper method to improve readability by eliminating explicit null parameters
    in localization calls.
  • Code Quality: Centralized ToastTitle localization key as a constant (Loc.ToastTitle) for better maintainability.

Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki

v1.5.8

08 Feb 20:40
2ce1598

Choose a tag to compare

Fixed

  • Update Service: Fixed duplicate toast notifications when running !ga update by adding a thread-safe
    concurrency guard using Interlocked.CompareExchange to prevent CheckForUpdatesAsync from executing simultaneously.

Changed

  • UX: Changed update check notification from chat message to toast notification for a cleaner user experience
    without spamming chat.
  • Localization: All update-related toast messages now use the Loc.Get() localization system for consistency
    and easier customization (added Update_Checking, Update_Downloaded, Update_FailedDownload,
    Update_ErrorTitle, Update_ErrorUnexpected keys).

Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki

v1.5.7

08 Feb 18:21
18ddbc7

Choose a tag to compare

Changed

  • Release Workflow: Updated tools/auto-release.ps1 to create temporary chore/release-vX.Y.Z branches and open
    Pull Requests, replacing the previous release/vX.Y.Z branch strategy to better align with conventional commits.
  • Documentation: Updated CONTRIBUTING.md to reflect the new PR-based release workflow.
  • Documentation: Corrected the configuration directory path in README.md and CONTRIBUTING.md from
    Giveaway Helper to Giveaway Bot.
  • Release Assets: Removed README.md from release artifacts in favor of linking to the
    Wiki in the release notes.
  • Tests: Fixed incorrect directory path in IntegrationTests.cs to match the actual Giveaway Bot folder.

Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki

v1.5.6

08 Feb 17:23
d2ddcf6

Choose a tag to compare

Fixed

  • Linting: Resolved markdownlint errors in CHANGELOG.md (duplicate headings, trailing newlines).
  • Config: Updated .markdownlint-cli2.jsonc to strict JSON format and added to .prettierignore
    to prevent formatter conflicts.
  • Workflow: Changed release workflow to utilize Pull Requests (gh pr create) and automate tagging on merge.

v1.5.5

08 Feb 16:25
6ae52de

Choose a tag to compare

Added

  • Automation: Added tools/auto-release.ps1 for one-click releases.
  • CI: Added workflow_dispatch trigger to release.yml for manual release execution.

v1.5.0

06 Feb 09:24
0586d98

Choose a tag to compare

Added (v1.5.0)

  • Community files: CONTRIBUTING.md, CHANGELOG.md, CODE_OF_CONDUCT.md, SECURITY.md
  • Pull Request template for standardized contributions
  • GitHub Actions workflows for markdown linting and automated releases
  • GitHub Actions workflow for C# 7.3 compatibility checks (validates no C# 8.0+ features in PRs)
  • Comprehensive documentation reorganization into /docs folder
  • Architecture documentation with system diagrams
  • Developer guide for contributors
  • Example configurations covering multiple use cases
  • Visual assets: repository logo, banner, and feature mockups
  • GitHub repository topics for improved discoverability
  • Pre-commit Git hook for real-time C# 8.0+ feature detection before commits
  • VS Code workspace settings for proper bash syntax highlighting in Git hooks

Changed (v1.5.0)

  • Code Quality: Completely refactored SyncProfileVariables to use centralized GiveawayConstants for
    all 30+ profile variable keys.
    • Eliminated ~20 hardcoded "magic strings" (e.g., "Enable Wheel", "Dump Format").
    • Ensures strict consistency between the internal variable generation and the consumption logic.
  • Documentation: Synchronized Wiki and Examples to match v1.5.0 code, specifically correcting API Key variable names and adding dynamic timer examples.
  • Config Instructions: Fixed internal help text in GiveawayBot.cs to correctly reference Giveaway Global WheelApiKey.
  • Reorganized documentation from root to /docs folder
  • Enhanced README with badges, visual assets, and architecture overview
  • Documentation: Comprehensive XML documentation audit for GiveawayBot.cs covering all public methods and properties.
  • Code Quality: Enhanced ParseBoolVariant to return null for invalid inputs, improving config parsing robustness.
  • Security: Upgraded API key encryption to use portable, randomized salt instead of machine-bound key. Includes auto-migration.
  • DEVELOPMENT.md: Enhanced with three-layer C# 7.3 enforcement documentation (build-time, IDE, pre-commit)
  • CONTRIBUTING.md: Expanded C# 7.3 constraints section with pre-commit hook usage and common pitfalls
  • ROADMAP.md: Added Technical Constraints section clarifying C# 7.3 is tied to Streamer.bot runtime
  • README.md: Added Compatibility section explaining C# 7.3 runtime requirement

Fixed (v1.5.0)

  • Timer Crash: Resolved a critical issue where an empty or invalid "Timer Duration" global variable would
    cause the bot to crash during configuration updates. Invalid values now safely disable the timer and log a warning.
  • Metrics Bug: Removed duplicate IncUserMetric call in HandleEntry that was double-counting user entry statistics
  • Config Compatibility: Restored GlobalRunMode constant to "Giveaway Global RunMode" (removed space)
    to maintain backward compatibility with existing user configurations
  • Variable Management: Fixed IsManagedVariable pattern to only match profile-specific variables
    ("Giveaway {Profile} ...") instead of all variables starting with "Giveaway "

Infrastructure (v1.5.0)

  • Build Enforcement: Set LangVersion=7.3 in StreamerBot.csproj to prevent C# 8.0+ compilation
  • Nullable Types: Disabled nullable reference types (Nullable=disable) for C# 7.3 compatibility
  • Implicit Usings: Disabled global using directives (ImplicitUsings=disable) - C# 10.0 feature
  • EditorConfig: Added IDE0074 suppression for null-coalescing assignment operator suggestions
  • Test Suite: Removed all C# 8.0+ syntax (nullable annotations, pragmas) from test files

v1.4.3

04 Feb 06:32

Choose a tag to compare

Added

  • GDPR: !giveaway data delete <user> command for comprehensive data scrubbing (logs, metrics, active entries).
  • Performance: Smart config synchronization with JSON caching to reduce CPU load.
  • Reliability: Consolidated timer logic for better stability.

Changed

  • Security: Upgraded API key encryption to use portable, randomized salt instead of machine-bound key.
  • Documentation: Comprehensive XML documentation audit for GiveawayBot.cs.
  • Code Quality: Enhanced ParseBoolVariant to return null for invalid inputs.

v1.4.2

31 Jan 17:00

Choose a tag to compare

Added (v1.4.0)

  • Auto-Update Notification System: New !giveaway update command to check for updates from GitHub.
  • Update Service: Automatically checks RELEASE_NOTES.md on startup and alerts via Toast/Chat if a new version is available.
  • Privacy-Focused: Downloads updates to a local updates/ folder and notifies via Toast to avoid exposing file paths
    in streaming chat.

Fixed (v1.4.0)

  • Toast Notifications: Fixed CPHAdapter.ShowToastNotification signature to correctly invoke Streamer.bot method
    (was causing crashes).
  • Code Quality: Addressed nullability warnings in UpdateService and refactored it for better encapsulation.