2023-08-26 17:06:12 +01:00
|
|
|
namespace VPLink.Common.Data;
|
2023-08-26 14:11:43 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Represents a message that is relayed between Discord and Virtual Paradise.
|
|
|
|
/// </summary>
|
|
|
|
public readonly struct RelayedMessage
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="RelayedMessage" /> struct.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="author">The author.</param>
|
|
|
|
/// <param name="content">The content.</param>
|
2023-08-27 16:50:17 +01:00
|
|
|
/// <param name="isReply">A value indicating whether this message is a reply.</param>
|
|
|
|
public RelayedMessage(string? author, string content, bool isReply)
|
2023-08-26 14:11:43 +01:00
|
|
|
{
|
|
|
|
Author = author;
|
|
|
|
Content = content;
|
2023-08-27 16:50:17 +01:00
|
|
|
IsReply = isReply;
|
2023-08-26 14:11:43 +01:00
|
|
|
}
|
|
|
|
|
2023-08-27 16:50:17 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the user that sent the message.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The user that sent the message.</value>
|
|
|
|
public string? Author { get; }
|
|
|
|
|
2023-08-26 14:11:43 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the message content.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The message content.</value>
|
|
|
|
public string Content { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
2023-08-27 16:50:17 +01:00
|
|
|
/// Gets a value indicating whether this message is a reply.
|
2023-08-26 14:11:43 +01:00
|
|
|
/// </summary>
|
2023-08-27 16:50:17 +01:00
|
|
|
/// <value><see langword="true" /> if this message is a reply; otherwise, <see langword="false" />.</value>
|
|
|
|
public bool IsReply { get; }
|
2023-08-26 14:11:43 +01:00
|
|
|
}
|