Releases: Sythsaz/Giveaway-Bot
v1.5.11
Added
- Tests: Added comprehensive unit tests for
UpdateServiceSHA256 checksum validation, including tests for
checksum extraction, file verification, and invalid format handling. - Tests: Enhanced
UpdateServiceTestswith whitespace-only checksum test cases (space, tab, mixed whitespace)
to ensure edge cases are properly handled. - Metrics Service: Implemented
MetricsServiceandMetricsContainerfor comprehensive cross-profile analytics,
tracking global entries, wins, and draws. - Unified Event Bus: Implemented a thread-safe
EventBuspub/sub system with 11 event types
(e.g.,WinnerDrawnEvent,EntryAcceptedEvent) to decouple business logic from notification systems.
Changed
-
Code Quality: Updated
ValidateChecksumto useIsNullOrWhiteSpaceinstead ofIsNullOrEmpty,
ensuring whitespace-only checksums are treated the same as null/empty (allow update with warning). -
Code Quality: Narrowed
#pragma warning disablescope inUpdateServiceTests.csto only affect
the specific lines that need suppression, improving code maintainability and making it easier to spot new issues. -
Build: Updated
StreamerBot.csprojto 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
MessengerandObsControllercalls 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
.editorconfigas the
recommendedHashDatamethod is not available in .NET Framework 4.8. - Code Analysis: Disabled CA1510 diagnostic ("Use ArgumentNullException.ThrowIfNull") in
.editorconfigfor
.NET Framework 4.8 compatibility.
Fixed
- Documentation: Resolved markdown linting warnings in
Roadmap.md(duplicate headings, mixed list styles). - Stability: Fixed
Collection Modifiedexception inSyncAllVariablesby 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
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 explicitnullparameters
in localization calls. - Code Quality: Centralized
ToastTitlelocalization key as a constant (Loc.ToastTitle) for better maintainability.
Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki
v1.5.9
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 explicitnullparameters
in localization calls. - Code Quality: Centralized
ToastTitlelocalization key as a constant (Loc.ToastTitle) for better maintainability.
Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki
v1.5.8
Fixed
- Update Service: Fixed duplicate toast notifications when running
!ga updateby adding a thread-safe
concurrency guard usingInterlocked.CompareExchangeto preventCheckForUpdatesAsyncfrom 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 (addedUpdate_Checking,Update_Downloaded,Update_FailedDownload,
Update_ErrorTitle,Update_ErrorUnexpectedkeys).
Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki
v1.5.7
Changed
- Release Workflow: Updated
tools/auto-release.ps1to create temporarychore/release-vX.Y.Zbranches and open
Pull Requests, replacing the previousrelease/vX.Y.Zbranch strategy to better align with conventional commits. - Documentation: Updated
CONTRIBUTING.mdto reflect the new PR-based release workflow. - Documentation: Corrected the configuration directory path in
README.mdandCONTRIBUTING.mdfrom
Giveaway HelpertoGiveaway Bot. - Release Assets: Removed
README.mdfrom release artifacts in favor of linking to the
Wiki in the release notes. - Tests: Fixed incorrect directory path in
IntegrationTests.csto match the actualGiveaway Botfolder.
Full Documentation: https://github.com/Sythsaz/Giveaway-Bot/wiki
v1.5.6
Fixed
- Linting: Resolved
markdownlinterrors inCHANGELOG.md(duplicate headings, trailing newlines). - Config: Updated
.markdownlint-cli2.jsoncto 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
Added
- Automation: Added
tools/auto-release.ps1for one-click releases. - CI: Added
workflow_dispatchtrigger torelease.ymlfor manual release execution.
v1.5.0
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
/docsfolder - 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
SyncProfileVariablesto use centralizedGiveawayConstantsfor
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.csto correctly referenceGiveaway Global WheelApiKey. - Reorganized documentation from root to
/docsfolder - Enhanced README with badges, visual assets, and architecture overview
- Documentation: Comprehensive XML documentation audit for
GiveawayBot.cscovering all public methods and properties. - Code Quality: Enhanced
ParseBoolVariantto returnnullfor 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
IncUserMetriccall inHandleEntrythat was double-counting user entry statistics - Config Compatibility: Restored
GlobalRunModeconstant to"Giveaway Global RunMode"(removed space)
to maintain backward compatibility with existing user configurations - Variable Management: Fixed
IsManagedVariablepattern to only match profile-specific variables
("Giveaway {Profile} ...") instead of all variables starting with"Giveaway "
Infrastructure (v1.5.0)
- Build Enforcement: Set
LangVersion=7.3in 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
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
ParseBoolVariantto returnnullfor invalid inputs.
v1.4.2
Added (v1.4.0)
- Auto-Update Notification System: New
!giveaway updatecommand to check for updates from GitHub. - Update Service: Automatically checks
RELEASE_NOTES.mdon 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.ShowToastNotificationsignature to correctly invoke Streamer.bot method
(was causing crashes). - Code Quality: Addressed nullability warnings in
UpdateServiceand refactored it for better encapsulation.