项目作者: edqx

项目描述 :
An implementation of the Among Us protocol in typescript.
高级语言: TypeScript
项目地址: git://github.com/edqx/amongus-protocol.git
创建时间: 2020-10-14T11:56:05Z
项目社区:https://github.com/edqx/amongus-protocol

开源协议:MIT License

下载


AmongUs-Protocol

This project is discontinued, please see SkeldJS/SkeldJS for more updates.

Alt text

See the wiki for more information on the protocol.

Documentation is available for preview at http://weakeyes.dev/amongus-protocol/

An implementation of the Among Us protocol made in Typescript

  • Lightweight, 0 external dependencies.
  • Comprehensive coverage of the Among Us protocol.
  • Features full object and component system.
  • Easy to install & use.

Data gathered from

Install

With NPM:
npm install --save amongus-protocol

Or clone with Git:
git clone https://github.com/edqx/amongus-protocol

Example

  1. import {
  2. AmongusClient,
  3. MasterServers,
  4. ColourID,
  5. HatID,
  6. } from "amongus-protocol"
  7. const server = MasterServers.EU[0];
  8. const client = new AmongusClient({
  9. debug: false
  10. });
  11. await client.connect(server[0], server[1], "weakeyes");
  12. const game = await client.join(process.argv[2]);
  13. game.me.on("spawn", () => {
  14. game.me.setName("weakeyes");
  15. game.me.setColour(ColourID.Black);
  16. game.me.setHat(HatID.Plague);
  17. });

Notes

Recommended node: v14+
Recommended TS: 4.0+

This repository is licensed under the MIT license, I am not responsible for anything you do using this library.