mezon-js 2.8.89 → 2.8.91

Sign up to get free protection for your applications and to get access to all the features.
@@ -4906,8 +4906,14 @@ var _DefaultSocket = class _DefaultSocket {
4906
4906
  this.onchannelcreated(message.channel_created_event);
4907
4907
  } else if (message.channel_deleted_event) {
4908
4908
  this.onchanneldeleted(message.channel_deleted_event);
4909
- } else if (message.clan_deleted_envet) {
4910
- this.onclandeleted(message.clan_deleted_envet);
4909
+ } else if (message.clan_deleted_event) {
4910
+ this.onclandeleted(message.clan_deleted_event);
4911
+ } else if (message.sticker_create_event) {
4912
+ this.onstickercreated(message.sticker_create_event);
4913
+ } else if (message.sticker_update_event) {
4914
+ this.onstickerupdated(message.sticker_update_event);
4915
+ } else if (message.sticker_delete_event) {
4916
+ this.onstickerdeleted(message.sticker_delete_event);
4911
4917
  } else if (message.channel_updated_event) {
4912
4918
  this.onchannelupdated(message.channel_updated_event);
4913
4919
  } else if (message.clan_profile_updated_event) {
@@ -5150,6 +5156,21 @@ var _DefaultSocket = class _DefaultSocket {
5150
5156
  console.log(clanDeleted);
5151
5157
  }
5152
5158
  }
