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

feat: ChannelSuspiciousUserMessage, ChannelSuspiciousUserUpdate #29

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

swiftyspiffy
Copy link
Member

@swiftyspiffy swiftyspiffy commented May 12, 2024

Adds ChannelSuspiciousUserMessage and ChannelSuspiciousUserUpdate. Both tested.

Needs to be merged BEFORE TwitchLib/TwitchLib.EventSub.Websockets#31

using System.Text;
using TwitchLib.EventSub.Core.Models.ChannelSuspiciousUser;

namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel

This comment was marked as resolved.

using System.Collections.Generic;
using System.Text;

namespace TwitchLib.EventSub.Core.Models.ChannelSuspiciousUser
Copy link

@AoshiW AoshiW May 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TwitchLib.EventSub.Core uses file scope namespace

using System.Text;
using TwitchLib.EventSub.Core.Models.ChannelSuspiciousUser;

namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel
Copy link

@AoshiW AoshiW May 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TwitchLib.EventSub.Core uses file scope namespace

/// </summary>
public SuspiciousUserMessage Message { get; set; } = new SuspiciousUserMessage();

public sealed class SuspiciousUserMessage
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why isn't the class in its own file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed like it wasn't a pattern in the directory, but i didn't check super thoroughly. Will break these out.

Copy link

@iProdigy iProdigy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a little heads-up based on twitchdev/issues#944

/// </summary>
public string UserLogin { get; set; } = string.Empty;
/// <summary>
/// The status set for the suspicious user. Can be the following: “none”, “active_monitoring”, or “restricted”

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: no_treatment is sent rather than none, despite what docs claim

/// </summary>
public string[] SharedBanChannelIds { get; set; } = [];
/// <summary>
/// User types (if any) that apply to the suspicious user, can be “manual”, “ban_evader_detector”, or “shared_channel_ban”.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: manually_added is sent rather than manual, despite what docs claim

@Mahsaap Mahsaap merged commit e1a92de into dev Jun 12, 2024
1 check passed
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.

4 participants