Skip to content

A library for sending messages to various chat services. Minimal dependencies.

License

Notifications You must be signed in to change notification settings

pistasjis/brunost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brunost (Brown Cheese)

Brunost is a JavaScript library that lets you send messages to various chat services, which is useful for sending notifications to yourself or your team. Oh also, it has a cool name and has minimal dependencies.

Currently supported services are:

  • Matrix

More services will be added in the future. If you have a suggestion for a service, please open an issue and I'll look into it.

Usage

First we need to install the library.

npm install brunost

Then we can use it in our code.

const brunost = require('brunost');

brunost.sendMatrixMessage("matrix.org", "token", "roomid", "Hello world!");

What about TypeScript? No problem!

import { sendMatrixMessage } from 'brunost';

sendMatrixMessage("matrix.org", "token", "roomid", "Hello world!");

API

sendMatrixMessage

sendMatrixMessage(server: string, token: string, roomid: string, message: string): Promise<void>

Sends a message to a Matrix room. Room ID can be found in the room settings (do not use room alias, aka #room:server.org).

About

A library for sending messages to various chat services. Minimal dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published