Skip to content

Commit

Permalink
Merge pull request #32 from AoshiW/WhisperReceived
Browse files Browse the repository at this point in the history
add `Whisper Received`
  • Loading branch information
swiftyspiffy authored Sep 6, 2024
2 parents e1a92de + 156da18 commit 558d8a5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
12 changes: 12 additions & 0 deletions TwitchLib.EventSub.Core/Models/Whisper/WhisperMessage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace TwitchLib.EventSub.Core.Models.Whisper;

/// <summary>
/// Represents a whisper message
/// </summary>
public sealed class WhisperMessage
{
/// <summary>
/// The body of the whisper message.
/// </summary>
public string Text { get; set; } = string.Empty;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using TwitchLib.EventSub.Core.Models.Whisper;

namespace TwitchLib.EventSub.Core.SubscriptionTypes.User;

/// <summary>
/// Channel Whisper Received subscription type model
/// <para>Description:</para>
/// <para>The user.whisper.message subscription type sends a notification when a user receives a whisper.</para>
/// </summary>
public sealed class UserWhisperMessage
{
/// <summary>
/// The ID of the user sending the message.
/// </summary>
public string FromUserId { get; set; } = string.Empty;
/// <summary>
/// The name of the user sending the message.
/// </summary>
public string FromUserLogin { get; set; } = string.Empty;
/// <summary>
/// The login of the user sending the message.
/// </summary>
public string FromUserName { get; set; } = string.Empty;
/// <summary>
/// The ID of the user receiving the message.
/// </summary>
public string ToUserId { get; set; } = string.Empty;
/// <summary>
/// The login of the user receiving the message.
/// </summary>
public string ToUserLogin { get; set; } = string.Empty;
/// <summary>
/// The name of the user receiving the message.
/// </summary>
public string ToUserName { get; set; } = string.Empty;
/// <summary>
/// The whisper ID.
/// </summary>
public string WhisperId { get; set; } = string.Empty;
/// <summary>
/// The structured whisper message
/// </summary>
public WhisperMessage Whisper { get; set; } = new();
}

0 comments on commit 558d8a5

Please sign in to comment.