@duque.edits/sdk 1.1.0 → 1.1.3

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.
Files changed (161) hide show
  1. package/dist/{index-C87LbIta.d.ts → index-BPxglVSk.d.ts} +83 -31
  2. package/dist/{index-BHHXH2xN.d.mts → index-DjHimKUy.d.mts} +83 -31
  3. package/dist/index.d.mts +2 -1
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.js +481 -292
  6. package/dist/index.mjs +481 -292
  7. package/dist/managers/automaticmessage/AutomaticMessageManager.d.mts +2 -1
  8. package/dist/managers/automaticmessage/AutomaticMessageManager.d.ts +2 -1
  9. package/dist/managers/automaticmessage/AutomaticMessageManager.js +41 -35
  10. package/dist/managers/automaticmessage/AutomaticMessageManager.mjs +41 -35
  11. package/dist/managers/base.d.mts +2 -1
  12. package/dist/managers/base.d.ts +2 -1
  13. package/dist/managers/base.js +3 -0
  14. package/dist/managers/base.mjs +3 -0
  15. package/dist/managers/bet/GuildBetManager.d.mts +2 -1
  16. package/dist/managers/bet/GuildBetManager.d.ts +2 -1
  17. package/dist/managers/bet/GuildBetManager.js +42 -30
  18. package/dist/managers/bet/GuildBetManager.mjs +42 -30
  19. package/dist/managers/betuser/GuildBetUserManager.d.mts +2 -1
  20. package/dist/managers/betuser/GuildBetUserManager.d.ts +2 -1
  21. package/dist/managers/betuser/GuildBetUserManager.js +32 -19
  22. package/dist/managers/betuser/GuildBetUserManager.mjs +32 -19
  23. package/dist/managers/buffer/BufferManager.d.mts +2 -1
  24. package/dist/managers/buffer/BufferManager.d.ts +2 -1
  25. package/dist/managers/buffer/BufferManager.js +1 -1
  26. package/dist/managers/buffer/BufferManager.mjs +1 -1
  27. package/dist/managers/guild/GuildManager.d.mts +2 -1
  28. package/dist/managers/guild/GuildManager.d.ts +2 -1
  29. package/dist/managers/guild/GuildManager.js +465 -279
  30. package/dist/managers/guild/GuildManager.mjs +465 -279
  31. package/dist/managers/index.d.mts +2 -1
  32. package/dist/managers/index.d.ts +2 -1
  33. package/dist/managers/index.js +480 -291
  34. package/dist/managers/index.mjs +480 -291
  35. package/dist/managers/logs/LogManager.d.mts +2 -1
  36. package/dist/managers/logs/LogManager.d.ts +2 -1
  37. package/dist/managers/logs/LogManager.js +24 -12
  38. package/dist/managers/logs/LogManager.mjs +24 -12
  39. package/dist/managers/match/GuildMatchManager.d.mts +2 -1
  40. package/dist/managers/match/GuildMatchManager.d.ts +2 -1
  41. package/dist/managers/match/GuildMatchManager.js +77 -61
  42. package/dist/managers/match/GuildMatchManager.mjs +77 -61
  43. package/dist/managers/mediator/GuildMediatorManager.d.mts +2 -1
  44. package/dist/managers/mediator/GuildMediatorManager.d.ts +2 -1
  45. package/dist/managers/mediator/GuildMediatorManager.js +30 -17
  46. package/dist/managers/mediator/GuildMediatorManager.mjs +30 -17
  47. package/dist/managers/message/MessagesManager.d.mts +2 -1
  48. package/dist/managers/message/MessagesManager.d.ts +2 -1
  49. package/dist/managers/minesgame/MinesGameManager.d.mts +2 -1
  50. package/dist/managers/minesgame/MinesGameManager.d.ts +2 -1
  51. package/dist/managers/minesgame/MinesGameManager.js +22 -13
  52. package/dist/managers/minesgame/MinesGameManager.mjs +22 -13
  53. package/dist/managers/permission/GuildPermissionManager.d.mts +2 -1
  54. package/dist/managers/permission/GuildPermissionManager.d.ts +2 -1
  55. package/dist/managers/permission/GuildPermissionManager.js +4 -1
  56. package/dist/managers/permission/GuildPermissionManager.mjs +4 -1
  57. package/dist/managers/player/PlayerManager.d.mts +2 -1
  58. package/dist/managers/player/PlayerManager.d.ts +2 -1
  59. package/dist/managers/ticket/TicketManager.d.mts +2 -1
  60. package/dist/managers/ticket/TicketManager.d.ts +2 -1
  61. package/dist/managers/ticket/TicketManager.js +42 -28
  62. package/dist/managers/ticket/TicketManager.mjs +42 -28
  63. package/dist/managers/tournament/TournamentManager.d.mts +21 -0
  64. package/dist/managers/tournament/TournamentManager.d.ts +21 -0
  65. package/dist/managers/tournament/TournamentManager.js +753 -0
  66. package/dist/managers/tournament/TournamentManager.mjs +745 -0
  67. package/dist/managers/user/GuildUserManager.d.mts +2 -1
  68. package/dist/managers/user/GuildUserManager.d.ts +2 -1
  69. package/dist/managers/user/GuildUserManager.js +49 -36
  70. package/dist/managers/user/GuildUserManager.mjs +49 -36
  71. package/dist/managers/vipmember/VipMemberManager.d.mts +2 -1
  72. package/dist/managers/vipmember/VipMemberManager.d.ts +2 -1
  73. package/dist/managers/vipmember/VipMemberManager.js +4 -1
  74. package/dist/managers/vipmember/VipMemberManager.mjs +4 -1
  75. package/dist/rest/REST.d.mts +2 -1
  76. package/dist/rest/REST.d.ts +2 -1
  77. package/dist/rest/REST.js +482 -293
  78. package/dist/rest/REST.mjs +482 -293
  79. package/dist/rest/Routes.js +1 -1
  80. package/dist/rest/Routes.mjs +1 -1
  81. package/dist/rest/index.d.mts +2 -1
  82. package/dist/rest/index.d.ts +2 -1
  83. package/dist/rest/index.js +482 -293
  84. package/dist/rest/index.mjs +482 -293
  85. package/dist/structures/automaticmessage/AutomaticMessage.d.mts +2 -1
  86. package/dist/structures/automaticmessage/AutomaticMessage.d.ts +2 -1
  87. package/dist/structures/automaticmessage/AutomaticMessage.js +30 -26
  88. package/dist/structures/automaticmessage/AutomaticMessage.mjs +30 -26
  89. package/dist/structures/bet/GuildBet.d.mts +2 -1
  90. package/dist/structures/bet/GuildBet.d.ts +2 -1
  91. package/dist/structures/bet/GuildBet.js +39 -30
  92. package/dist/structures/bet/GuildBet.mjs +39 -30
  93. package/dist/structures/betuser/GuildBetUser.d.mts +2 -1
  94. package/dist/structures/betuser/GuildBetUser.d.ts +2 -1
  95. package/dist/structures/betuser/GuildBetUser.js +29 -19
  96. package/dist/structures/betuser/GuildBetUser.mjs +29 -19
  97. package/dist/structures/guild/Guild.d.mts +2 -1
  98. package/dist/structures/guild/Guild.d.ts +2 -1
  99. package/dist/structures/guild/Guild.js +451 -274
  100. package/dist/structures/guild/Guild.mjs +451 -274
  101. package/dist/structures/index.d.mts +2 -1
  102. package/dist/structures/index.d.ts +2 -1
  103. package/dist/structures/index.js +468 -288
  104. package/dist/structures/index.mjs +468 -288
  105. package/dist/structures/logentry/LogEntry.d.mts +2 -1
  106. package/dist/structures/logentry/LogEntry.d.ts +2 -1
  107. package/dist/structures/logentry/LogEntry.js +21 -12
  108. package/dist/structures/logentry/LogEntry.mjs +21 -12
  109. package/dist/structures/match/GuildMatch.d.mts +2 -1
  110. package/dist/structures/match/GuildMatch.d.ts +2 -1
  111. package/dist/structures/match/GuildMatch.js +74 -61
  112. package/dist/structures/match/GuildMatch.mjs +74 -61
  113. package/dist/structures/mediator/GuildMediator.d.mts +2 -1
  114. package/dist/structures/mediator/GuildMediator.d.ts +2 -1
  115. package/dist/structures/mediator/GuildMediator.js +27 -17
  116. package/dist/structures/mediator/GuildMediator.mjs +27 -17
  117. package/dist/structures/minesgame/MinesGame.d.mts +2 -1
  118. package/dist/structures/minesgame/MinesGame.d.ts +2 -1
  119. package/dist/structures/minesgame/MinesGame.js +22 -13
  120. package/dist/structures/minesgame/MinesGame.mjs +22 -13
  121. package/dist/structures/ticket/Ticket.d.mts +2 -1
  122. package/dist/structures/ticket/Ticket.d.ts +2 -1
  123. package/dist/structures/ticket/Ticket.js +27 -18
  124. package/dist/structures/ticket/Ticket.mjs +27 -18
  125. package/dist/structures/tournament/Tournament.d.mts +21 -0
  126. package/dist/structures/tournament/Tournament.d.ts +21 -0
  127. package/dist/structures/tournament/Tournament.js +593 -0
  128. package/dist/structures/tournament/Tournament.mjs +585 -0
  129. package/dist/structures/user/GuildUser.d.mts +2 -1
  130. package/dist/structures/user/GuildUser.d.ts +2 -1
  131. package/dist/structures/user/GuildUser.js +46 -36
  132. package/dist/structures/user/GuildUser.mjs +46 -36
  133. package/dist/structures/vipmember/VipMember.d.mts +2 -1
  134. package/dist/structures/vipmember/VipMember.d.ts +2 -1
  135. package/dist/structures/vipmember/VipMember.js +1 -1
  136. package/dist/structures/vipmember/VipMember.mjs +1 -1
  137. package/dist/types/RestTypes.d.mts +2 -1
  138. package/dist/types/RestTypes.d.ts +2 -1
  139. package/dist/types/api/APIAutomaticMessage.d.mts +2 -1
  140. package/dist/types/api/APIAutomaticMessage.d.ts +2 -1
  141. package/dist/types/api/APIGuild.d.mts +2 -1
  142. package/dist/types/api/APIGuild.d.ts +2 -1
  143. package/dist/types/api/APIGuildBet.d.mts +2 -1
  144. package/dist/types/api/APIGuildBet.d.ts +2 -1
  145. package/dist/types/api/APIGuildBetUser.d.mts +2 -1
  146. package/dist/types/api/APIGuildBetUser.d.ts +2 -1
  147. package/dist/types/api/APIGuildGroupedChannel.d.mts +2 -1
  148. package/dist/types/api/APIGuildGroupedChannel.d.ts +2 -1
  149. package/dist/types/api/APIGuildMatch.d.mts +2 -1
  150. package/dist/types/api/APIGuildMatch.d.ts +2 -1
  151. package/dist/types/api/APIGuildUser.d.mts +2 -1
  152. package/dist/types/api/APIGuildUser.d.ts +2 -1
  153. package/dist/types/api/APITournament.d.mts +16 -0
  154. package/dist/types/api/APITournament.d.ts +16 -0
  155. package/dist/types/api/APITournament.js +18 -0
  156. package/dist/types/api/APITournament.mjs +0 -0
  157. package/dist/types/api/index.d.mts +2 -1
  158. package/dist/types/api/index.d.ts +2 -1
  159. package/dist/types/index.d.mts +2 -1
  160. package/dist/types/index.d.ts +2 -1
  161. package/package.json +1 -1
