Skip to content

Commit

Permalink
file scope namespace; breakout classes into files; update possible va…
Browse files Browse the repository at this point in the history
…lues in comments
  • Loading branch information
swiftyspiffy committed May 19, 2024
1 parent 8ce71fe commit 18d9e55
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,39 @@
using System.Collections.Generic;
using System.Text;

namespace TwitchLib.EventSub.Core.Models.ChannelSuspiciousUser
namespace TwitchLib.EventSub.Core.Models.ChannelSuspiciousUser;

/// <summary>
/// Channel suspicious user base class.
/// </summary>
public abstract class ChannelSuspiciousUserBase
{
/// <summary>
/// Channel suspicious user base class.
/// The ID of the channel where the treatment for a suspicious user was updated.
/// </summary>
public string BroadcasterUserId { get; set; } = string.Empty;
/// <summary>
/// The display name of the channel where the treatment for a suspicious user was updated.
/// </summary>
public string BroadcasterUserName { get; set; } = string.Empty;
/// <summary>
/// The login of the channel where the treatment for a suspicious user was updated.
/// </summary>
public string BroadcasterUserLogin { get; set; } = string.Empty;
/// <summary>
/// The user ID of the user that sent the message.
/// </summary>
public string UserId { get; set; } = string.Empty;
/// <summary>
/// The user name of the user that sent the message.
/// </summary>
public string UserName { get; set; } = string.Empty;
/// <summary>
/// The user login of the user that sent the message.
/// </summary>
public string UserLogin { get; set; } = string.Empty;
/// <summary>
/// The status set for the suspicious user. Can be the following: “no_treatment”, “active_monitoring”, or “restricted”
/// </summary>
public abstract class ChannelSuspiciousUserBase
{
/// <summary>
/// The ID of the channel where the treatment for a suspicious user was updated.
/// </summary>
public string BroadcasterUserId { get; set; } = string.Empty;
/// <summary>
/// The display name of the channel where the treatment for a suspicious user was updated.
/// </summary>
public string BroadcasterUserName { get; set; } = string.Empty;
/// <summary>
/// The login of the channel where the treatment for a suspicious user was updated.
/// </summary>
public string BroadcasterUserLogin { get; set; } = string.Empty;
/// <summary>
/// The user ID of the user that sent the message.
/// </summary>
public string UserId { get; set; } = string.Empty;
/// <summary>
/// The user name of the user that sent the message.
/// </summary>
public string UserName { get; set; } = string.Empty;
/// <summary>
/// The user login of the user that sent the message.
/// </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”
/// </summary>
public string LowTrustStatus { get; set; } = string.Empty;
}
public string LowTrustStatus { get; set; } = string.Empty;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,90 +4,89 @@
using System.Text;
using TwitchLib.EventSub.Core.Models.ChannelSuspiciousUser;

namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel
namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel;

public sealed class ChannelSuspiciousUserMessage : ChannelSuspiciousUserBase
{
public sealed class ChannelSuspiciousUserMessage : ChannelSuspiciousUserBase
/// <summary>
/// A list of channel IDs where the suspicious user is also banned.
/// </summary>
public string[] SharedBanChannelIds { get; set; } = [];
/// <summary>
/// User types (if any) that apply to the suspicious user, can be “manually_added”, “ban_evader_detector”, or “shared_channel_ban”.
/// </summary>
public string[] Types { get; set; } = [];
/// <summary>
/// A ban evasion likelihood value (if any) that as been applied to the user automatically by Twitch, can be “unknown”, “possible”, or “likely”.
/// </summary>
public string BanEvasionEvaluation { get; set; } = string.Empty;
/// <summary>
/// The structured chat message.
/// </summary>
public SuspiciousUserMessage Message { get; set; } = new SuspiciousUserMessage();

public sealed class SuspiciousUserMessage
{
/// <summary>
/// A list of channel IDs where the suspicious user is also banned.
/// </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”.
/// The UUID that identifies the message.
/// </summary>
public string[] Types { get; set; } = [];
public string MessageId { get; set; } = string.Empty;
/// <summary>
/// A ban evasion likelihood value (if any) that as been applied to the user automatically by Twitch, can be “unknown”, “possible”, or “likely”.
/// The chat message in plain text.
/// </summary>
public string BanEvasionEvaluation { get; set; } = string.Empty;
public string Text { get; set; } = string.Empty;
/// <summary>
/// The structured chat message.
/// Ordered list of chat message fragments.
/// </summary>
public SuspiciousUserMessage Message { get; set; } = new SuspiciousUserMessage();
public MessageFragment[] Fragments { get; set; } = [];

public sealed class SuspiciousUserMessage
public sealed class MessageFragment
{
/// <summary>
/// The UUID that identifies the message.
/// The type of message fragment. Possible values: -text -cheermote -emote
/// </summary>
public string MessageId { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;
/// <summary>
/// The chat message in plain text.
/// Message text in fragment.
/// </summary>
public string Text { get; set; } = string.Empty;
/// <summary>
/// Ordered list of chat message fragments.
/// Optional. Metadata pertaining to the cheermote.
/// </summary>
public MessageFragment[] Fragments { get; set; } = [];
public FragmentCheermote Cheermote = new FragmentCheermote();
/// <summary>
/// Optional. Metadata pertaining to the emote.
/// </summary>
public FragmentEmote Emote { get; set; } = new FragmentEmote();

public sealed class MessageFragment
public sealed class FragmentCheermote
{
/// <summary>
/// The type of message fragment. Possible values: -text -cheermote -emote
/// The name portion of the Cheermote string that you use in chat to cheer Bits. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
///
/// For example, if the prefix is “Cheer” and you want to cheer 100 Bits, the full Cheermote string is Cheer100.When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
/// </summary>
public string Type { get; set; } = string.Empty;
public string Prefix { get; set; } = string.Empty;
/// <summary>
/// Message text in fragment.
/// The amount of bits cheered.
/// </summary>
public string Text { get; set; } = string.Empty;
public int Bits { get; set; } = 0;
/// <summary>
/// Optional. Metadata pertaining to the cheermote.
/// The tier level of the cheermote.
/// </summary>
public FragmentCheermote Cheermote = new FragmentCheermote();
public int Tier { get; set; } = 0;
}

public sealed class FragmentEmote
{
/// <summary>
/// Optional. Metadata pertaining to the emote.
/// An ID that uniquely identifies this emote.
/// </summary>
public FragmentEmote Emote { get; set; } = new FragmentEmote();

public sealed class FragmentCheermote
{
/// <summary>
/// The name portion of the Cheermote string that you use in chat to cheer Bits. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
///
/// For example, if the prefix is “Cheer” and you want to cheer 100 Bits, the full Cheermote string is Cheer100.When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
/// </summary>
public string Prefix { get; set; } = string.Empty;
/// <summary>
/// The amount of bits cheered.
/// </summary>
public int Bits { get; set; } = 0;
/// <summary>
/// The tier level of the cheermote.
/// </summary>
public int Tier { get; set; } = 0;
}

public sealed class FragmentEmote
{
/// <summary>
/// An ID that uniquely identifies this emote.
/// </summary>
public string Id { get; set; } = string.Empty;
/// <summary>
/// An ID that identifies the emote set that the emote belongs to.
/// </summary>
public string EmoteSetId { get; set; } = string.Empty;
}
public string Id { get; set; } = string.Empty;
/// <summary>
/// An ID that identifies the emote set that the emote belongs to.
/// </summary>
public string EmoteSetId { get; set; } = string.Empty;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel;

public sealed class SuspiciousUserMessage
{
/// <summary>
/// The UUID that identifies the message.
/// </summary>
public string MessageId { get; set; } = string.Empty;
/// <summary>
/// The chat message in plain text.
/// </summary>
public string Text { get; set; } = string.Empty;
/// <summary>
/// Ordered list of chat message fragments.
/// </summary>
public MessageFragment[] Fragments { get; set; } = [];

public sealed class MessageFragment
{
/// <summary>
/// The type of message fragment. Possible values: -text -cheermote -emote
/// </summary>
public string Type { get; set; } = string.Empty;
/// <summary>
/// Message text in fragment.
/// </summary>
public string Text { get; set; } = string.Empty;
/// <summary>
/// Optional. Metadata pertaining to the cheermote.
/// </summary>
public FragmentCheermote Cheermote = new FragmentCheermote();
/// <summary>
/// Optional. Metadata pertaining to the emote.
/// </summary>
public FragmentEmote Emote { get; set; } = new FragmentEmote();

public sealed class FragmentCheermote
{
/// <summary>
/// The name portion of the Cheermote string that you use in chat to cheer Bits. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
///
/// For example, if the prefix is “Cheer” and you want to cheer 100 Bits, the full Cheermote string is Cheer100.When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
/// </summary>
public string Prefix { get; set; } = string.Empty;
/// <summary>
/// The amount of bits cheered.
/// </summary>
public int Bits { get; set; } = 0;
/// <summary>
/// The tier level of the cheermote.
/// </summary>
public int Tier { get; set; } = 0;
}

public sealed class FragmentEmote
{
/// <summary>
/// An ID that uniquely identifies this emote.
/// </summary>
public string Id { get; set; } = string.Empty;
/// <summary>
/// An ID that identifies the emote set that the emote belongs to.
/// </summary>
public string EmoteSetId { get; set; } = string.Empty;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel;

public sealed class MessageFragment
{
/// <summary>
/// The type of message fragment. Possible values: -text -cheermote -emote
/// </summary>
public string Type { get; set; } = string.Empty;
/// <summary>
/// Message text in fragment.
/// </summary>
public string Text { get; set; } = string.Empty;
/// <summary>
/// Optional. Metadata pertaining to the cheermote.
/// </summary>
public FragmentCheermote Cheermote = new FragmentCheermote();
/// <summary>
/// Optional. Metadata pertaining to the emote.
/// </summary>
public FragmentEmote Emote { get; set; } = new FragmentEmote();

public sealed class FragmentCheermote
{
/// <summary>
/// The name portion of the Cheermote string that you use in chat to cheer Bits. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
///
/// For example, if the prefix is “Cheer” and you want to cheer 100 Bits, the full Cheermote string is Cheer100.When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
/// </summary>
public string Prefix { get; set; } = string.Empty;
/// <summary>
/// The amount of bits cheered.
/// </summary>
public int Bits { get; set; } = 0;
/// <summary>
/// The tier level of the cheermote.
/// </summary>
public int Tier { get; set; } = 0;
}

public sealed class FragmentEmote
{
/// <summary>
/// An ID that uniquely identifies this emote.
/// </summary>
public string Id { get; set; } = string.Empty;
/// <summary>
/// An ID that identifies the emote set that the emote belongs to.
/// </summary>
public string EmoteSetId { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel;

public sealed class FragmentCheermote
{
/// <summary>
/// The name portion of the Cheermote string that you use in chat to cheer Bits. The full Cheermote string is the concatenation of {prefix} + {number of Bits}.
///
/// For example, if the prefix is “Cheer” and you want to cheer 100 Bits, the full Cheermote string is Cheer100.When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
/// </summary>
public string Prefix { get; set; } = string.Empty;
/// <summary>
/// The amount of bits cheered.
/// </summary>
public int Bits { get; set; } = 0;
/// <summary>
/// The tier level of the cheermote.
/// </summary>
public int Tier { get; set; } = 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TwitchLib.EventSub.Core.SubscriptionTypes.Channel;

public sealed class FragmentEmote
{
/// <summary>
/// An ID that uniquely identifies this emote.
/// </summary>
public string Id { get; set; } = string.Empty;
/// <summary>
/// An ID that identifies the emote set that the emote belongs to.
/// </summary>
public string EmoteSetId { get; set; } = string.Empty;
}
Loading

0 comments on commit 18d9e55

Please sign in to comment.