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

add Whisper Received #32

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
Loading