1.3.2 • Published 4 years ago

mixer-chat-client v1.3.2

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

Mixer Chat Client

This is a simple, bare-bones, and fast javascript chat client for Mixer.com.

It works on both front-end and back-end javascript/node projects.

It is currently in use powering every chat connection over at https://pixel.chat

Installation:

With yarn:

yarn add mixer-chat-client

With npm:

npm i mixer-chat-client --save

Usage:

const chatClient = require("mixer-chat-client");

// You will have to get the correct chat server yourself from the mixer API

//Arguments are: Chat server URI, channelID, userID(optional), authToken(optional)
let Chat = new chatClient("wss://chat.mixer.com:443", 60302, 85878, "asdf1234");

Chat.on("connect", () => {
  console.log("connected");
});

Chat.on("welcome", () => {
  console.log("Recieved welcome event, shutting down");
  Chat.close();
});

Chat.connect();

Events:

EventData
msg, whisper{message: [], username: "", level: 00, roles: [], chatId: "", userId: 00, meta: {}, chatLevel: 00}
clear{}
purge{userId: 00}
delete{chatId: ""}
userJoin{username: "", roles: [], channel: 00, id: 00}
userLeave{username: "", roles: [], channel: 00, id: 00}
welcome{}

Methods:

MethodArgumentsResponse
connect
sendtype, method, args[]Promise
close
1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago