Skip to content

KickChatSpy is a lightweight, dependency-free C# library for receiving real-time chat messages from Kick livestreams — ideal for building chatbots, moderation tools, and live interaction apps.

License

Notifications You must be signed in to change notification settings

xmacura/KickChatSpy

Repository files navigation

KickChatSpy

KickChatSpy is a lightweight C# library for listening to live chat messages from Kick.com using a WebSocket connection.

Installation

You can install the package via NuGet:

dotnet add package KickChatSpy

Example

Subscribe by channel name:

using KickChatSpy;

var kickChat = new KickChatClient();

var channelname = "chrimsie";
await kickChat.ConnectToChatroomAsync(channelname);

kickChat.OnMessageReceived += msg =>
{
    if (IsModerator(msg.Sender))
    {
        Console.WriteLine($"[{msg.CreatedAt:T}][Mod] {msg.Sender.Username}: {msg.Content}");
    }
    else
    {
        Console.WriteLine($"[{msg.CreatedAt:T}] {msg.Sender.Username}: {msg.Content}");
    }
};

bool IsModerator(Sender sender)
{
    if (sender?.Identity?.Badges == null)
        return false;

    return sender.Identity.Badges
        .Any(b => string.Equals(b.Type, "moderator", StringComparison.OrdinalIgnoreCase));
}

Or subscribe directly by chatroom ID:

var chatroomId = 692373;
await kickChat.ConnectToChatroomAsync(chatroomId);

License

MIT License

About

KickChatSpy is a lightweight, dependency-free C# library for receiving real-time chat messages from Kick livestreams — ideal for building chatbots, moderation tools, and live interaction apps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages