@duque.edits/sdk 1.6.3 → 1.6.5

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 (59) hide show
  1. package/dist/{index-BwmNIP2p.d.ts → index-Ba4fOyKx.d.ts} +284 -271
  2. package/dist/index.d.ts +2 -1
  3. package/dist/managers/automaticmessage/AutomaticMessageManager.d.ts +2 -1
  4. package/dist/managers/base.d.ts +2 -1
  5. package/dist/managers/bet/GuildBetManager.d.ts +2 -1
  6. package/dist/managers/betuser/GuildBetUserManager.d.ts +2 -1
  7. package/dist/managers/buffer/BufferManager.d.ts +2 -1
  8. package/dist/managers/guild/GuildManager.d.ts +2 -1
  9. package/dist/managers/index.d.ts +2 -1
  10. package/dist/managers/logs/LogManager.d.ts +2 -1
  11. package/dist/managers/match/GuildMatchManager.d.ts +2 -1
  12. package/dist/managers/mediator/GuildMediatorManager.d.ts +2 -1
  13. package/dist/managers/message/MessagesManager.d.ts +2 -1
  14. package/dist/managers/minesgame/MinesGameManager.d.ts +2 -1
  15. package/dist/managers/permission/GuildPermissionManager.d.ts +2 -1
  16. package/dist/managers/player/PlayerManager.d.ts +2 -1
  17. package/dist/managers/product/ProductManager.d.ts +2 -1
  18. package/dist/managers/shop/ShopManager.d.ts +2 -1
  19. package/dist/managers/ticket/TicketManager.d.ts +2 -1
  20. package/dist/managers/ticketpanel/TicketPanelManager.d.ts +2 -1
  21. package/dist/managers/tournament/TournamentManager.d.ts +2 -1
  22. package/dist/managers/user/GuildUserManager.d.ts +2 -1
  23. package/dist/managers/user/GuildUserManager.js +0 -1
  24. package/dist/managers/vipmember/VipMemberManager.d.ts +2 -1
  25. package/dist/rest/REST.d.ts +2 -1
  26. package/dist/rest/index.d.ts +2 -1
  27. package/dist/structures/automaticmessage/AutomaticMessage.d.ts +2 -1
  28. package/dist/structures/bet/GuildBet.d.ts +2 -1
  29. package/dist/structures/betuser/GuildBetUser.d.ts +2 -1
  30. package/dist/structures/guild/Guild.d.ts +2 -1
  31. package/dist/structures/guild/Guild.js +49 -0
  32. package/dist/structures/index.d.ts +2 -1
  33. package/dist/structures/logentry/LogEntry.d.ts +2 -1
  34. package/dist/structures/match/GuildMatch.d.ts +2 -1
  35. package/dist/structures/mediator/GuildMediator.d.ts +2 -1
  36. package/dist/structures/minesgame/MinesGame.d.ts +2 -1
  37. package/dist/structures/product/Product.d.ts +2 -1
  38. package/dist/structures/shop/Shop.d.ts +2 -1
  39. package/dist/structures/ticket/Ticket.d.ts +2 -1
  40. package/dist/structures/ticketpanel/TicketPanel.d.ts +2 -1
  41. package/dist/structures/tournament/Tournament.d.ts +2 -1
  42. package/dist/structures/user/GuildUser.d.ts +2 -1
  43. package/dist/structures/user/GuildUser.js +3 -1
  44. package/dist/structures/vipmember/VipMember.d.ts +2 -1
  45. package/dist/types/RestTypes.d.ts +2 -1
  46. package/dist/types/api/APIAutomaticMessage.d.ts +2 -1
  47. package/dist/types/api/APIAutomaticRole.d.ts +18 -0
  48. package/dist/types/api/APIAutomaticRole.js +36 -0
  49. package/dist/types/api/APIGuild.d.ts +2 -1
  50. package/dist/types/api/APIGuildBet.d.ts +2 -1
  51. package/dist/types/api/APIGuildBetUser.d.ts +2 -1
  52. package/dist/types/api/APIGuildGroupedChannel.d.ts +2 -1
  53. package/dist/types/api/APIGuildMatch.d.ts +2 -1
  54. package/dist/types/api/APIGuildUser.d.ts +2 -1
  55. package/dist/types/api/APITicketPanel.d.ts +2 -1
  56. package/dist/types/api/index.d.ts +2 -1
  57. package/dist/types/api/index.js +2 -0
  58. package/dist/types/index.d.ts +2 -1
  59. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
