light-omega
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

Light Omega

npm version dm node engine

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...

Chat

group:766363535

Package Sidebar

Install

npm i light-omega

Weekly Downloads

4

Version

0.2.3

License

Apache-2.0

Unpacked Size

39.2 kB

Total Files

11

Last publish

Collaborators

  • codepwn