@@ -493,12 +493,15 @@ var BaseManager = class {
493
493
  this.rest = guild.rest;
494
494
  this.cache = new Collection();
495
495
  }
496
+ toJSON() {
497
+ return [...this.cache.values()].map((m) => m && "toJSON" in m && typeof m.toJSON === "function" ? m.toJSON() : m);
498
+ }
496
499
  };
497
500
 
498
501
  // src/rest/Routes.ts
499
502
  var Routes = {
500
503
  //base: "http://localhost:80/api/v1",
501
- base: "https://duque-api.up.railway.app/api/v1",
504
+ base: "https://duqueapi.shardweb.app/api/v1",
502
505
  field: (field) => `/${field}`,
503
506
  fields: (...fields) => `${fields.join("/")}`,
504
507
  guilds: {
@@ -654,7 +657,8 @@ var Assertion = class {
654
657
  import { request, Headers } from "undici";
655
658
 
656
659
  // src/structures/betuser/GuildBetUser.ts
657
- var GuildBetUser = class _GuildBetUser {
660
+ var _GuildBetUser_instances, updateInternals_fn;
661
+ var _GuildBetUser = class _GuildBetUser {
658
662
  /**
659
663
  * Bet user
660
664
  * @param data The user's data
@@ -662,6 +666,7 @@ var GuildBetUser = class _GuildBetUser {
662
666
  * @param rest The rest client
663
667
  */
664
668
  constructor(data, manager) {
669
+ __privateAdd(this, _GuildBetUser_instances);
665
670
  /** User daily */
666
671
  __publicField(this, "daily");
667
672
  __publicField(this, "profile");
@@ -756,7 +761,7 @@ var GuildBetUser = class _GuildBetUser {
756
761
  url: route,
757
762
  payload
758
763
  });
759
- return this._updateInternals(response);
764
+ return __privateMethod(this, _GuildBetUser_instances, updateInternals_fn).call(this, response);
760
765
  }
761
766
  async updateProfile(data) {
762
767
  const _data = {
@@ -776,20 +781,7 @@ var GuildBetUser = class _GuildBetUser {
776
781
  url: route,
777
782
  payload: _data
778
783
  });
779
- return this._updateInternals(response);
780
- }
781
- _updateInternals(data) {
782
- for (let key in data) {
783
- if (key === "id" || key === "createdAt") continue;
784
- if (key in this) {
785
- this[key] = data[key];
786
- }
787
- }
788
- this.updatedAt = /* @__PURE__ */ new Date();
789
- this.createdAt = new Date(data.createdAt);
790
- this.manager.set(this);
791
- this.rest.emit("betuserUpdate", this);
792
- return this;
784
+ return __privateMethod(this, _GuildBetUser_instances, updateInternals_fn).call(this, response);
793
785
  }
794
786
  /**
795
787
  * Update certain property
@@ -826,7 +818,7 @@ var GuildBetUser = class _GuildBetUser {
826
818
  url: route,
827
819
  payload
828
820
  });
829
- return this._updateInternals(response);
821
+ return __privateMethod(this, _GuildBetUser_instances, updateInternals_fn).call(this, response);
830
822
  }
831
823
  async _update(data) {
832
824
  const route = Routes.guilds.betusers.get(this.manager.guild.id, this.id);
@@ -836,7 +828,7 @@ var GuildBetUser = class _GuildBetUser {
836
828
  url: route,
837
829
  payload
838
830
  });
839
- return this._updateInternals(response);
831
+ return __privateMethod(this, _GuildBetUser_instances, updateInternals_fn).call(this, response);
840
832
  }
841
833
  async delete() {
842
834
  const route = Routes.guilds.betusers.delete(this.manager.guild.id, this.id);
@@ -860,6 +852,21 @@ var GuildBetUser = class _GuildBetUser {
860
852
  return json;
861
853
  }
862
854
  };
855
+ _GuildBetUser_instances = new WeakSet();
856
+ updateInternals_fn = function(data) {
857
+ for (let key in data) {
858
+ if (key === "id" || key === "createdAt") continue;
859
+ if (key in this) {
860
+ this[key] = data[key];
861
+ }
862
+ }
863
+ this.updatedAt = /* @__PURE__ */ new Date();
864
+ this.createdAt = new Date(data.createdAt);
865
+ this.manager.set(this);
866
+ this.rest.emit("betuserUpdate", this);
867
+ return this;
868
+ };
869
+ var GuildBetUser = _GuildBetUser;
863
870
 
864
871
  // src/managers/betuser/GuildBetUserManager.ts
865
872
  var GuildBetUserManager = class extends BaseManager {
@@ -937,7 +944,8 @@ var GuildBetUserManager = class extends BaseManager {
937
944
  };
938
945
 
939
946
  // src/structures/mediator/GuildMediator.ts
940
- var GuildMediator = class _GuildMediator {
947
+ var _GuildMediator_instances, updateInternals_fn2;
948
+ var _GuildMediator = class _GuildMediator {
941
949
  /**
942
950
  * Bet user
943
951
  * @param data The user's data
@@ -945,6 +953,7 @@ var GuildMediator = class _GuildMediator {
945
953
  * @param rest The rest client
946
954
  */
947
955
  constructor(data, manager) {
956
+ __privateAdd(this, _GuildMediator_instances);
948
957
  /** User's name */
949
958
  __publicField(this, "id");
950
959
  __publicField(this, "guild_id");
@@ -1003,19 +1012,7 @@ var GuildMediator = class _GuildMediator {
1003
1012
  url: route,
1004
1013
  payload
1005
1014
  });
1006
- return this._updateInternals(response);
1007
- }
1008
- _updateInternals(data) {
1009
- for (let key in data) {
1010
- if (key === "id" || key === "createdAt") continue;
1011
- if (key in this) {
1012
- this[key] = data[key];
1013
- }
1014
- }
1015
- this.updatedAt = /* @__PURE__ */ new Date();
1016
- this.createdAt = new Date(data.createdAt);
1017
- this.manager.set(this);
1018
- return this;
1015
+ return __privateMethod(this, _GuildMediator_instances, updateInternals_fn2).call(this, response);
1019
1016
  }
1020
1017
  /**
1021
1018
  * Update certain property
@@ -1030,7 +1027,7 @@ var GuildMediator = class _GuildMediator {
1030
1027
  url: route,
1031
1028
  payload
1032
1029
  });
1033
- return this._updateInternals(response);
1030
+ return __privateMethod(this, _GuildMediator_instances, updateInternals_fn2).call(this, response);
1034
1031
  }
1035
1032
  async setPaymentlink(type, link) {
1036
1033
  const route = Routes.guilds.mediators.get(this.manager.guild.id, this.id);
@@ -1040,7 +1037,7 @@ var GuildMediator = class _GuildMediator {
1040
1037
  url: route,
1041
1038
  payload
1042
1039
  });
1043
- return this._updateInternals(response);
1040
+ return __privateMethod(this, _GuildMediator_instances, updateInternals_fn2).call(this, response);
1044
1041
  }
1045
1042
  async delete() {
1046
1043
  const route = Routes.guilds.mediators.delete(this.manager.guild.id, this.id);
@@ -1063,6 +1060,20 @@ var GuildMediator = class _GuildMediator {
1063
1060
  return json;
1064
1061
  }
1065
1062
  };
1063
+ _GuildMediator_instances = new WeakSet();
1064
+ updateInternals_fn2 = function(data) {
1065
+ for (let key in data) {
1066
+ if (key === "id" || key === "createdAt") continue;
1067
+ if (key in this) {
1068
+ this[key] = data[key];
1069
+ }
1070
+ }
1071
+ this.updatedAt = /* @__PURE__ */ new Date();
1072
+ this.createdAt = new Date(data.createdAt);
1073
+ this.manager.set(this);
1074
+ return this;
1075
+ };
1076
+ var GuildMediator = _GuildMediator;
1066
1077
 
1067
1078
  // src/managers/mediator/GuildMediatorManager.ts
1068
1079
  var GuildMediatorManager = class extends BaseManager {
@@ -1147,14 +1158,150 @@ var GuildMediatorManager = class extends BaseManager {
1147
1158
  }
1148
1159
  };
1149
1160
 
1161
+ // src/structures/tournament/Tournament.ts
1162
+ var _Tournament_instances, updateInternals_fn3;
1163
+ var Tournament = class {
1164
+ constructor(data, manager) {
1165
+ __privateAdd(this, _Tournament_instances);
1166
+ __publicField(this, "_id");
1167
+ __publicField(this, "guild_id");
1168
+ __publicField(this, "type");
1169
+ __publicField(this, "max_teams");
1170
+ __publicField(this, "teams");
1171
+ __publicField(this, "message");
1172
+ __publicField(this, "message_id");
1173
+ __publicField(this, "status");
1174
+ __publicField(this, "createdAt");
1175
+ __publicField(this, "updatedAt");
1176
+ __publicField(this, "guild");
1177
+ __publicField(this, "rest");
1178
+ __publicField(this, "manager");
1179
+ __publicField(this, "data");
1180
+ this.manager = manager;
1181
+ this.guild = manager.guild;
1182
+ this.rest = manager.rest;
1183
+ this.guild_id = data?.guild_id;
1184
+ this.type = data?.type;
1185
+ this.teams = data?.teams;
1186
+ this.message = data?.message;
1187
+ this.message_id = data?.message_id;
1188
+ this.status = data?.status;
1189
+ this.createdAt = data?.createdAt ? new Date(data?.createdAt) : /* @__PURE__ */ new Date();
1190
+ this.updatedAt = data?.updatedAt ? new Date(data?.updatedAt) : /* @__PURE__ */ new Date();
1191
+ this.data = data;
1192
+ }
1193
+ async fetch() {
1194
+ const route = Routes.fields("guilds", this.guild.id, "tournaments", this._id);
1195
+ const response = await this.rest.request({
1196
+ method: "get",
1197
+ url: route
1198
+ });
1199
+ return __privateMethod(this, _Tournament_instances, updateInternals_fn3).call(this, response);
1200
+ }
1201
+ async update(data) {
1202
+ const route = Routes.fields("guilds", this.guild.id, "tournaments", this._id);
1203
+ const response = await this.rest.request({
1204
+ method: "patch",
1205
+ url: route,
1206
+ payload: data
1207
+ });
1208
+ return __privateMethod(this, _Tournament_instances, updateInternals_fn3).call(this, response);
1209
+ }
1210
+ toJSON() {
1211
+ return {
1212
+ guild_id: this.guild_id,
1213
+ type: this.type,
1214
+ max_teams: this.max_teams,
1215
+ teams: this.teams,
1216
+ message: this.message,
1217
+ message_id: this.message_id,
1218
+ status: this.status,
1219
+ createdAt: this.createdAt ? new Date(this?.createdAt) : /* @__PURE__ */ new Date(),
1220
+ updatedAt: this.updatedAt ? new Date(this?.updatedAt) : /* @__PURE__ */ new Date()
1221
+ };
1222
+ }
1223
+ };
1224
+ _Tournament_instances = new WeakSet();
1225
+ updateInternals_fn3 = function(data) {
1226
+ for (let key in data) {
1227
+ if (key === "id" || key === "createdAt") continue;
1228
+ if (key in this) {
1229
+ this[key] = data[key];
1230
+ }
1231
+ }
1232
+ this.updatedAt = /* @__PURE__ */ new Date();
1233
+ this.createdAt = new Date(data.createdAt);
1234
+ this.manager._add(this);
1235
+ return this;
1236
+ };
1237
+
1238
+ // src/managers/tournament/TournamentManager.ts
1239
+ var TournamentManager = class extends BaseManager {
1240
+ constructor(guild) {
1241
+ super(guild);
1242
+ this.guild = guild;
1243
+ this.rest = guild.rest;
1244
+ this.base_url = Routes.guilds.resource(guild.id, "tournaments");
1245
+ this.cache = new Collection();
1246
+ }
1247
+ async fetch(options) {
1248
+ if (options && options.cache) return this.cache;
1249
+ if (options && options.tournamentId) {
1250
+ const response2 = await this.rest.request({
1251
+ method: "GET",
1252
+ url: Routes.fields(this.base_url, options.tournamentId)
1253
+ });
1254
+ const tournament = new Tournament(response2, this);
1255
+ this._add(tournament);
1256
+ return tournament;
1257
+ }
1258
+ const response = await this.rest.request({
1259
+ method: "GET",
1260
+ url: this.base_url
1261
+ });
1262
+ return this.set(response);
1263
+ }
1264
+ set(data) {
1265
+ this.cache.clear();
1266
+ if (Array.isArray(data)) {
1267
+ for (let _m of data) {
1268
+ if (!_m._id) continue;
1269
+ if (_m instanceof Tournament) this.cache.set(_m._id, _m);
1270
+ else this.cache.set(_m._id, new Tournament(_m, this));
1271
+ }
1272
+ } else {
1273
+ if (!data._id) return this.cache;
1274
+ if (data instanceof Tournament) this.cache.set(data._id, data);
1275
+ else this.cache.set(data._id, new Tournament(data, this));
1276
+ }
1277
+ return this.cache;
1278
+ }
1279
+ _add(data) {
1280
+ if (Array.isArray(data)) {
1281
+ for (let _m of data) {
1282
+ if (!_m._id) continue;
1283
+ if (_m instanceof Tournament) this.cache.set(_m._id, _m);
1284
+ else this.cache.set(_m._id, new Tournament(_m, this));
1285
+ }
1286
+ } else {
1287
+ if (!data._id) return this.cache;
1288
+ if (data instanceof Tournament) this.cache.set(data._id, data);
1289
+ else this.cache.set(data._id, new Tournament(data, this));
1290
+ }
1291
+ return this.cache;
1292
+ }
1293
+ };
1294
+
1150
1295
  // src/structures/guild/Guild.ts
1151
- var Guild = class {
1296
+ var _Guild_instances, updateInternals_fn4;
1297
+ var Guild2 = class {
1152
1298
  /**
1153
1299
  * The guild structure
1154
1300
  * @param data The guild's data
1155
1301
  * @param rest The rest client
1156
1302
  */
1157
1303
  constructor(data, rest) {
1304
+ __privateAdd(this, _Guild_instances);
1158
1305
  /** The data of this guild */
1159
1306
  __publicField(this, "data");
1160
1307
  /** The rest client */
@@ -1180,6 +1327,7 @@ var Guild = class {
1180
1327
  __publicField(this, "roulette_settings");
1181
1328
  /** Guild Prefix */
1182
1329
  __publicField(this, "prefix");
1330
+ __publicField(this, "prefixes");
1183
1331
  /** Guild Creation Date */
1184
1332
  __publicField(this, "createdAt");
1185
1333
  /** Guild Updated Date */
@@ -1199,6 +1347,7 @@ var Guild = class {
1199
1347
  __publicField(this, "mediators");
1200
1348
  __publicField(this, "automatic_messages");
1201
1349
  __publicField(this, "automaticMessagesManager");
1350
+ __publicField(this, "tournaments");
1202
1351
  __publicField(this, "adverts");
1203
1352
  __publicField(this, "codes");
1204
1353
  __publicField(this, "coin_symbol");
@@ -1213,6 +1362,7 @@ var Guild = class {
1213
1362
  this.scores = data?.scores;
1214
1363
  this.codes = data?.codes;
1215
1364
  this.prefix = data?.prefix;
1365
+ this.prefixes = data?.prefixes;
1216
1366
  this.status = data?.status;
1217
1367
  this.tickets_configuration = data?.tickets_configuration;
1218
1368
  this.automatic_messages = data?.automatic_messages;
@@ -1233,6 +1383,7 @@ var Guild = class {
1233
1383
  this.bets = new GuildBetManager(this);
1234
1384
  this.mediators = new GuildMediatorManager(this);
1235
1385
  this.automaticMessagesManager = new AutomaticMessageManager(this);
1386
+ this.tournaments = new TournamentManager(this);
1236
1387
  this.adverts = [];
1237
1388
  for (let _adv of data?.adverts || []) {
1238
1389
  this.adverts.push({
@@ -1269,7 +1420,7 @@ var Guild = class {
1269
1420
  url: route,
1270
1421
  payload: { channels }
1271
1422
  });
1272
- this._updateInternals(response);
1423
+ __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1273
1424
  return response.channels.find((t) => t.type === type);
1274
1425
  }
1275
1426
  }
@@ -1284,7 +1435,7 @@ var Guild = class {
1284
1435
  url: route,
1285
1436
  payload: { permissions }
1286
1437
  });
1287
- this._updateInternals(response);
1438
+ __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1288
1439
  return response.permissions.find((t) => t.type === type);
1289
1440
  }
1290
1441
  }
@@ -1293,26 +1444,26 @@ var Guild = class {
1293
1444
  const route = Routes.guilds.get(this.id);
1294
1445
  const payload = { adverts: this.adverts };
1295
1446
  const response = await this.rest.request({ method: "PATCH", url: route, payload });
1296
- return this._updateInternals(response);
1447
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1297
1448
  }
1298
1449
  async removeAdvert(advertId) {
1299
1450
  const route = Routes.guilds.get(this.id);
1300
1451
  const payload = { adverts: this.adverts.filter((a) => a._id !== advertId) };
1301
1452
  const response = await this.rest.request({ method: "PATCH", url: route, payload });
1302
- return this._updateInternals(response);
1453
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1303
1454
  }
1304
1455
  async createCode(data) {
1305
1456
  this.codes.push(data);
1306
1457
  const route = Routes.guilds.get(this.id);
1307
1458
  const payload = { codes: this.codes };
1308
1459
  const response = await this.rest.request({ method: "PATCH", url: route, payload });
1309
- return this._updateInternals(response);
1460
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1310
1461
  }
1311
1462
  async removeCode(codeId) {
1312
1463
  const route = Routes.guilds.get(this.id);
1313
1464
  const payload = { codes: this.codes.filter((a) => a._id !== codeId) };
1314
1465
  const response = await this.rest.request({ method: "PATCH", url: route, payload });
1315
- return this._updateInternals(response);
1466
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1316
1467
  }
1317
1468
  async addIdToChannel(type, id) {
1318
1469
  const channel = this.channels.find((c) => c.type === type);
@@ -1331,7 +1482,7 @@ var Guild = class {
1331
1482
  url: route,
1332
1483
  payload
1333
1484
  });
1334
- return this._updateInternals(response);
1485
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1335
1486
  }
1336
1487
  async setChannelIds(type, ...ids) {
1337
1488
  const channel = this.channels.find((c) => c.type === type);
@@ -1350,7 +1501,7 @@ var Guild = class {
1350
1501
  url: route,
1351
1502
  payload
1352
1503
  });
1353
- return this._updateInternals(response);
1504
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1354
1505
  }
1355
1506
  async removeIdInChannel(type, id) {
1356
1507
  const chIndex = this.channels.findIndex((c) => c.type === type);
@@ -1372,7 +1523,7 @@ var Guild = class {
1372
1523
  url: route,
1373
1524
  payload
1374
1525
  });
1375
- return this._updateInternals(response);
1526
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1376
1527
  }
1377
1528
  async updateRouletteSettings(data) {
1378
1529
  const _data = {
@@ -1429,58 +1580,21 @@ var Guild = class {
1429
1580
  this.logEntries.fetch(),
1430
1581
  this.betusers.fetch(),
1431
1582
  this.bets.fetch(),
1432
- this.mediators.fetch()
1583
+ this.mediators.fetch(),
1584
+ this.tournaments.fetch()
1433
1585
  ]);
1434
1586
  return this;
1435
1587
  }
1436
- _updateInternals(data) {
1437
- for (let key in data) {
1438
- if (key === "id" || key === "createdAt") continue;
1439
- if (key in this) {
1440
- this[key] = data[key];
1441
- }
1442
- if (key === "adverts") {
1443
- this.adverts = [];
1444
- for (let _adv of data.adverts) {
1445
- this.adverts.push({
1446
- _id: _adv._id,
1447
- admin_id: _adv.admin_id,
1448
- points_to_remove: _adv.points_to_remove,
1449
- role_id: _adv.role_id,
1450
- createdAt: _adv.createdAt ? new Date(_adv.createdAt) : /* @__PURE__ */ new Date(),
1451
- updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
1452
- });
1453
- }
1454
- }
1455
- if (key === "code") {
1456
- this.codes = [];
1457
- for (let _adv of data.codes) {
1458
- this.codes.push({
1459
- _id: _adv._id,
1460
- admin_id: _adv.admin_id,
1461
- type: _adv.type,
1462
- add: _adv.add,
1463
- code: _adv.code,
1464
- expire: _adv.expire ? new Date(_adv.expire) : /* @__PURE__ */ new Date(),
1465
- createdAt: _adv.createdAt ? new Date(_adv.createdAt) : /* @__PURE__ */ new Date(),
1466
- updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
1467
- });
1468
- }
1469
- }
1470
- }
1471
- this.automaticMessagesManager.set(this.automatic_messages);
1472
- this.updatedAt = /* @__PURE__ */ new Date();
1473
- this.rest.guilds.cache.set(this.id, this);
1474
- this.rest.emit("guildUpdate", this);
1475
- return this;
1476
- }
1477
1588
  async fetch() {
1478
1589
  const route = Routes.guilds.get(this.id);
1479
1590
  const response = await this.rest.request({
1480
1591
  method: "get",
1481
1592
  url: route
1482
1593
  });
1483
- return this._updateInternals(response);
1594
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1595
+ }
1596
+ async reset() {
1597
+ return this.update({ reset: true });
1484
1598
  }
1485
1599
  async update(data) {
1486
1600
  const route = Routes.guilds.get(this.id);
@@ -1489,16 +1603,7 @@ var Guild = class {
1489
1603
  url: route,
1490
1604
  payload: data
1491
1605
  });
1492
- for (const k in response) {
1493
- if (k === "id" || k == "createdAt") continue;
1494
- if (k in this) {
1495
- this[k] = response[k];
1496
- }
1497
- }
1498
- this.updatedAt = /* @__PURE__ */ new Date();
1499
- this.rest.guilds.cache.set(this.id, this);
1500
- this.rest.emit("guildUpdate", this);
1501
- return this;
1606
+ return __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1502
1607
  }
1503
1608
  async setStatus(key, status) {
1504
1609
  Assertion.assertString(key);
@@ -1523,16 +1628,27 @@ var Guild = class {
1523
1628
  await this.update({ prices: this.prices });
1524
1629
  return this;
1525
1630
  }
1526
- async setPrefix(prefix) {
1527
- Assertion.assertString(prefix);
1528
- const route = Routes.fields(Routes.guilds.resource(this.id, "prefix"));
1529
- const payload = { set: prefix };
1631
+ async addPrefix(prefixes) {
1632
+ const route = Routes.fields(Routes.guilds.resource(this.id, "prefixes"));
1633
+ const _p = Array.isArray(prefixes) ? prefixes : [prefixes];
1634
+ const payload = { set: [.../* @__PURE__ */ new Set([...this.prefixes, ..._p])] };
1635
+ const response = await this.rest.request({
1636
+ method: "PATCH",
1637
+ url: route,
1638
+ payload
1639
+ });
1640
+ __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1641
+ return this;
1642
+ }
1643
+ async setPrefix(prefixes) {
1644
+ const route = Routes.fields(Routes.guilds.resource(this.id, "prefixes"));
1645
+ const payload = { set: Array.isArray(prefixes) ? prefixes : [prefixes] };
1530
1646
  const response = await this.rest.request({
1531
1647
  method: "PATCH",
1532
1648
  url: route,
1533
1649
  payload
1534
1650
  });
1535
- this._updateInternals(response);
1651
+ __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1536
1652
  return this;
1537
1653
  }
1538
1654
  async toggleDailyCategory(category) {
@@ -1552,7 +1668,7 @@ var Guild = class {
1552
1668
  url: route,
1553
1669
  payload
1554
1670
  });
1555
- this._updateInternals(response);
1671
+ __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1556
1672
  return this;
1557
1673
  }
1558
1674
  async setScores(name, amount) {
@@ -1565,7 +1681,7 @@ var Guild = class {
1565
1681
  url: route,
1566
1682
  payload
1567
1683
  });
1568
- this._updateInternals(response);
1684
+ __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1569
1685
  return this;
1570
1686
  }
1571
1687
  async toggleMode(mode) {
@@ -1590,18 +1706,61 @@ var Guild = class {
1590
1706
  url: route,
1591
1707
  payload
1592
1708
  });
1593
- this._updateInternals(response);
1709
+ __privateMethod(this, _Guild_instances, updateInternals_fn4).call(this, response);
1594
1710
  return this;
1595
1711
  }
1596
1712
  };
1713
+ _Guild_instances = new WeakSet();
1714
+ updateInternals_fn4 = function(data) {
1715
+ for (let key in data) {
1716
+ if (key === "id" || key === "createdAt") continue;
1717
+ if (key in this) {
1718
+ this[key] = data[key];
1719
+ }
1720
+ if (key === "adverts") {
1721
+ this.adverts = [];
1722
+ for (let _adv of data.adverts) {
1723
+ this.adverts.push({
1724
+ _id: _adv._id,
1725
+ admin_id: _adv.admin_id,
1726
+ points_to_remove: _adv.points_to_remove,
1727
+ role_id: _adv.role_id,
1728
+ createdAt: _adv.createdAt ? new Date(_adv.createdAt) : /* @__PURE__ */ new Date(),
1729
+ updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
1730
+ });
1731
+ }
1732
+ }
1733
+ if (key === "code") {
1734
+ this.codes = [];
1735
+ for (let _adv of data.codes) {
1736
+ this.codes.push({
1737
+ _id: _adv._id,
1738
+ admin_id: _adv.admin_id,
1739
+ type: _adv.type,
1740
+ add: _adv.add,
1741
+ code: _adv.code,
1742
+ expire: _adv.expire ? new Date(_adv.expire) : /* @__PURE__ */ new Date(),
1743
+ createdAt: _adv.createdAt ? new Date(_adv.createdAt) : /* @__PURE__ */ new Date(),
1744
+ updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
1745
+ });
1746
+ }
1747
+ }
1748
+ }
1749
+ this.automaticMessagesManager.set(this.automatic_messages);
1750
+ this.updatedAt = /* @__PURE__ */ new Date();
1751
+ this.rest.guilds.cache.set(this.id, this);
1752
+ this.rest.emit("guildUpdate", this);
1753
+ return this;
1754
+ };
1597
1755
 
1598
1756
  // src/rest/REST.ts
1599
1757
  import_dotenv.default.config();
1600
1758
 
1601
1759
  // src/structures/automaticmessage/AutomaticMessage.ts
1760
+ var _AutomaticMessage_instances, updateInternals_fn5;
1602
1761
  var AutomaticMessage = class {
1603
1762
  constructor(data, manager) {
1604
- __publicField(this, "_id");
1763
+ __privateAdd(this, _AutomaticMessage_instances);
1605
1764
  __publicField(this, "id");
1606
1765
  __publicField(this, "type");
1607
1766
  __publicField(this, "admin_id");
@@ -1620,7 +1779,6 @@ var AutomaticMessage = class {
1620
1779
  this.manager = manager;
1621
1780
  this.guild = manager.guild;
1622
1781
  this.rest = manager.rest;
1623
- this._id = data?._id;
1624
1782
  this.id = data?.id;
1625
1783
  this.type = data?.type;
1626
1784
  this.admin_id = data?.admin_id;
@@ -1635,12 +1793,7 @@ var AutomaticMessage = class {
1635
1793
  this.updatedAt = data?.updatedAt ? new Date(data?.updatedAt) : /* @__PURE__ */ new Date();
1636
1794
  }
1637
1795
  async fetch() {
1638
- const route = Routes.guilds.resource(this.guild.id, "automatic_messages", this._id);
1639
- const response = await this.rest.request({
1640
- method: "get",
1641
- url: route
1642
- });
1643
- return this._updateInternals(response);
1796
+ return this.manager.fetch(this.id);
1644
1797
  }
1645
1798
  async addChannelId(...id) {
1646
1799
  const ids = [.../* @__PURE__ */ new Set([...this.channel_ids, ...id])];
@@ -1652,39 +1805,28 @@ var AutomaticMessage = class {
1652
1805
  return this.update({ channel_ids: ids });
1653
1806
  }
1654
1807
  async update(data) {
1808
+ this.manager.cache.set(this.id, { ...this, ...data, id: this.id });
1655
1809
  const route = Routes.guilds.get(this.guild.id);
1656
1810
  const response = await this.rest.request({
1657
1811
  method: "patch",
1658
1812
  url: route,
1659
- payload: { automatic_messages: this.manager.cache.toArray() }
1813
+ payload: { automatic_messages: this.manager.toJSON() }
1660
1814
  });
1661
- return this._updateInternals(response);
1815
+ return __privateMethod(this, _AutomaticMessage_instances, updateInternals_fn5).call(this, response);
1662
1816
  }
1663
1817
  async delete() {
1664
- this.manager.cache.delete(this._id);
1818
+ this.manager.cache.delete(this.id);
1819
+ this.guild.automatic_messages = this.manager.cache.toArray();
1665
1820
  const route = Routes.guilds.get(this.guild.id);
1666
1821
  const response = await this.rest.request({
1667
1822
  method: "patch",
1668
1823
  url: route,
1669
- payload: { automatic_messages: this.manager.cache.toArray() }
1824
+ payload: { automatic_messages: this.manager.toJSON() }
1670
1825
  });
1671
1826
  return this.manager.set(response.automatic_messages);
1672
1827
  }
1673
- _updateInternals(data) {
1674
- for (let key in data) {
1675
- if (key === "_id" || key === "createdAt") continue;
1676
- if (key in this) {
1677
- this[key] = data[key];
1678
- }
1679
- }
1680
- this.updatedAt = /* @__PURE__ */ new Date();
1681
- this.createdAt = new Date(data.createdAt);
1682
- this.manager._add(this);
1683
- return this;
1684
- }
1685
1828
  toJSON() {
1686
1829
  return {
1687
- _id: this._id,
1688
1830
  id: this.id,
1689
1831
  type: this.type,
1690
1832
  admin_id: this.admin_id,
@@ -1700,6 +1842,20 @@ var AutomaticMessage = class {
1700
1842
  };
1701
1843
  }
1702
1844
  };
1845
+ _AutomaticMessage_instances = new WeakSet();
1846
+ updateInternals_fn5 = function(data) {
1847
+ const _this = data?.automatic_messages?.find((m) => m.id === this.id);
1848
+ for (let key in _this) {
1849
+ if (key === "id" || key === "createdAt") continue;
1850
+ if (key in this) {
1851
+ this[key] = _this[key];
1852
+ }
1853
+ }
1854
+ this.updatedAt = /* @__PURE__ */ new Date();
1855
+ this.createdAt = new Date(data.createdAt);
1856
+ this.manager._add(data.automatic_messages);
1857
+ return this;
1858
+ };
1703
1859
 
1704
1860
  // src/utils/randomKeyGenerator.ts
1705
1861
  import { randomBytes } from "crypto";
@@ -1713,25 +1869,19 @@ var AutomaticMessageManager = class extends BaseManager {
1713
1869
  super(guild);
1714
1870
  this.guild = guild;
1715
1871
  this.rest = guild.rest;
1716
- this.base_url = Routes.guilds.resource(guild.id, "automatic_messages");
1872
+ this.base_url = Routes.guilds.resource(guild.id);
1717
1873
  this.cache = new Collection();
1718
1874
  if (guild.automatic_messages && guild.automatic_messages.length !== 0) this.set(guild.automatic_messages);
1719
1875
  else this.guild.automatic_messages = [];
1720
1876
  }
1721
1877
  async fetch(messageId) {
1722
1878
  const route = this.base_url;
1723
- if (messageId) {
1724
- const response2 = await this.rest.request({
1725
- method: "get",
1726
- url: `${route}`
1727
- });
1728
- return this._add(response2).find((m) => m.id === messageId);
1729
- }
1730
1879
  const response = await this.rest.request({
1731
1880
  method: "get",
1732
1881
  url: route
1733
1882
  });
1734
- return this._add(response.automatic_messages);
1883
+ this._add(response.automatic_messages);
1884
+ return this.cache;
1735
1885
  }
1736
1886
  async create(data) {
1737
1887
  if (!data.type) throw new Error(`Missing message's type.`);
@@ -1758,6 +1908,7 @@ var AutomaticMessageManager = class extends BaseManager {
1758
1908
  if (data instanceof AutomaticMessage) this.cache.set(data.id, data);
1759
1909
  else this.cache.set(data.id, new AutomaticMessage(data, this));
1760
1910
  }
1911
+ this.guild.automatic_messages = this.cache.toArray();
1761
1912
  return this.cache;
1762
1913
  }
1763
1914
  set(data) {
@@ -1786,6 +1937,10 @@ var AutomaticMessageManager = class extends BaseManager {
1786
1937
  });
1787
1938
  return response;
1788
1939
  }
1940
+ toJSON() {
1941
+ [...this.cache.values()].map((m) => console.log(m instanceof AutomaticMessage));
1942
+ return this.cache.toArray();
1943
+ }
1789
1944
  };
1790
1945
 
1791
1946
  // src/managers/bet/GuildBetManager.ts
@@ -1938,7 +2093,8 @@ var LogManager = class extends BaseManager {
1938
2093
  };
1939
2094
 
1940
2095
  // src/structures/match/GuildMatch.ts
1941
- var GuildMatch = class _GuildMatch {
2096
+ var _GuildMatch_instances, updateInternals_fn6;
2097
+ var _GuildMatch = class _GuildMatch {
1942
2098
  /**
1943
2099
  * GuildMatch match
1944
2100
  * @param data The match's data
@@ -1946,6 +2102,7 @@ var GuildMatch = class _GuildMatch {
1946
2102
  * @param rest The rest client
1947
2103
  */
1948
2104
  constructor(data, manager) {
2105
+ __privateAdd(this, _GuildMatch_instances);
1949
2106
  __publicField(this, "_id");
1950
2107
  __publicField(this, "selections");
1951
2108
  /** Match's type */
@@ -2029,7 +2186,7 @@ var GuildMatch = class _GuildMatch {
2029
2186
  method: "get",
2030
2187
  url: route
2031
2188
  });
2032
- return await this._updateInternals(response);
2189
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2033
2190
  }
2034
2191
  async addConfirmed(type, id) {
2035
2192
  const confirmed = this.confirmed.find((c) => c.type === type);
@@ -2051,7 +2208,7 @@ var GuildMatch = class _GuildMatch {
2051
2208
  url: route,
2052
2209
  payload: set
2053
2210
  });
2054
- return await this._updateInternals(response);
2211
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2055
2212
  }
2056
2213
  async setStatus(status) {
2057
2214
  Assertion.assertString(status);
@@ -2062,7 +2219,7 @@ var GuildMatch = class _GuildMatch {
2062
2219
  url: route,
2063
2220
  payload
2064
2221
  });
2065
- return await this._updateInternals(response);
2222
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2066
2223
  }
2067
2224
  async setWinners(players) {
2068
2225
  if (!Array.isArray(players)) players = [players];
@@ -2073,7 +2230,7 @@ var GuildMatch = class _GuildMatch {
2073
2230
  url: route,
2074
2231
  payload
2075
2232
  });
2076
- return await this._updateInternals(response);
2233
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2077
2234
  }
2078
2235
  async setLoser(players) {
2079
2236
  if (!Array.isArray(players)) players = [players];
@@ -2084,7 +2241,7 @@ var GuildMatch = class _GuildMatch {
2084
2241
  url: route,
2085
2242
  payload
2086
2243
  });
2087
- return await this._updateInternals(response);
2244
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2088
2245
  }
2089
2246
  async setMvps(...usersId) {
2090
2247
  const payload = { set: usersId };
@@ -2094,7 +2251,7 @@ var GuildMatch = class _GuildMatch {
2094
2251
  url: route,
2095
2252
  payload
2096
2253
  });
2097
- return await this._updateInternals(response);
2254
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2098
2255
  }
