PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.92k stars 904 forks source link

bot.on('message') does not receive interactive onClick texts #1584

Open SinanAkkoyun opened 3 years ago

SinanAkkoyun commented 3 years ago

Versions

Detailed description of a problem

When I try to invite my bot to my party on hypixel.net, I do not receive clickable messages like "join party of xxx" etc. I do log every received message as shown:

What did you try yet?

/

Your current code


bot.on('message', message => {
  if(argv.cli) {
    console.log(message.text)
  }
})

Expected behavior

The bot should receive clickable messages such as "join party of xxx".

Additional context

I only saw it on hypixel.net, where the bot does not receive any click related messages

TheDudeFromCI commented 3 years ago

Use message.toString() instead of message.text

u9g commented 3 years ago

Can you log the chat packet so this can be debugged or make a way to emulate this?

FourCinnamon0 commented 3 years ago

Yeah use message.json