dredless 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/dredless.global.js +12 -0
- package/dist/browser/dredless.global.js.map +3 -3
- package/docs/API_REFERENCE.md +17 -0
- package/package.json +1 -1
- package/src/client/core.js +5 -0
- package/src/index.d.ts +9 -0
- package/src/index.js +1 -0
- package/src/protocol/index.d.ts +1 -0
- package/src/protocol/index.js +1 -0
- package/src/protocol/outbound/chat.d.ts +8 -0
- package/src/protocol/outbound/chat.js +13 -0
|
@@ -8038,6 +8038,15 @@
|
|
|
8038
8038
|
};
|
|
8039
8039
|
}
|
|
8040
8040
|
|
|
8041
|
+
// src/protocol/outbound/chat.js
|
|
8042
|
+
var CHAT_MESSAGE_TYPE = 2;
|
|
8043
|
+
function buildChatMessage(message = "") {
|
|
8044
|
+
return {
|
|
8045
|
+
type: CHAT_MESSAGE_TYPE,
|
|
8046
|
+
msg: String(message)
|
|
8047
|
+
};
|
|
8048
|
+
}
|
|
8049
|
+
|
|
8041
8050
|
// src/protocol/outbound/comms.js
|
|
8042
8051
|
var COMMS_MESSAGE_TYPE = 3;
|
|
8043
8052
|
function buildCommsMessage(message = "") {
|
|
@@ -10711,6 +10720,9 @@
|
|
|
10711
10720
|
sendEntityCommand(cmd, args = [-1, -1, -1]) {
|
|
10712
10721
|
return this.sendMessage({ type: 5, cmd, args });
|
|
10713
10722
|
}
|
|
10723
|
+
sendChatMessage(message = "") {
|
|
10724
|
+
return this.sendMessage(buildChatMessage(message));
|
|
10725
|
+
}
|
|
10714
10726
|
sendCommsMessage(message = "") {
|
|
10715
10727
|
return this.sendMessage(buildCommsMessage(message));
|
|
10716
10728
|
}
|