5159
+ onstickercreated(stickerCreated) {
5160
+ if (this.verbose && window && window.console) {
5161
+ console.log(stickerCreated);
5162
+ }
5163
+ }
5164
+ onstickerdeleted(stickerDeleted) {
5165
+ if (this.verbose && window && window.console) {
5166
+ console.log(stickerDeleted);
5167
+ }
5168
+ }
5169
+ onstickerupdated(stickerUpdated) {
5170
+ if (this.verbose && window && window.console) {
5171
+ console.log(stickerUpdated);
5172
+ }
5173
+ }
5153
5174
  onchannelupdated(channelUpdated) {
5154
5175
  if (this.verbose && window && window.console) {
5155
5176
  console.log(channelUpdated);
@@ -4877,8 +4877,14 @@ var _DefaultSocket = class _DefaultSocket {
4877
4877
  this.onchannelcreated(message.channel_created_event);
4878
4878
  } else if (message.channel_deleted_event) {
4879
4879
  this.onchanneldeleted(message.channel_deleted_event);
4880
- } else if (message.clan_deleted_envet) {
4881
- this.onclandeleted(message.clan_deleted_envet);
4880
+ } else if (message.clan_deleted_event) {
4881
+ this.onclandeleted(message.clan_deleted_event);
4882
+ } else if (message.sticker_create_event) {
4883
+ this.onstickercreated(message.sticker_create_event);
4884
+ } else if (message.sticker_update_event) {
4885
+ this.onstickerupdated(message.sticker_update_event);
4886
+ } else if (message.sticker_delete_event) {
4887
+ this.onstickerdeleted(message.sticker_delete_event);
4882
4888
  } else if (message.channel_updated_event) {
4883
4889
  this.onchannelupdated(message.channel_updated_event);
4884
4890
  } else if (message.clan_profile_updated_event) {
@@ -5121,6 +5127,21 @@ var _DefaultSocket = class _DefaultSocket {
5121
5127
  console.log(clanDeleted);
5122
5128
  }
5123
5129
  }
5130
+ onstickercreated(stickerCreated) {
5131
+ if (this.verbose && window && window.console) {
5132
+ console.log(stickerCreated);
5133
+ }
5134
+ }
5135
+ onstickerdeleted(stickerDeleted) {
5136
+ if (this.verbose && window && window.console) {
5137
+ console.log(stickerDeleted);
5138
+ }
5139
+ }
5140
+ onstickerupdated(stickerUpdated) {
5141
+ if (this.verbose && window && window.console) {
5142
+ console.log(stickerUpdated);
5143
+ }
5144
+ }
5124
5145
  onchannelupdated(channelUpdated) {
5125
5146
  if (this.verbose && window && window.console) {
5126
5147
  console.log(channelUpdated);
package/dist/socket.d.ts CHANGED
@@ -310,6 +310,25 @@ export interface ChannelDeletedEvent {
310
310
  channel_id: string;
311
311
  deletor: string;
312
312
  }
313
+ export interface StickerCreateEvent {
314
+ clan_id: string;
315
+ source: string;
316
+ shortname: string;
317
+ category: string;
318
+ creator_id: string;
319
+ sticker_id: string;
320
+ logo: string;
321
+ clan_name: string;
322
+ }
323
+ export interface StickerUpdateEvent {
324
+ shortname: string;
325
+ sticker_id: string;
326
+ user_id: string;
327
+ }
328
+ export interface StickerDeleteEvent {
329
+ sticker_id: string;
330
+ user_id: string;
331
+ }
313
332
  export interface ClanDeletedEvent {
314
333
  clan_id: string;
315
334
  deletor: string;
@@ -629,6 +648,9 @@ export interface Socket {
629
648
  onvoiceleaved: (voiceParticipant: VoiceLeavedEvent) => void;
630
649
  onchannelcreated: (channelCreated: ChannelCreatedEvent) => void;
631
650
  onchanneldeleted: (channelDeleted: ChannelDeletedEvent) => void;
651
+ onstickercreated: (stickerCreated: StickerCreateEvent) => void;
652
+ onstickerupdated: (stickerUpdated: StickerUpdateEvent) => void;
653
+ onstickerdeleted: (stickerDeleted: StickerDeleteEvent) => void;
632
654
  onclandeleted: (clanDeleted: ClanDeletedEvent) => void;
633
655
  onchannelupdated: (channelUpdated: ChannelUpdatedEvent) => void;
634
656
  onclanprofileupdated: (clanprofile: ClanProfileUpdatedEvent) => void;
@@ -701,6 +723,9 @@ export declare class DefaultSocket implements Socket {
701
723
  onchannelcreated(channelCreated: ChannelCreatedEvent): void;
702
724
  onchanneldeleted(channelDeleted: ChannelDeletedEvent): void;
703
725
  onclandeleted(clanDeleted: ClanDeletedEvent): void;
726
+ onstickercreated(stickerCreated: StickerCreateEvent): void;
727
+ onstickerdeleted(stickerDeleted: StickerDeleteEvent): void;
728
+ onstickerupdated(stickerUpdated: StickerUpdateEvent): void;
704
729
  onchannelupdated(channelUpdated: ChannelUpdatedEvent): void;
705
730
  onclanprofileupdated(clanprofile: ClanProfileUpdatedEvent): void;
706
731
  onclanupdated(clan: ClanUpdatedEvent): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.8.89",
4
+ "version": "2.8.91",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -456,6 +456,41 @@ export interface ChannelDeletedEvent {
456
456
  deletor: string;
457
457
  }
458
458
 
459
+ export interface StickerCreateEvent {
460
+ // clan id
461
+ clan_id: string;
462
+ // source
463
+ source: string;
464
+ // shortname
465
+ shortname: string;
466
+ // category
467
+ category: string;
468
+ // creator_id
469
+ creator_id: string;
470
+ // sticker id
471
+ sticker_id: string;
472
+ // logo
473
+ logo: string;
474
+ // clan name
475
+ clan_name: string
476
+ }
477
+
478
+ export interface StickerUpdateEvent {
479
+ // shortname
480
+ shortname: string;
481
+ // sticker id
482
+ sticker_id: string;
483
+ // user id update
484
+ user_id: string;
485
+ }
486
+
487
+ export interface StickerDeleteEvent {
488
+ // sticker id
489
+ sticker_id: string;
490
+ // user id delete
491
+ user_id: string;
492
+ }
493
+
459
494
  export interface ClanDeletedEvent {
460
495
  // clan id
461
496
  clan_id: string;
@@ -945,6 +980,15 @@ export interface Socket {
945
980
  // when channel is deleted
946
981
  onchanneldeleted: (channelDeleted: ChannelDeletedEvent) => void;
947
982
 
983
+ // when sticker is created
984
+ onstickercreated: (stickerCreated: StickerCreateEvent) => void;
985
+
986
+ // when sticker is updated
987
+ onstickerupdated: (stickerUpdated: StickerUpdateEvent) => void;
988
+
989
+ // when sticker is deleted
990
+ onstickerdeleted: (stickerDeleted: StickerDeleteEvent) => void;
991
+
948
992
  // when clan is deleted
949
993
  onclandeleted: (clanDeleted: ClanDeletedEvent) => void;
950
994
 
@@ -1078,8 +1122,14 @@ export class DefaultSocket implements Socket {
1078
1122
  this.onchannelcreated(message.channel_created_event)
1079
1123
  } else if (message.channel_deleted_event) {
1080
1124
  this.onchanneldeleted(message.channel_deleted_event)
1081
- } else if (message.clan_deleted_envet) {
1082
- this.onclandeleted(message.clan_deleted_envet)
1125
+ } else if (message.clan_deleted_event) {
1126
+ this.onclandeleted(message.clan_deleted_event)
1127
+ } else if (message.sticker_create_event) {
1128
+ this.onstickercreated(message.sticker_create_event)
1129
+ } else if (message.sticker_update_event) {
1130
+ this.onstickerupdated(message.sticker_update_event)
1131
+ } else if (message.sticker_delete_event) {
1132
+ this.onstickerdeleted(message.sticker_delete_event)
1083
1133
  } else if (message.channel_updated_event) {
1084
1134
  this.onchannelupdated(message.channel_updated_event)
1085
1135
  } else if (message.clan_profile_updated_event) {
@@ -1357,6 +1407,25 @@ export class DefaultSocket implements Socket {
1357
1407
  }
1358
1408
  }
1359
1409
 
1410
+ onstickercreated(stickerCreated: StickerCreateEvent) {
1411
+ if (this.verbose && window && window.console) {
1412
+ console.log(stickerCreated);
1413
+ }
1414
+ }
1415
+
1416
+ onstickerdeleted(stickerDeleted: StickerDeleteEvent) {
1417
+ if (this.verbose && window && window.console) {
1418
+ console.log(stickerDeleted);
1419
+ }
1420
+ }
1421
+
1422
+ onstickerupdated(stickerUpdated: StickerUpdateEvent) {
1423
+ if (this.verbose && window && window.console) {
1424
+ console.log(stickerUpdated);
1425
+ }
1426
+ }
1427
+
1428
+
1360
1429
  onchannelupdated(channelUpdated: ChannelUpdatedEvent) {
1361
1430
  if (this.verbose && window && window.console) {
1362
1431
  console.log(channelUpdated);