Skip to content

Commit

Permalink
moved classes to models directory; optional fields no longer have def…
Browse files Browse the repository at this point in the history
…ault values
  • Loading branch information
swiftyspiffy committed May 19, 2024
1 parent 18d9e55 commit 86380c3
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 194 deletions.
21 changes: 21 additions & 0 deletions TwitchLib.EventSub.Core/Models/ChannelSuspiciousUser/Message.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TwitchLib.EventSub.Core.Models.ChannelSuspiciousUser;

public sealed class SuspiciousUserMessage

Check warning on line 7 in TwitchLib.EventSub.Core/Models/ChannelSuspiciousUser/Message.cs

View workflow job for this annotation

GitHub Actions / check-buildstatus

Missing XML comment for publicly visible type or member '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; } = [];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TwitchLib.EventSub.Core.Models.ChannelSuspiciousUser;

public sealed class MessageFragment

Check warning on line 7 in TwitchLib.EventSub.Core/Models/ChannelSuspiciousUser/MessageFragment.cs

View workflow job for this annotation

GitHub Actions / check-buildstatus

Missing XML comment for publicly visible type or member '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 { get; set; }
/// <summary>
/// Optional. Metadata pertaining to the emote.
/// </summary>
public FragmentEmote? Emote { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;

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

public sealed class FragmentCheermote

Check warning on line 7 in TwitchLib.EventSub.Core/Models/ChannelSuspiciousUser/MessageFragmentCheermote.cs

View workflow job for this annotation

GitHub Actions / check-buildstatus

Missing XML comment for publicly visible type or member 'FragmentCheermote'
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;

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

public sealed class FragmentEmote

Check warning on line 7 in TwitchLib.EventSub.Core/Models/ChannelSuspiciousUser/MessageFragmentEmote.cs

View workflow job for this annotation

GitHub Actions / check-buildstatus

Missing XML comment for publicly visible type or member 'FragmentEmote'
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,70 +24,4 @@ public sealed class ChannelSuspiciousUserMessage : ChannelSuspiciousUserBase
/// The structured chat message.
/// </summary>
public SuspiciousUserMessage Message { get; set; } = new SuspiciousUserMessage();

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;
}
}
}
}

This file was deleted.

This file was deleted.

0 comments on commit 86380c3

Please sign in to comment.