Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

81 feature sub alerts #148

Merged
merged 7 commits into from
Aug 20, 2023
Merged

81 feature sub alerts #148

merged 7 commits into from
Aug 20, 2023

Conversation

rGunti
Copy link
Owner

@rGunti rGunti commented Aug 20, 2023

No description provided.

Twitch subscriptions (including re-subscription, gift and community subscriptions) will now create custom chat messages that will be dispatched to the message bus. Other agents may collect such events so that they can act upon such events.
DistributedCommandRegistryAdapter was removed from ExecutorAgent as it was no longer used. This simplifies the code and improves readability and maintainability.
Implemented a filter condition in the OnNotificationReceived method of the CommandParsingAgent class. This change ensures that only chat message notifications are processed. Previously all events were accepted, leading to possible unintended behaviour. Now non-chat messages are logged and ignored, enhancing performance and control.
Implemented Twitch Alert feature, which includes separate Agent and Core projects. The Core project contains the fundamental logic and entities for handling Twitch Alerts, while the Agent is responsible for running the listener service. The listener service targets specific chat message events and potentially responds to them. Message count filtering is updated to only count actual chat messages. Also added an upsert method in LiteDb and MongoDB repositories for more straightforward data updates. Code structure in FloppyBot.sln has been amended for better organization. Docker image for Twitch Alerts has been included in the automated build and release workflow. This addition will provide more detailed and efficient alert handling for Twitch events.
@rGunti rGunti self-assigned this Aug 20, 2023
@rGunti rGunti linked an issue Aug 20, 2023 that may be closed by this pull request
Moved the methods 'DetermineTemplate', 'GetTier', and 'ParseTwitchEvent' above instance variables in TwitchAlertListener for better code readability and cohesion. No behavior changes were made, just improving the organization and structure of the code.
Updated the TwitchAlertSettings and the TwitchAlertListener to allow for easier message customization. In TwitchAlertSettings, default values for the optional messages were added to avoid potential null reference issues. For the TwitchAlertListener, added logic for formatting alert messages with user's display name before sending the chat message. This change allows for a more personalized alert message.

Also, created a new file for Command `subalert` to set, clear, or reset the alert message. In addition, a reference to FloppyBot.Base.Extensions have been added to both projects `FloppyBot.Aux.TwitchAlerts.Core.csproj` and `FloppyBot.Commands.Aux.Twitch.csproj` to make use of the newly created ObjectExtensions for a more efficient retrieval of properties.

This overall modification provides streamers with the ability to customize the alert message when someone subscribes, enhancing user interaction and experience.
@rGunti rGunti merged commit 03264bf into main Aug 20, 2023
3 checks passed
@rGunti rGunti deleted the 81-feature-sub-alerts branch August 20, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Sub Alerts
1 participant