Fix example in README.md for 1.21 (#506)

* Fix example  in README.md for 1.21

* Update client.js

* Update README.md

---------

Co-authored-by: extremeheat <extreme@protonmail.ch>
This commit is contained in:
TheLegendaryTrashcan 2024-07-05 06:22:05 -05:00 committed by GitHub
commit c4593aa355
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ const client = bedrock.createClient({
client.on('text', (packet) => { // Listen for chat messages from the server and echo them back.
if (packet.source_name != client.username) {
client.queue('text', {
type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '',
type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '', filtered_message: '',
message: `${packet.source_name} said: ${packet.message} on ${new Date().toLocaleString()}`
})
}

View file

@ -10,7 +10,7 @@ const client = bedrock.createClient({
client.on('text', (packet) => { // Listen for chat messages and echo them back.
if (packet.source_name != client.username) {
client.queue('text', {
type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '',
type: 'chat', needs_translation: false, source_name: client.username, xuid: '', platform_chat_id: '', filtered_message: '',
message: `${packet.source_name} said: ${packet.message} on ${new Date().toLocaleString()}`
})
}