Comments (3)
This should definitely be sent on the message
event. I recommend adding
bot.on('message', console.log)
To check. The message position should be set to system
.
from mineflayer.
Hello, thanks for the fast answer. My code is looking like this, what do you mean by position to system? Best wishes x
this.bot.on('message', async( system, message, username) =>{
if (username === this.bot.username) return
if(message=== " A game is starting in 60 seconds! Join by typing /join")
{
//what he does
}
from mineflayer.
Did it myself. If anyone wants to know the code:
`this.bot.on('message', async( jsonMsg, message, ) =>{
console.log(jsonMsg.toString()) // Example chat message
const mesg = jsonMsg.toString();
if(mesg==="SUCCESS! You just received 1 > Common Crate < key(s)!")
{
this.bot.chat("/home")
}`
from mineflayer.
Related Issues (20)
- `soundEffectHeard` event is not emitted in 1.20.4
- Can't read entity.uuid
- Bot detects Blocks at Y=-1 as air until the bot's Y is less than 0.
- Bot not send captha cod in chat HOT 2
- chest event 1.12.2 HOT 2
- /dell
- Minecraft PVP bot not hunting mobs
- skinData always gives undefined instead of the actual skin
- scoreboard error HOT 2
- Multiple Bots crash HOT 1
- pickRealm silently fails to connect HOT 3
- bot.sleep() can make memory leak
- Error: Can't find potato in slots [54 - 90], (item id: 1091) HOT 1
- Some items are not appearing in the slots - (Possibly resolved) HOT 3
- Attacking on Pre Motion instead of Post. HOT 3
- Error: Event windowOpen did not fire within timeout of 20000ms HOT 1
- villager trade() improvement request
- TypeError: Cannot read properties of undefined (reading 'blocksByName') HOT 1
- Joining serverr: ERROR is not valid JSON HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mineflayer.