2099
2256
  async setRoomCreatorId(userId) {
2100
2257
  Assertion.assertString(userId);
@@ -2105,7 +2262,7 @@ var GuildMatch = class _GuildMatch {
2105
2262
  url: route,
2106
2263
  payload
2107
2264
  });
2108
- return await this._updateInternals(response);
2265
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2109
2266
  }
2110
2267
  async setRoomAdminId(userId) {
2111
2268
  Assertion.assertString(userId);
@@ -2116,7 +2273,7 @@ var GuildMatch = class _GuildMatch {
2116
2273
  url: route,
2117
2274
  payload
2118
2275
  });
2119
- return await this._updateInternals(response);
2276
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2120
2277
  }
2121
2278
  async kick(player) {
2122
2279
  this.players = this.players.filter((p) => p.id !== player.id);
@@ -2140,7 +2297,7 @@ var GuildMatch = class _GuildMatch {
2140
2297
  payload: data
2141
2298
  });
2142
2299
  this.rest.emit("matchUpdate", this, new _GuildMatch(response, this.manager));
2143
- return await this._updateInternals(response);
2300
+ return await __privateMethod(this, _GuildMatch_instances, updateInternals_fn6).call(this, response);
2144
2301
  }
2145
2302
  async delete() {
2146
2303
  const route = Routes.guilds.matches.resource(this.guild.id, this._id);
@@ -2166,32 +2323,34 @@ var GuildMatch = class _GuildMatch {
2166
2323
  messages: this?.messages instanceof MessagesManager ? this.messages?.cache?.toArray() : []
2167
2324
  };
2168
2325
  }
