Added support for MOTD and whispers. Commands can opt into responding to whispers and there's a helper method to handle replying through the correct channel.

This commit is contained in:
barelyprofessional
2026-03-18 23:50:32 -05:00
parent 4cdb04e3c5
commit 01a4b26326
44 changed files with 683 additions and 148 deletions

View File

@@ -0,0 +1,34 @@
using System.Text.Json.Serialization;
namespace KfChatDotNetWsClient.Models.Json;
// {
// "whisper": {
// "author": {
// "id": 58227,
// "username": "Flaming Dumpster",
// "avatar_url": "/data/avatars/m/58/58227.jpg?1771372231"
// },
// "recipient": {
// "id": 1,
// "username": "Null",
// "avatar_url": "/data/avatars/m/0/1.jpg?1767201853"
// },
// "message": "nigger",
// "message_raw": "nigger",
// "message_date": 1773881876
// }
// }
public class WhisperJsonModel
{
[JsonPropertyName("author")]
public required MessagesJsonModel.AuthorModel Author { get; set; }
[JsonPropertyName("recipient")]
public required MessagesJsonModel.AuthorModel Recipient { get; set; }
[JsonPropertyName("message")]
public required string Message { get; set; }
[JsonPropertyName("message_raw")]
public required string MessageRaw { get; set; }
[JsonPropertyName("message_date")]
public required int MessageDate { get; set; }
}