CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PrismarineJS

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: PrismarineJS/mineflayer
Path: blob/master/examples/modular_mineflayer/modules/hello.js
Views: 789
1
const mineflayer = require('mineflayer') // eslint-disable-line
2
3
/**
4
* @param {mineflayer.Bot} bot // to enable intellisense
5
*/
6
7
module.exports = bot => {
8
bot.addChatPattern('hello', /<(.+)> (?:Hello|hello)/, { parse: true })
9
10
bot.on('chat:hello', ([[playerIgn]]) => {
11
bot.chat(`Hi, ${playerIgn}`)
12
})
13
}
14
15