Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat message parameter is empty in 'chat' and 'whisper' events #3493

Open
mdmanl opened this issue Oct 31, 2024 · 11 comments
Open

Chat message parameter is empty in 'chat' and 'whisper' events #3493

mdmanl opened this issue Oct 31, 2024 · 11 comments
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f

Comments

@mdmanl
Copy link

mdmanl commented Oct 31, 2024

Versions

  • mineflayer: 4.23.0
  • server: vanilla 1.21.1
  • node: 20.0.0

Detailed description of a problem

When using the bot.on('chat') event, the message parameter is always empty, while the username is correctly captured.

What did you try yet?

I tried logging the parameters in the chat event and sending messages in chat, but the message parameter is consistently empty.

Your current code

const mineflayer = require('mineflayer')

const bot = mineflayer.createBot({
  host: 'localhost', // minecraft server ip
  username: 'Bot', // username to join as if auth is `offline`, else a unique identifier for this account. Switch if you want to change accounts
  auth: 'microsoft' // for offline mode servers, you can set this to 'offline'
})

bot.on('chat', (username, message) => {
  if (username === bot.username) return
  bot.chat(message)
})

// Log errors and kick reasons:
bot.on('kicked', console.log)
bot.on('error', console.log)

Expected behaviour

I expected the message parameter to contain the text of the message sent by other players in the chat.

@mdmanl mdmanl added possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Oct 31, 2024
@BallisticOK
Copy link

i have the same problem right now

@rom1504
Copy link
Member

rom1504 commented Nov 1, 2024 via email

@mdmanl
Copy link
Author

mdmanl commented Nov 1, 2024

Tests show it works with vanilla. Please provide more information on how to reproduce

On Fri, Nov 1, 2024, 12:57 0x00sec @.> wrote: i have the same problem right now — Reply to this email directly, view it on GitHub <#3493 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437RRYEJN5H2WVLJG4BTZ6NUBXAVCNFSM6AAAAABQ57R526VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJRG42TOMRVG4 . You are receiving this because you are subscribed to this thread.Message ID: @.>

I tested it on multiple Vanilla servers, just to find out just now that it's caused by a mod in my own client "No Chat Reports"

@mdmanl
Copy link
Author

mdmanl commented Nov 1, 2024

i have the same problem right now

Are you using the mod "No Chat Reports"?

@mdmanl
Copy link
Author

mdmanl commented Nov 5, 2024

Is No Chat Reports causing this, still considered a bug that needs to be fixed, or can I close this?

@u9g
Copy link
Member

u9g commented Nov 7, 2024

image

Please give a working repro.

@mdmanl
Copy link
Author

mdmanl commented Nov 7, 2024

image

Please give a working repro.

Repro is already in this thread. As stated before it's the client mod of No Chat Reports. From what it looks from your screenshot, you are playing around with the Paper plugin instead?

@u9g
Copy link
Member

u9g commented Nov 7, 2024

image
Please give a working repro.

Repro is already in this thread. As stated before it's the client mod of No Chat Reports. From what it looks from your screenshot, you are playing around with the Paper plugin instead?

I am using the client mod, No Chat Reports.

image

@mdmanl
Copy link
Author

mdmanl commented Nov 7, 2024

image
Please give a working repro.

Repro is already in this thread. As stated before it's the client mod of No Chat Reports. From what it looks from your screenshot, you are playing around with the Paper plugin instead?

I am using the client mod, No Chat Reports.

image

Fabric or Forge? No Chat Reports version? More info.

@u9g
Copy link
Member

u9g commented Nov 7, 2024

image
Please give a working repro.

Repro is already in this thread. As stated before it's the client mod of No Chat Reports. From what it looks from your screenshot, you are playing around with the Paper plugin instead?

I am using the client mod, No Chat Reports.
image

Fabric or Forge? No Chat Reports version? More info.

Fabric, Latest for 1.21.1

@TheCaJlaT
Copy link

TheCaJlaT commented Nov 22, 2024

Have same problem at vanilla server 1.21.1 paper. Mineflayer get empty messages from server, but server sends correct messages (authorization messages)

The server allows you to log in with and without a license, most likely this is the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

5 participants