Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (29 loc) · 1.06 KB

README.md

File metadata and controls

31 lines (29 loc) · 1.06 KB

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