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

CodePwn2021/light-omega

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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