1.2.1 • Published 4 years ago

@mfd/rbxmessagingservice v1.2.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

About

RbxMessagingService is a node module that That allows you to use MessagingService outside of Roblox. This project was created because people outside ROBLOX always want to use MessagingService outside ROBLOX.

RbxMessagingService allows you to do things you would normally do on the Roblox MessagingService through a Node.js interface.

Installation

With node.js installed simply run:

# Run this to install RbxMessagingService locally to your repository.
$ npm install @mfd/rbxmessagingservice --save

# Run this instead to install RbxMessagingService globally so you can use it anywhere.
$ npm install @mfd/rbxmessagingservice -g

That's it!

Documentation

You can find the current RbxMessagingService documentation here (Roblox Wiki) or here (API Reference)

Initial setup

  1. Run RbxMessagingService.InitializeAsync with the parameters of Cookie and PlaceId. This will store your cookie internally and validate it, but will perform no cookie refresh automatically, it also requires that your cookie have the warning and be valid.
  2. While this works, Roblox .ROBLOSECURITY cookies expire after 30 years of first authenticating them.
  3. You need to store this new cookie somewhere - whether it be in a database, or a JSON file.

Note: By default, InitializeAsync will validate the cookie you provide by making a HTTP request.

Example

This example makes use of the new async-await syntax.

const { MessagingService, InitializeAsync } = require('@mfd/rbxmessagingservice');
async function startApp() {
	await InitializeAsync(
		'_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_...',
		123,
	);
	// Do everything else, calling functions and the like.
	await MessagingService.SubscribeAsync('TopicExample', function (message, sent) {
		console.log(`Message for TopicExample: ${message}, sent at: ${sent}`);
	});
	await MessagingService.PublishAsync('TopicExample', 'Some EPIC data!');
}

Credits

  • nsg - ROBLOX Contractor for the engine team.
1.2.0

4 years ago

1.2.1

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.0-beta.1

4 years ago

1.1.2

4 years ago

1.0.1-beta.1

4 years ago

1.0.0

4 years ago