wyrt_chat

v1.0.0Social

Multi-channel chat system for multiplayer games

Features

  • Multiple channel types (global, local, team, party, whisper)
  • Message history with pagination
  • Spam prevention and rate limiting
  • Profanity filtering hooks
  • Mute/block functionality
  • Chat commands system

Quick Start

// In your game module's initialize():
const chatModule = context.getModule('wyrt_chat');
this.chatManager = chatModule.createChatManager('my_game');

// Send a message to a channel
this.chatManager.sendMessage(playerId, 'global', 'Hello world!');

// Get recent messages
const messages = this.chatManager.getHistory('global', 50);

// Handle incoming chat
this.chatManager.on('message', (msg) => {
  broadcastToChannel(msg.channel, msg);
});

Exports

ChatManager

Main chat management class