light-omega
v0.2.3
Published
Omega ws client in FastBuilder.
Downloads
8
Readme
Light Omega
Install:
> npm i light-omega # yarn add light-omega
Example
const { createClient } = require('light-omega');
// client的大部分函数需要在ready事件之后才能执行
omg.on('omega.ready', onReady);
async function onReady() {
// 在这里随便干点什么
const res = await omg.sendPacket('get_players_list', {});
console.log(JSON.stringify(res));
const player = await omg.getPlayerByName(omg.bot_name);
console.log(player);
const echo = await omg.sendPacket('echo', {
message: 'hello, light-omega!'
});
console.log(echo);
}
Docs
coming soon...