- export { a3 as LogManager } from '../../index-BwmNIP2p.js';
1
+ export { a3 as LogManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APILogEntry.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
- export { N as GuildMatchManager } from '../../index-BwmNIP2p.js';
1
+ export { N as GuildMatchManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { Q as GuildMediatorManager } from '../../index-BwmNIP2p.js';
1
+ export { Q as GuildMediatorManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildMediator.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { a9 as MessagesManager } from '../../index-BwmNIP2p.js';
1
+ export { a9 as MessagesManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIMessage.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { ab as MinesGameManager } from '../../index-BwmNIP2p.js';
1
+ export { ab as MinesGameManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIMinesGame.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
- export { T as GuildPermissionManager } from '../../index-BwmNIP2p.js';
1
+ export { T as GuildPermissionManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIGuildPermissions.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
1
  import '../../types/api/APIPlayer.js';
2
- export { af as PlayerManager, ag as PlayerOption, as as Structure } from '../../index-BwmNIP2p.js';
2
+ export { af as PlayerManager, ag as PlayerOption, as as Structure } from '../../index-Ba4fOyKx.js';
3
3
  import '../../structures/Collection.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { aA as ProductManager } from '../../index-BwmNIP2p.js';
1
+ export { aA as ProductManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIProduct.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { aq as ShopManager } from '../../index-BwmNIP2p.js';
1
+ export { aq as ShopManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildShop.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { _ as GuildTicketManager } from '../../index-BwmNIP2p.js';
1
+ export { _ as GuildTicketManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildTicket.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
- export { x as FetchReturn, au as TicketPanelManager } from '../../index-BwmNIP2p.js';
1
+ export { x as FetchReturn, au as TicketPanelManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { aw as TournamentManager } from '../../index-BwmNIP2p.js';
1
+ export { aw as TournamentManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APITournament.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
1
  import '../../structures/Collection.js';
2
- export { a1 as GuildUserManager } from '../../index-BwmNIP2p.js';
2
+ export { a1 as GuildUserManager } from '../../index-Ba4fOyKx.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -63,7 +63,6 @@ class GuildUserManager extends import_base.BaseManager {
63
63
  for (let user of users) {
64
64
  if (!user.id) continue;
65
65
  if (user instanceof import_GuildUser.GuildUser) user = user.toJSON();
66
- const _user = this.cache.get(user.id);
67
66
  payloadUsers.push({ ...user });
68
67
  }
69
68
  const url = this.base_url;
@@ -1,7 +1,8 @@
1
- export { az as VipMemberManager } from '../../index-BwmNIP2p.js';
1
+ export { az as VipMemberManager } from '../../index-Ba4fOyKx.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIVipMember.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
1
  import 'events';
2
- export { R as REST } from '../index-BwmNIP2p.js';
2
+ export { R as REST } from '../index-Ba4fOyKx.js';
3
3
  import '../structures/Collection.js';
4
4
  import '../types/api/APIAdvert.js';
5
+ import '../types/api/APIAutomaticRole.js';
5
6
  import '../types/api/APIBaseChannel.js';
6
7
  import '../types/api/APIBetChannel.js';
7
8
  import '../types/api/APIBuff.js';
@@ -1,8 +1,9 @@
1
1
  export { APIEndpoint, APIEndpoints } from './APIEndpoints.js';
2
2
  export { Routes } from './Routes.js';
3
- export { R as REST } from '../index-BwmNIP2p.js';
3
+ export { R as REST } from '../index-Ba4fOyKx.js';
4
4
  import '../structures/Collection.js';
5
5
  import '../types/api/APIAdvert.js';
6
+ import '../types/api/APIAutomaticRole.js';
6
7
  import '../types/api/APIBaseChannel.js';
7
8
  import '../types/api/APIBetChannel.js';
8
9
  import '../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
1
  import 'discord-api-types/v10';
2
- export { j as AutomaticMessage } from '../../index-BwmNIP2p.js';
2
+ export { j as AutomaticMessage } from '../../index-Ba4fOyKx.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { y as GuildBet } from '../../index-BwmNIP2p.js';
1
+ export { y as GuildBet } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APIBetChannel.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBuff.js';
7
8
  import '../../types/api/APICode.js';
@@ -1,5 +1,6 @@
1
- export { E as GuildBetUser } from '../../index-BwmNIP2p.js';
1
+ export { E as GuildBetUser } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIAdvert.js';
3
+ import '../../types/api/APIAutomaticRole.js';
3
4
  import '../../types/api/APIBaseChannel.js';
4
5
  import '../../types/api/APIBetChannel.js';
5
6
  import '../../types/api/APIBuff.js';
@@ -1,5 +1,6 @@
1
- export { G as Guild } from '../../index-BwmNIP2p.js';
1
+ export { G as Guild } from '../../index-Ba4fOyKx.js';
2
2
  import '../Collection.js';
3
+ import '../../types/api/APIAutomaticRole.js';
3
4
  import '../../types/api/APIBuff.js';
4
5
  import '../../types/api/APITimer.js';
5
6
  import '../../types/api/APIGuildPermissions.js';
@@ -103,6 +103,7 @@ class Guild {
103
103
  __publicField(this, "codes");
104
104
  __publicField(this, "coin_symbol");
105
105
  __publicField(this, "buffs");
106
+ __publicField(this, "automatic_roles");
106
107
  this.data = data;
107
108
  this.rest = rest;
108
109
  this.id = data?.id;
@@ -207,6 +208,14 @@ class Guild {
207
208
  updatedAt: new Date(buff.updatedAt)
208
209
  });
209
210
  }
211
+ this.automatic_roles = new import_Collection.Collection();
212
+ for (let role of data?.automatic_roles || []) {
213
+ this.automatic_roles.set(role._id, {
214
+ ...role,
215
+ createdAt: new Date(role.createdAt),
216
+ updatedAt: new Date(role.updatedAt)
217
+ });
218
+ }
210
219
  }
211
220
  async _start() {
212
221
  await Promise.all([
@@ -596,10 +605,40 @@ class Guild {
596
605
  });
597
606
  return __privateMethod(this, _Guild_instances, update_fn).call(this, response);
598
607
  }
608
+ async createAutomaticRole(data) {
609
+ const role = this.automatic_roles.find((b) => b.role_id === data.role_id);
610
+ if (role) this.automatic_roles.delete(role._id);
611
+ const payload = {
612
+ ...data,
613
+ _id: (0, import_randomKeyGenerator.randomKeyGenerator)(24, "hex").toLowerCase(),
614
+ createdAt: /* @__PURE__ */ new Date(),
615
+ updatedAt: /* @__PURE__ */ new Date()
616
+ };
617
+ this.automatic_roles.set(payload._id, payload);
618
+ const route = import_Routes.Routes.guilds.get(this.id);
619
+ const response = await this.rest.request({
620
+ payload: { automatic_roles: this.automatic_roles.toArray() },
621
+ url: route,
622
+ method: "PATCH"
623
+ });
624
+ await __privateMethod(this, _Guild_instances, update_fn).call(this, response);
625
+ return payload;
626
+ }
627
+ async deleteDeleteAutomaticRole(id) {
628
+ this.automatic_roles.delete(id);
629
+ const route = import_Routes.Routes.guilds.get(this.id);
630
+ const response = await this.rest.request({
631
+ payload: { automatic_roles: this.automatic_roles.toArray() },
632
+ url: route,
633
+ method: "PATCH"
634
+ });
635
+ return __privateMethod(this, _Guild_instances, update_fn).call(this, response);
636
+ }
599
637
  toJSON() {
600
638
  return {
601
639
  adverts: this.adverts,
602
640
  max_bets_per_users: this.max_bets_per_users,
641
+ automatic_roles: this.automatic_roles.toArray(),
603
642
  bet_count: this.bet_count,
604
643
  channels: this.channels,
605
644
  client_key: this.client_key,
@@ -686,6 +725,16 @@ update_fn = function(data) {
686
725
  });
687
726
  }
688
727
  }
728
+ if ("automatic_roles" in data) {
729
+ this.automatic_roles = new import_Collection.Collection();
730
+ for (let role of data?.automatic_roles || []) {
731
+ this.automatic_roles.set(role._id, {
732
+ ...role,
733
+ createdAt: new Date(role.createdAt),
734
+ updatedAt: new Date(role.updatedAt)
735
+ });
736
+ }
737
+ }
689
738
  this.updatedAt = /* @__PURE__ */ new Date();
690
739
  this.rest.guilds.cache.set(this.id, this);
691
740
  this.rest.emit("guildUpdate", this);
@@ -1,6 +1,7 @@
1
- export { j as AutomaticMessage, G as Guild, y as GuildBet, E as GuildBetUser, L as GuildMatch, P as GuildMediator, Y as GuildTicket, a0 as GuildUser, a2 as LogEntry, aa as MinesGame, ah as Product, ap as Shop, at as TicketPanel, av as Tournament, ay as VipMember } from '../index-BwmNIP2p.js';
1
+ export { j as AutomaticMessage, G as Guild, y as GuildBet, E as GuildBetUser, L as GuildMatch, P as GuildMediator, Y as GuildTicket, a0 as GuildUser, a2 as LogEntry, aa as MinesGame, ah as Product, ap as Shop, at as TicketPanel, av as Tournament, ay as VipMember } from '../index-Ba4fOyKx.js';
2
2
  export { Collection } from './Collection.js';
3
3
  import '../types/api/APIAdvert.js';
4
+ import '../types/api/APIAutomaticRole.js';
4
5
  import '../types/api/APIBaseChannel.js';
5
6
  import '../types/api/APIBetChannel.js';
6
7
  import '../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
- export { a2 as LogEntry } from '../../index-BwmNIP2p.js';
1
+ export { a2 as LogEntry } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APILogEntry.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { L as GuildMatch } from '../../index-BwmNIP2p.js';
1
+ export { L as GuildMatch } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APIBaseChannel.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
7
8
  import '../../types/api/APICode.js';
@@ -1,6 +1,7 @@
1
- export { P as GuildMediator } from '../../index-BwmNIP2p.js';
1
+ export { P as GuildMediator } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIGuildMediator.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
- export { aa as MinesGame } from '../../index-BwmNIP2p.js';
1
+ export { aa as MinesGame } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIMinesGame.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { ah as Product } from '../../index-BwmNIP2p.js';
1
+ export { ah as Product } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APIProduct.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
1
  import 'discord-api-types/v10';
2
- export { ap as Shop } from '../../index-BwmNIP2p.js';
2
+ export { ap as Shop } from '../../index-Ba4fOyKx.js';
3
3
  import '../../types/api/APIGuildShop.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
- export { Y as GuildTicket } from '../../index-BwmNIP2p.js';
1
+ export { Y as GuildTicket } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIGuildTicket.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
1
  import 'discord-api-types/v10';
2
- export { at as TicketPanel } from '../../index-BwmNIP2p.js';
2
+ export { at as TicketPanel } from '../../index-Ba4fOyKx.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,7 +1,8 @@
1
- export { av as Tournament } from '../../index-BwmNIP2p.js';
1
+ export { av as Tournament } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APITournament.js';
4
4
  import '../../types/api/APIAdvert.js';
5
+ import '../../types/api/APIAutomaticRole.js';
5
6
  import '../../types/api/APIBaseChannel.js';
6
7
  import '../../types/api/APIBetChannel.js';
7
8
  import '../../types/api/APIBuff.js';
@@ -1,5 +1,6 @@
1
- export { a0 as GuildUser } from '../../index-BwmNIP2p.js';
1
+ export { a0 as GuildUser } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIAdvert.js';
3
+ import '../../types/api/APIAutomaticRole.js';
3
4
  import '../../types/api/APIBaseChannel.js';
4
5
  import '../../types/api/APIBetChannel.js';
5
6
  import '../../types/api/APIBuff.js';
@@ -79,10 +79,12 @@ const _GuildUser = class _GuildUser {
79
79
  __publicField(this, "manager");
80
80
  /** The rest client */
81
81
  __publicField(this, "rest");
82
+ __publicField(this, "guild");
82
83
  this.id = data?.id;
83
84
  this.guild_id = data?.guild_id;
84
85
  this.manager = manager;
85
86
  this.rest = manager.rest;
87
+ this.guild = manager.guild;
86
88
  this.wins = data?.wins;
87
89
  this.losses = data?.losses;
88
90
  this.mvps = data?.mvps;
@@ -492,7 +494,7 @@ update_fn = function(data) {
492
494
  this.updatedAt = /* @__PURE__ */ new Date();
493
495
  this.createdAt = new Date(data.createdAt);
494
496
  this.manager.set(this);
495
- this.rest.emit("userUpdate", this);
497
+ this.rest.emit("userUpdate", this, this.guild);
496
498
  return this;
497
499
  };
498
500
  let GuildUser = _GuildUser;
@@ -1,6 +1,7 @@
1
- export { ay as VipMember } from '../../index-BwmNIP2p.js';
1
+ export { ay as VipMember } from '../../index-Ba4fOyKx.js';
2
2
  import '../../types/api/APIVipMember.js';
3
3
  import '../../types/api/APIAdvert.js';
4
+ import '../../types/api/APIAutomaticRole.js';
4
5
  import '../../types/api/APIBaseChannel.js';
5
6
  import '../../types/api/APIBetChannel.js';
6
7
  import '../../types/api/APIBuff.js';
@@ -1,6 +1,7 @@
1
1
  import '../structures/Collection.js';
2
- export { ak as RequestOptions, al as RestEvents } from '../index-BwmNIP2p.js';
2
+ export { ak as RequestOptions, al as RestEvents } from '../index-Ba4fOyKx.js';
3
3
  import './api/APIAdvert.js';
4
+ import './api/APIAutomaticRole.js';
4
5
  import './api/APIBaseChannel.js';
5
6
  import './api/APIBetChannel.js';
6
7
  import './api/APIBuff.js';
@@ -1,6 +1,7 @@
1
1
  import 'discord-api-types/v10';
2
- export { A as APIAutomaticMessage, l as AutomaticMessagePayload } from '../../index-BwmNIP2p.js';
2
+ export { A as APIAutomaticMessage, l as AutomaticMessagePayload } from '../../index-Ba4fOyKx.js';
3
3
  import './APIAdvert.js';
4
+ import './APIAutomaticRole.js';
4
5
  import './APIBaseChannel.js';
5
6
  import './APIBetChannel.js';
6
7
  import './APIBuff.js';
@@ -0,0 +1,18 @@
1
+ declare enum AutomaticRolesTypes {
2
+ Points = "points",
3
+ Coins = "coins",
4
+ Losses = "losses",
5
+ Mvps = "mvps",
6
+ Wins = "wins",
7
+ Creations = "creations"
8
+ }
9
+ interface APIAutomaticRole {
10
+ _id: string;
11
+ type: AutomaticRolesTypes;
12
+ role_id: string;
13
+ rule: number;
14
+ createdAt?: Date;
15
+ updatedAt?: Date;
16
+ }
17
+
18
+ export { type APIAutomaticRole, AutomaticRolesTypes };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var APIAutomaticRole_exports = {};
20
+ __export(APIAutomaticRole_exports, {
21
+ AutomaticRolesTypes: () => AutomaticRolesTypes
22
+ });
23
+ module.exports = __toCommonJS(APIAutomaticRole_exports);
24
+ var AutomaticRolesTypes = /* @__PURE__ */ ((AutomaticRolesTypes2) => {
25
+ AutomaticRolesTypes2["Points"] = "points";
26
+ AutomaticRolesTypes2["Coins"] = "coins";
27
+ AutomaticRolesTypes2["Losses"] = "losses";
28
+ AutomaticRolesTypes2["Mvps"] = "mvps";
29
+ AutomaticRolesTypes2["Wins"] = "wins";
30
+ AutomaticRolesTypes2["Creations"] = "creations";
31
+ return AutomaticRolesTypes2;
32
+ })(AutomaticRolesTypes || {});
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ AutomaticRolesTypes
36
+ });
@@ -1,4 +1,5 @@
1
- export { a as APIGuild, m as AutomaticMessagesTypes, w as DailyCategories, I as GuildChannelsType, J as GuildLogsWebhookUrls, S as GuildModes, U as GuildPrices, V as GuildScores, W as GuildStatus, X as GuildStatusEnum, Z as GuildTicketConfiguration, $ as GuildTimerTypes, am as RoulettePrize, an as RouletteSettings } from '../../index-BwmNIP2p.js';
1
+ export { a as APIGuild, m as AutomaticMessagesTypes, w as DailyCategories, I as GuildChannelsType, J as GuildLogsWebhookUrls, S as GuildModes, U as GuildPrices, V as GuildScores, W as GuildStatus, X as GuildStatusEnum, Z as GuildTicketConfiguration, $ as GuildTimerTypes, am as RoulettePrize, an as RouletteSettings } from '../../index-Ba4fOyKx.js';
2
+ import './APIAutomaticRole.js';
2
3
  import './APIBuff.js';
3
4
  import './APIGuildPermissions.js';
4
5
  import './APITimer.js';
@@ -1,8 +1,9 @@
1
- export { b as APIGuildBet, r as BetChannelTypes, s as BetQueue } from '../../index-BwmNIP2p.js';
1
+ export { b as APIGuildBet, r as BetChannelTypes, s as BetQueue } from '../../index-Ba4fOyKx.js';
2
2
  import './APIBetChannel.js';
3
3
  import './APIMessage.js';
4
4
  import './APIPlayer.js';
5
5
  import './APIAdvert.js';
6
+ import './APIAutomaticRole.js';
6
7
  import './APIBaseChannel.js';
7
8
  import './APIBuff.js';
8
9
  import './APICode.js';
@@ -1,5 +1,6 @@
1
- export { c as APIGuildBetUser } from '../../index-BwmNIP2p.js';
1
+ export { c as APIGuildBetUser } from '../../index-Ba4fOyKx.js';
2
2
  import './APIAdvert.js';
3
+ import './APIAutomaticRole.js';
3
4
  import './APIBaseChannel.js';
4
5
  import './APIBetChannel.js';
5
6
  import './APIBuff.js';
@@ -1,5 +1,6 @@
1
- export { d as APIGuildGroupedChannel } from '../../index-BwmNIP2p.js';
1
+ export { d as APIGuildGroupedChannel } from '../../index-Ba4fOyKx.js';
2
2
  import './APIAdvert.js';
3
+ import './APIAutomaticRole.js';
3
4
  import './APIBaseChannel.js';
4
5
  import './APIBetChannel.js';
5
6
  import './APIBuff.js';
@@ -1,8 +1,9 @@
1
- export { e as APIGuildMatch, M as GuildMatchChannelsType, O as GuildMatchMessagesType, a8 as MatchSelection } from '../../index-BwmNIP2p.js';
1
+ export { e as APIGuildMatch, M as GuildMatchChannelsType, O as GuildMatchMessagesType, a8 as MatchSelection } from '../../index-Ba4fOyKx.js';
2
2
  import './APIPlayer.js';
3
3
  import './APIBaseChannel.js';
4
4
  import './APIMessage.js';
5
5
  import './APIAdvert.js';
6
+ import './APIAutomaticRole.js';
6
7
  import './APIBetChannel.js';
7
8
  import './APIBuff.js';
8
9
  import './APICode.js';
@@ -1,5 +1,6 @@
1
- export { f as APIGuildUser, ai as Profile } from '../../index-BwmNIP2p.js';
1
+ export { f as APIGuildUser, ai as Profile } from '../../index-Ba4fOyKx.js';
2
2
  import './APIAdvert.js';
3
+ import './APIAutomaticRole.js';
3
4
  import './APIBaseChannel.js';
4
5
  import './APIBetChannel.js';
5
6
  import './APIBuff.js';
@@ -1,6 +1,7 @@
1
1
  import 'discord-api-types/v10';
2
- export { h as APITicketPanel } from '../../index-BwmNIP2p.js';
2
+ export { h as APITicketPanel } from '../../index-Ba4fOyKx.js';
3
3
  import './APIAdvert.js';
4
+ import './APIAutomaticRole.js';
4
5
  import './APIBaseChannel.js';
5
6
  import './APIBetChannel.js';
6
7
  import './APIBuff.js';
@@ -1,5 +1,6 @@
1
1
  export { APIAdvert } from './APIAdvert.js';
2
- export { A as APIAutomaticMessage, a as APIGuild, b as APIGuildBet, c as APIGuildBetUser, d as APIGuildGroupedChannel, e as APIGuildMatch, f as APIGuildUser, g as APITicketCategory, h as APITicketPanel, i as Accessory, l as AutomaticMessagePayload, m as AutomaticMessagesTypes, B as BETSTATUS, n as Banner, p as BaseMatchModes, q as BaseMatchStatus, r as BetChannelTypes, s as BetQueue, C as Confirm, D as Daily, w as DailyCategories, I as GuildChannelsType, J as GuildLogsWebhookUrls, M as GuildMatchChannelsType, O as GuildMatchMessagesType, S as GuildModes, U as GuildPrices, V as GuildScores, W as GuildStatus, X as GuildStatusEnum, Z as GuildTicketConfiguration, $ as GuildTimerTypes, a4 as LogMessage, a5 as Logs, a6 as MATCHSTATUS, a7 as MATCHTYPES, a8 as MatchSelection, ac as Optional, ad as OriginalChannel, ae as OriginalChannels, ai as Profile, aj as ProfileCard, am as RoulettePrize, an as RouletteSettings, ao as STATES, ar as StatusResponse, ax as UserAccessoryType } from '../../index-BwmNIP2p.js';
2
+ export { A as APIAutomaticMessage, a as APIGuild, b as APIGuildBet, c as APIGuildBetUser, d as APIGuildGroupedChannel, e as APIGuildMatch, f as APIGuildUser, g as APITicketCategory, h as APITicketPanel, i as Accessory, l as AutomaticMessagePayload, m as AutomaticMessagesTypes, B as BETSTATUS, n as Banner, p as BaseMatchModes, q as BaseMatchStatus, r as BetChannelTypes, s as BetQueue, C as Confirm, D as Daily, w as DailyCategories, I as GuildChannelsType, J as GuildLogsWebhookUrls, M as GuildMatchChannelsType, O as GuildMatchMessagesType, S as GuildModes, U as GuildPrices, V as GuildScores, W as GuildStatus, X as GuildStatusEnum, Z as GuildTicketConfiguration, $ as GuildTimerTypes, a4 as LogMessage, a5 as Logs, a6 as MATCHSTATUS, a7 as MATCHTYPES, a8 as MatchSelection, ac as Optional, ad as OriginalChannel, ae as OriginalChannels, ai as Profile, aj as ProfileCard, am as RoulettePrize, an as RouletteSettings, ao as STATES, ar as StatusResponse, ax as UserAccessoryType } from '../../index-Ba4fOyKx.js';
3
+ export { APIAutomaticRole, AutomaticRolesTypes } from './APIAutomaticRole.js';
3
4
  export { APIBaseChannel } from './APIBaseChannel.js';
4
5
  export { APIBetChannel } from './APIBetChannel.js';
5
6
  export { APIBuff } from './APIBuff.js';