mezon-js 2.8.12 → 2.8.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dist.zip +0 -0
- package/dist/mezon-js.cjs.js +11 -5
- package/dist/mezon-js.esm.mjs +11 -5
- package/package.json +1 -1
- package/socket.ts +12 -7
package/dist/dist.zip
ADDED
Binary file
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -4753,12 +4753,18 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4753
4753
|
} else if (message.channel_message) {
|
4754
4754
|
var content, reactions, mentions, attachments, references;
|
4755
4755
|
try {
|
4756
|
-
|
4757
|
-
|
4758
|
-
|
4759
|
-
|
4760
|
-
|
4756
|
+
if (content)
|
4757
|
+
content = JSON.parse(message.channel_message.content);
|
4758
|
+
if (reactions)
|
4759
|
+
reactions = JSON.parse(message.channel_message.reactions);
|
4760
|
+
if (mentions)
|
4761
|
+
mentions = JSON.parse(message.channel_message.mentions);
|
4762
|
+
if (attachments)
|
4763
|
+
attachments = JSON.parse(message.channel_message.attachments);
|
4764
|
+
if (references)
|
4765
|
+
references = JSON.parse(message.channel_message.references);
|
4761
4766
|
} catch (e2) {
|
4767
|
+
console.log("error parse data", e2);
|
4762
4768
|
}
|
4763
4769
|
var e = {
|
4764
4770
|
avatar: message.channel_message.avatar,
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -4724,12 +4724,18 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4724
4724
|
} else if (message.channel_message) {
|
4725
4725
|
var content, reactions, mentions, attachments, references;
|
4726
4726
|
try {
|
4727
|
-
|
4728
|
-
|
4729
|
-
|
4730
|
-
|
4731
|
-
|
4727
|
+
if (content)
|
4728
|
+
content = JSON.parse(message.channel_message.content);
|
4729
|
+
if (reactions)
|
4730
|
+
reactions = JSON.parse(message.channel_message.reactions);
|
4731
|
+
if (mentions)
|
4732
|
+
mentions = JSON.parse(message.channel_message.mentions);
|
4733
|
+
if (attachments)
|
4734
|
+
attachments = JSON.parse(message.channel_message.attachments);
|
4735
|
+
if (references)
|
4736
|
+
references = JSON.parse(message.channel_message.references);
|
4732
4737
|
} catch (e2) {
|
4738
|
+
console.log("error parse data", e2);
|
4733
4739
|
}
|
4734
4740
|
var e = {
|
4735
4741
|
avatar: message.channel_message.avatar,
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -872,14 +872,19 @@ export class DefaultSocket implements Socket {
|
|
872
872
|
this.onstreamdata(<StreamData>message.stream_data);
|
873
873
|
} else if (message.channel_message) {
|
874
874
|
var content, reactions, mentions, attachments, references;
|
875
|
-
try {
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
875
|
+
try {
|
876
|
+
if (content)
|
877
|
+
content = JSON.parse(message.channel_message.content);
|
878
|
+
if (reactions)
|
879
|
+
reactions = JSON.parse(message.channel_message.reactions);
|
880
|
+
if (mentions)
|
881
|
+
mentions = JSON.parse(message.channel_message.mentions);
|
882
|
+
if (attachments)
|
883
|
+
attachments = JSON.parse(message.channel_message.attachments);
|
884
|
+
if (references)
|
885
|
+
references = JSON.parse(message.channel_message.references);
|
881
886
|
} catch(e) {
|
882
|
-
|
887
|
+
console.log("error parse data", e);
|
883
888
|
}
|
884
889
|
var e: ChannelMessageEvent = {
|
885
890
|
avatar: message.channel_message.avatar,
|