Closed JanCantCode closed 1 year ago
Also i am uncertain wheter command request is actually spelled right or similar, on wiki.vg it even says that this packet is bound to server which makes me even more confused.
You can use a text packet to do it
client.queue('text', {
type: 'chat',
needs_translation: false,
source_name: client.username,
xuid: '',
platform_chat_id: '',
message: `/help`
})
for the command request it's
client.queue('command_request', {
command: "/help",
origin: {
type: 'player',
uuid: '',
request_id: '',
},
internal: false,
version: 52,
})
i have attempted that already, it just sends the command as a message into chat
for the command request it's
client.queue('command_request', { command, origin: { type: 'player', uuid: '', request_id: '', }, internal: false, version: 52, })
for the command request it's
client.queue('command_request', { command, origin: { type: 'player', uuid: '', request_id: '', }, internal: false, version: 52, })
oh thanks ill try that
yay it works! thank you!
i have attempted that already, it just sends the command as a message into chat
for the command request it's
client.queue('command_request', { command, origin: { type: 'player', uuid: '', request_id: '', }, internal: false, version: 52, })
If you use a text packet and dont use type: "chat", it'll send you a text message only you can see
I am attempting to send commands with the bedrock protocol. According to wiki.vg, sending commands is not done through the text packet, but the command_request packet. I have tried sending it by using code similar to
client.queue("command_request", {"command":"test", "command_type":"", "Unkown_UUID":"", "Request_Id": "", "Unkown": true})
(as obviously seen here i have little to no experience implementing arguments from wiki.vg) this tho does result in an errorTypeError: SizeOf error for undefined : Cannot read properties of undefined (reading 'type')
which makes me assume i have to specify a type argument in the packet, which i dont quite get as its not asked for on wiki.vg. Can anyone explain to me how to send commands in bedrock edition? Or tell me what i could potentially be doing wrong?