2169
- async _updateInternals(data) {
2170
- if (!data) return;
2171
- for (let key in data) {
2172
- if (key === "id" || key === "createdAt" || key === "messages") continue;
2173
- if (key in this) {
2174
- this[key] = data[key];
2175
- }
2176
- if (key === "bet") {
2177
- this.bet = this.guild.bets.set(data.bet);
2178
- }
2326
+ };
2327
+ _GuildMatch_instances = new WeakSet();
2328
+ updateInternals_fn6 = async function(data) {
2329
+ if (!data) return;
2330
+ for (let key in data) {
2331
+ if (key === "id" || key === "createdAt" || key === "messages") continue;
2332
+ if (key in this) {
2333
+ this[key] = data[key];
2179
2334
  }
2180
- if (data?.messages?.length !== 0) {
2181
- if (this?.messages instanceof MessagesManager) this.messages.set(data.messages);
2182
- else {
2183
- this.messages = new MessagesManager(this, Routes.guilds.matches.resource(this.guild_id, this._id, "messages"));
2184
- this.messages.set(data.messages);
2185
- }
2335
+ if (key === "bet") {
2336
+ this.bet = this.guild.bets.set(data.bet);
2186
2337
  }
2187
- if (!(this.bet instanceof GuildBet) && data?.bet) {
2188
- this.bet = this.guild.bets.cache.get(data._id) ?? await this.guild.bets.fetch({ betId: data?.bet?._id });
2338
+ }
2339
+ if (data?.messages?.length !== 0) {
2340
+ if (this?.messages instanceof MessagesManager) this.messages.set(data.messages);
2341
+ else {
2342
+ this.messages = new MessagesManager(this, Routes.guilds.matches.resource(this.guild_id, this._id, "messages"));
2343
+ this.messages.set(data.messages);
2189
2344
  }
2190
- this.updatedAt = /* @__PURE__ */ new Date();
2191
- this.manager.set(this);
2192
- return this;
2193
2345
  }
2346
+ if (!(this.bet instanceof GuildBet) && data?.bet) {
2347
+ this.bet = this.guild.bets.cache.get(data._id) ?? await this.guild.bets.fetch({ betId: data?.bet?._id });
2348
+ }
2349
+ this.updatedAt = /* @__PURE__ */ new Date();
2350
+ this.manager.set(this);
2351
+ return this;
2194
2352
  };
2353
+ var GuildMatch = _GuildMatch;
2195
2354
 
2196
2355
  // src/managers/match/GuildMatchManager.ts
2197
2356
  var GuildMatchManager = class extends BaseManager {
@@ -2401,15 +2560,14 @@ var GuildTicketManager = class {
2401
2560
  } else {
2402
2561
  categories.push(data);
2403
2562
  }
2404
- const payload = { tickets_configuration: { categories } };
2405
- const route = Routes.guilds.get(this.guild.id);
2406
- const response = await this.rest.request({
2407
- method: "PATCH",
2408
- url: route,
2409
- payload
2563
+ return this.guild.update({
2564
+ tickets_configuration: {
2565
+ categories,
2566
+ creationCategory: this.guild.tickets_configuration.creationCategory,
2567
+ deletionCategory: this.guild.tickets_configuration.deletionCategory,
2568
+ rating_channel_id: this.guild.tickets_configuration.rating_channel_id
2569
+ }
2410
2570
  });
2411
- this.guild._updateInternals(response);
2412
- return response;
2413
2571
  }
2414
2572
  async deleteTicketCategory(data) {
2415
2573
  let categories = this.guild.tickets_configuration.categories;
@@ -2423,8 +2581,14 @@ var GuildTicketManager = class {
2423
2581
  url: route,
2424
2582
  payload
2425
2583
  });
2426
- this.guild._updateInternals(response);
2427
- return response;
2584
+ return this.guild.update({
2585
+ tickets_configuration: {
2586
+ categories,
2587
+ creationCategory: this.guild.tickets_configuration.creationCategory,
2588
+ deletionCategory: this.guild.tickets_configuration.deletionCategory,
2589
+ rating_channel_id: this.guild.tickets_configuration.rating_channel_id
2590
+ }
2591
+ });
2428
2592
  }
2429
2593
  async fetch(options) {
2430
2594
  if (options && options.cache) return this.cache;
@@ -2495,7 +2659,8 @@ var GuildTicketManager = class {
2495
2659
  };
2496
2660
 
2497
2661
  // src/structures/user/GuildUser.ts
2498
- var GuildUser = class _GuildUser {
2662
+ var _GuildUser_instances, updateInternals_fn7;
2663
+ var _GuildUser = class _GuildUser {
2499
2664
  /**
2500
2665
  * Bet user
2501
2666
  * @param data The user's data
@@ -2503,6 +2668,7 @@ var GuildUser = class _GuildUser {
2503
2668
  * @param rest The rest client
2504
2669
  */
2505
2670
  constructor(data, manager) {
2671
+ __privateAdd(this, _GuildUser_instances);
2506
2672
  /** User's id */
2507
2673
  __publicField(this, "id");
2508
2674
  __publicField(this, "guild_id");
@@ -2615,7 +2781,7 @@ var GuildUser = class _GuildUser {
2615
2781
  url: route,
2616
2782
  payload
2617
2783
  });
2618
- this._updateInternals(response);
2784
+ __privateMethod(this, _GuildUser_instances, updateInternals_fn7).call(this, response);
2619
2785
  return this;
2620
2786
  }
2621
2787
  async updateProfile(data) {
@@ -2636,43 +2802,14 @@ var GuildUser = class _GuildUser {
2636
2802
  url: route,
2637
2803
  payload: _data
2638
2804
  });
2639
- this._updateInternals(response);
2640
- return this;
2641
- }
2642
- _updateInternals(data) {
2643
- for (let key in data) {
2644
- if (key === "id" || key === "createdAt") continue;
2645
- if (key in this) {
2646
- this[key] = data[key];
2647
- }
2648
- if (key === "adverts") {
2649
- this.adverts = [];
2650
- for (let _adv of data.adverts) {
2651
- this.adverts.push({
2652
- _id: _adv._id,
2653
- admin_id: _adv.admin_id,
2654
- role_id: _adv.role_id,
2655
- reason: _adv.reason,
2656
- points_removed: _adv.points_removed,
2657
- proof: _adv.proof,
2658
- proof_ext: _adv.proof_ext,
2659
- createdAt: _adv.createdAt ? new Date(_adv.createdAt) : /* @__PURE__ */ new Date(),
2660
- updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
2661
- });
2662
- }
2663
- }
2664
- }
2665
- this.updatedAt = /* @__PURE__ */ new Date();
2666
- this.createdAt = new Date(data.createdAt);
2667
- this.manager.set(this);
2668
- this.rest.emit("userUpdate", this);
2805
+ __privateMethod(this, _GuildUser_instances, updateInternals_fn7).call(this, response);
2669
2806
  return this;
2670
2807
  }
2671
2808
  async addAdvert(data) {
2672
2809
  const route = Routes.guilds.users.resource(this.manager.guild.id, this.id, "adverts");
2673
2810
  const payload = data;
2674
2811
  const response = await this.rest.request({ method: "POST", url: route, payload });
2675
- return this._updateInternals(response);
2812
+ return __privateMethod(this, _GuildUser_instances, updateInternals_fn7).call(this, response);
2676
2813
  }
2677
2814
  async removeAdvert(advertId) {
2678
2815
  let advs = this.adverts;
@@ -2681,7 +2818,7 @@ var GuildUser = class _GuildUser {
2681
2818
  const payload = { adverts: advs };
2682
2819
  const route = Routes.guilds.users.update(this.manager.guild.id, this.id);
2683
2820
  const response = await this.rest.request({ method: "PATCH", url: route, payload });
2684
- return this._updateInternals(response);
2821
+ return __privateMethod(this, _GuildUser_instances, updateInternals_fn7).call(this, response);
2685
2822
  }
2686
2823
  /**
2687
2824
  * Update certain property
@@ -2732,7 +2869,7 @@ var GuildUser = class _GuildUser {
2732
2869
  url: route,
2733
2870
  payload
2734
2871
  });
2735
- this._updateInternals(response);
2872
+ __privateMethod(this, _GuildUser_instances, updateInternals_fn7).call(this, response);
2736
2873
  return this;
2737
2874
  }
2738
2875
  async delete() {
@@ -2757,6 +2894,37 @@ var GuildUser = class _GuildUser {
2757
2894
  return json;
2758
2895
  }
2759
2896
  };
2897
+ _GuildUser_instances = new WeakSet();
2898
+ updateInternals_fn7 = function(data) {
2899
+ for (let key in data) {
2900
+ if (key === "id" || key === "createdAt") continue;
2901
+ if (key in this) {
2902
+ this[key] = data[key];
2903
+ }
2904
+ if (key === "adverts") {
2905
+ this.adverts = [];
2906
+ for (let _adv of data.adverts) {
2907
+ this.adverts.push({
2908
+ _id: _adv._id,
2909
+ admin_id: _adv.admin_id,
2910
+ role_id: _adv.role_id,
2911
+ reason: _adv.reason,
2912
+ points_removed: _adv.points_removed,
2913
+ proof: _adv.proof,
2914
+ proof_ext: _adv.proof_ext,
2915
+ createdAt: _adv.createdAt ? new Date(_adv.createdAt) : /* @__PURE__ */ new Date(),
2916
+ updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
2917
+ });
2918
+ }
2919
+ }
2920
+ }
2921
+ this.updatedAt = /* @__PURE__ */ new Date();
2922
+ this.createdAt = new Date(data.createdAt);
2923
+ this.manager.set(this);
2924
+ this.rest.emit("userUpdate", this);
2925
+ return this;
2926
+ };
2927
+ var GuildUser = _GuildUser;
2760
2928
 
