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

3.1.1 • Public • Published

Hyflayer

Version License: ISC CodeFactor

A mineflayer plugin to handle chat on the Hypixel server.

Install

npm i hyflayer
# or
yarn add hyflayer

Usage

const mineflayer = require('mineflayer')
const hyflayer = require('hyflayer')

/** @type {import('hyflayer').HyflayerBot} */
const bot = mineflayer.createBot({...})
bot.loadPlugin(hyflayer)

Example

const mineflayer = require('mineflayer')
const hyflayer = require('hyflayer')

/** @type {import('hyflayer').HyflayerBot} */
const bot = mineflayer.createBot()
bot.loadPlugin(hyflayer)

bot.on('partyChatMessage', (message, { username, hypixelRank }) => {
  console.log(hypixelRank ?? '[No Rank]', username + ':', message)
})

bot.on('spawn', () => {
  bot.sendToGuild('Hi!')
})

Roadmap

  • [ ] Add better testing, possibly with something like Jest
  • [ ] Add support for DM messages
  • [ ] Add a delay between sending split messages to stop You are sending commands too quickly, please slow down.

License

Copyright © 2021 Lily Smart.

This project is ISC licensed.

Package Sidebar

Install

npm i hyflayer

Weekly Downloads

2

Version

3.1.1

License

ISC

Unpacked Size

9.65 kB

Total Files

7

Last publish

Collaborators

  • neyoa