Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23218

mineflayer returning blank messages

$
0
0

im using mineflayer via python, and here is my code:

@On(bot, 'messagestr')def handleServerMsg(this, message, *args):    print(message)    print(args)

the bot is set up correctly, and is able to log in. on some servers, including my paper test server, it prints messages correctly. however, on some servers, no text is ever returned. args would look like this:

translate: 'chat.type.text',  with: [    ChatMessage {      json: [Object],      warn: [Function],      text: '',      extra: [Array],      bold: undefined,      italic: undefined,      underlined: undefined,      strikethrough: undefined,      obfuscated: undefined,      color: undefined    }

text is always an empty string. any ideas?

i wanted to simply print the message in console for further use. i tried many things, including listening to other events, but the text just never shows up. a nickname is always returned.


Viewing all articles
Browse latest Browse all 23218

Trending Articles