2761
2929
  // src/managers/user/GuildUserManager.ts
2762
2930
  var GuildUserManager = class extends BaseManager {
@@ -3159,8 +3327,10 @@ var PlayerManager = class extends Collection {
3159
3327
  };
3160
3328
 
3161
3329
  // src/structures/bet/GuildBet.ts
3330
+ var _GuildBet_instances, updateInternals_fn8;
3162
3331
  var GuildBet = class {
3163
3332
  constructor(data, manager) {
3333
+ __privateAdd(this, _GuildBet_instances);
3164
3334
  /** The bet's type */
3165
3335
  __publicField(this, "type");
3166
3336
  /** The bet's mode */
@@ -3239,7 +3409,7 @@ var GuildBet = class {
3239
3409
  async fetch() {
3240
3410
  const route = Routes.guilds.bets.get(this.guild.id, this._id);
3241
3411
  const response = await this.rest.request({ url: route, method: "GET" });
3242
- return this._updateInternals(response);
3412
+ return __privateMethod(this, _GuildBet_instances, updateInternals_fn8).call(this, response);
3243
3413
  }
3244
3414
  async addPlayer(player, queue_type) {
3245
3415
  if (this.players.length === 2) return this;
@@ -3276,7 +3446,7 @@ var GuildBet = class {
3276
3446
  const payload = data;
3277
3447
  const route = Routes.guilds.bets.update(this.guild.id, this._id);
3278
3448
  const response = await this.rest.request({ method: "patch", url: route, payload });
3279
- return this._updateInternals(response);
3449
+ return __privateMethod(this, _GuildBet_instances, updateInternals_fn8).call(this, response);
3280
3450
  }
3281
3451
  async delete() {
3282
3452
  const route = Routes.guilds.bets.delete(this.manager.guild.id, this._id);
@@ -3288,33 +3458,6 @@ var GuildBet = class {
3288
3458
  this.manager.cache.delete(this._id);
3289
3459
  return response;
3290
3460
  }
3291
- _updateInternals(data) {
3292
- for (let key in data) {
3293
- if (key === "_id" || key === "createdAt") continue;
3294
- if (key === "messages") {
3295
- this.messages.set(data[key]);
3296
- continue;
3297
- }
3298
- if (key === "players") {
3299
- this.players._set(data[key]);
3300
- continue;
3301
- }
3302
- if (key in this) {
3303
- this[key] = data[key];
3304
- }
3305
- }
3306
- if (data?.messages?.length !== 0) {
3307
- if (this?.messages instanceof MessagesManager) this.messages.set(data.messages);
3308
- else {
3309
- this.messages = new MessagesManager(this, Routes.guilds.matches.resource(this.guild_id, this._id, "messages"));
3310
- this.messages.set(data.messages);
3311
- }
3312
- }
3313
- this.updatedAt = /* @__PURE__ */ new Date();
3314
- this.createdAt = new Date(data.createdAt);
3315
- this.manager.set(this);
3316
- return this;
3317
- }
3318
3461
  toJSON() {
3319
3462
  let json = {};
3320
3463
  for (const [key, value] of Object.entries(this)) {
@@ -3331,10 +3474,40 @@ var GuildBet = class {
3331
3474
  };
3332
3475
  }
3333
3476
  };
3477
+ _GuildBet_instances = new WeakSet();
3478
+ updateInternals_fn8 = function(data) {
3479
+ for (let key in data) {
3480
+ if (key === "_id" || key === "createdAt") continue;
3481
+ if (key === "messages") {
3482
+ this.messages.set(data[key]);
3483
+ continue;
3484
+ }
3485
+ if (key === "players") {
3486
+ this.players._set(data[key]);
3487
+ continue;
3488
+ }
3489
+ if (key in this) {
3490
+ this[key] = data[key];
3491
+ }
3492
+ }
3493
+ if (data?.messages?.length !== 0) {
3494
+ if (this?.messages instanceof MessagesManager) this.messages.set(data.messages);
3495
+ else {
3496
+ this.messages = new MessagesManager(this, Routes.guilds.matches.resource(this.guild_id, this._id, "messages"));
3497
+ this.messages.set(data.messages);
3498
+ }
3499
+ }
3500
+ this.updatedAt = /* @__PURE__ */ new Date();
3501
+ this.createdAt = new Date(data.createdAt);
3502
+ this.manager.set(this);
3503
+ return this;
3504
+ };
3334
3505
 
3335
3506
  // src/structures/logentry/LogEntry.ts
3507
+ var _LogEntry_instances, updateInternals_fn9;
3336
3508
  var LogEntry = class {
3337
3509
  constructor(data, manager) {
3510
+ __privateAdd(this, _LogEntry_instances);
3338
3511
  __publicField(this, "_id");
3339
3512
  __publicField(this, "guild_id");
3340
3513
  __publicField(this, "user_id");
@@ -3370,9 +3543,9 @@ var LogEntry = class {
3370
3543
  this.updatedAt = data?.updatedAt ? new Date(data?.updatedAt) : /* @__PURE__ */ new Date();
3371
3544
  }
3372
3545
  async fetch() {
3373
- const route = Routes.guilds.resources(this.guild.id, "logs", this._id);
3546
+ const route = Routes.fields("guilds", this.guild.id, "logentries", this._id);
3374
3547
  const response = await this.rest.request({ url: route, method: "GET" });
3375
- return this._updateInternals(response);
3548
+ return __privateMethod(this, _LogEntry_instances, updateInternals_fn9).call(this, response);
3376
3549
  }
3377
3550
  toJSON() {
3378
3551
  const json = {};
@@ -3383,22 +3556,25 @@ var LogEntry = class {
3383
3556
  }
3384
3557
  return json;
3385
3558
  }
3386
- _updateInternals(data) {
3387
- for (let key in data) {
3388
- if (key === "id" || key === "createdAt") continue;
3389
- if (key in this) {
3390
- this[key] = data[key];
3391
- }
3559
+ };
3560
+ _LogEntry_instances = new WeakSet();
3561
+ updateInternals_fn9 = function(data) {
3562
+ for (let key in data) {
3563
+ if (key === "id" || key === "createdAt") continue;
3564
+ if (key in this) {
3565
+ this[key] = data[key];
3392
3566
  }
3393
- this.updatedAt = /* @__PURE__ */ new Date();
3394
- this.manager.set(this);
3395
- return this;
3396
3567
  }
3568
+ this.updatedAt = /* @__PURE__ */ new Date();
3569
+ this.manager.set(this);
3570
+ return this;
3397
3571
  };
3398
3572
 
3399
3573
  // src/structures/ticket/Ticket.ts
3574
+ var _GuildTicket_instances, updateInternals_fn10;
3400
3575
  var GuildTicket = class {
3401
3576
  constructor(data, manager) {
3577
+ __privateAdd(this, _GuildTicket_instances);
3402
3578
  __publicField(this, "_id");
3403
3579
  __publicField(this, "guild_id");
3404
3580
  __publicField(this, "type");
@@ -3435,7 +3611,7 @@ var GuildTicket = class {
3435
3611
  method: "GET",
3436
3612
  url: route
3437
3613
  });
3438
- return this._updateInternals(response);
3614
+ return __privateMethod(this, _GuildTicket_instances, updateInternals_fn10).call(this, response);
3439
3615
  }
3440
3616
  async setCustomerRating(rating) {
3441
3617
  const route = Routes.guilds.tickets.resource(this.guild.id, this._id, "customer_rating");
@@ -3445,7 +3621,7 @@ var GuildTicket = class {
3445
3621
  url: route,
3446
3622
  payload
3447
3623
  });
3448
- return this._updateInternals(response);
3624
+ return __privateMethod(this, _GuildTicket_instances, updateInternals_fn10).call(this, response);
3449
3625
  }
3450
3626
  async setAdminId(id) {
3451
3627
  const route = Routes.guilds.tickets.resource(this.guild.id, this._id, "admin_id");
@@ -3455,7 +3631,7 @@ var GuildTicket = class {
3455
3631
  url: route,
3456
3632
  payload
3457
3633
  });
3458
- return this._updateInternals(response);
3634
+ return __privateMethod(this, _GuildTicket_instances, updateInternals_fn10).call(this, response);
3459
3635
  }
3460
3636
  async setChannelId(id) {
3461
3637
  const route = Routes.guilds.tickets.resource(this.guild.id, this._id, "channel_id");
@@ -3465,7 +3641,7 @@ var GuildTicket = class {
3465
3641
  url: route,
3466
3642
  payload
3467
3643
  });
3468
- return this._updateInternals(response);
3644
+ return __privateMethod(this, _GuildTicket_instances, updateInternals_fn10).call(this, response);
3469
3645
  }
3470
3646
  async setClosedById(id) {
3471
3647
  const route = Routes.guilds.tickets.resource(this.guild.id, this._id, "closed_by_id");
@@ -3475,7 +3651,7 @@ var GuildTicket = class {
3475
3651
  url: route,
3476
3652
  payload
3477
3653
  });
3478
- return this._updateInternals(response);
3654
+ return __privateMethod(this, _GuildTicket_instances, updateInternals_fn10).call(this, response);
3479
3655
  }
3480
3656
  async setStatus(status) {
3481
3657
  const route = Routes.guilds.tickets.resource(this.guild.id, this._id, "status");
@@ -3485,7 +3661,7 @@ var GuildTicket = class {
3485
3661
  url: route,
3486
3662
  payload
3487
3663
  });
3488
- return this._updateInternals(response);
3664
+ return __privateMethod(this, _GuildTicket_instances, updateInternals_fn10).call(this, response);
3489
3665
  }
3490
3666
  async addMessage(message) {
3491
3667
  const route = Routes.guilds.tickets.resource(this.guild.id, this._id, "messages");
@@ -3495,25 +3671,28 @@ var GuildTicket = class {
3495
3671
  url: route,
3496
3672
  payload
3497
3673
  });
3498
- return this._updateInternals(response);
3499
- }
3500
- _updateInternals(data) {
3501
- for (let key in data) {
3502
- if (key === "id" || key === "createdAt") continue;
3503
- if (key in this) {
3504
- this[key] = data[key];
3505
- }
3506
- }
3507
- this.updatedAt = /* @__PURE__ */ new Date();
3508
- this.createdAt = new Date(data.createdAt);
3509
- this.manager.set(this);
3510
- return this;
3674
+ return __privateMethod(this, _GuildTicket_instances, updateInternals_fn10).call(this, response);
3511
3675
  }
3512
3676
  };
3677
+ _GuildTicket_instances = new WeakSet();
3678
+ updateInternals_fn10 = function(data) {
3679
+ for (let key in data) {
3680
+ if (key === "id" || key === "createdAt") continue;
3681
+ if (key in this) {
3682
+ this[key] = data[key];
3683
+ }
3684
+ }
3685
+ this.updatedAt = /* @__PURE__ */ new Date();
3686
+ this.createdAt = new Date(data.createdAt);
3687
+ this.manager.set(this);
3688
+ return this;
3689
+ };
3513
3690
 
3514
3691
  // src/structures/minesgame/MinesGame.ts
3692
+ var _MinesGame_instances, updateInternals_fn11;
3515
3693
  var MinesGame = class {
3516
3694
  constructor(data, manager) {
3695
+ __privateAdd(this, _MinesGame_instances);
3517
3696
  __publicField(this, "guild_id");
3518
3697
  __publicField(this, "_id");
3519
3698
  __publicField(this, "creatorId");
@@ -3547,7 +3726,7 @@ var MinesGame = class {
3547
3726
  method: "GET",
3548
3727
  url: route
3549
3728
  });
3550
- return this._updateInternals(response);
3729
+ return __privateMethod(this, _MinesGame_instances, updateInternals_fn11).call(this, response);
3551
3730
  }
3552
3731
  async delete() {
3553
3732
  const route = `/${Routes.fields("minesgames", this._id)}`;
@@ -3555,7 +3734,7 @@ var MinesGame = class {
3555
3734
  method: "delete",
3556
3735
  url: route
3557
3736
  });
3558
- return this._updateInternals(response);
3737
+ return __privateMethod(this, _MinesGame_instances, updateInternals_fn11).call(this, response);
3559
3738
  }
3560
3739
  async update(data) {
3561
3740
  const route = `/${Routes.fields("minesgames", this._id)}`;
@@ -3564,23 +3743,24 @@ var MinesGame = class {
3564
3743
  url: route,
3565
3744
  payload: data
3566
3745
  });
3567
- return this._updateInternals(response);
3746
+ return __privateMethod(this, _MinesGame_instances, updateInternals_fn11).call(this, response);
3568
3747
  }
3569
- _updateInternals(data) {
3570
- for (let key in data) {
3571
- if (key === "id" || key === "createdAt") continue;
3572
- if (key in this) {
3573
- this[key] = data[key];
3574
- }
3748
+ };
3749
+ _MinesGame_instances = new WeakSet();
3750
+ updateInternals_fn11 = function(data) {
3751
+ for (let key in data) {
3752
+ if (key === "id" || key === "createdAt") continue;
3753
+ if (key in this) {
3754
+ this[key] = data[key];
3575
3755
  }
3576
- this.updatedAt = /* @__PURE__ */ new Date();
3577
- this.manager.set(this);
3578
- return this;
3579
3756
  }
3757
+ this.updatedAt = /* @__PURE__ */ new Date();
3758
+ this.manager.set(this);
3759
+ return this;
3580
3760
  };
3581
3761
  export {
3582
3762
  Collection,
3583
- Guild,
3763
+ Guild2 as Guild,
3584
3764
  GuildBet,
3585
3765
  GuildBetUser,
3586
3766
  GuildMatch,