@duque.edits/sdk 1.6.5 → 1.6.7

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 (76) hide show
  1. package/dist/{index-Ba4fOyKx.d.ts → index-26CPLcdp.d.ts} +19 -4
  2. package/dist/index.d.ts +1 -1
  3. package/dist/managers/automaticmessage/AutomaticMessageManager.d.ts +1 -1
  4. package/dist/managers/base.d.ts +1 -1
  5. package/dist/managers/bet/GuildBetManager.d.ts +1 -1
  6. package/dist/managers/bet/GuildBetManager.js +4 -0
  7. package/dist/managers/betuser/GuildBetUserManager.d.ts +1 -1
  8. package/dist/managers/betuser/GuildBetUserManager.js +4 -0
  9. package/dist/managers/buffer/BufferManager.d.ts +1 -1
  10. package/dist/managers/guild/GuildManager.d.ts +1 -1
  11. package/dist/managers/guild/GuildManager.js +4 -0
  12. package/dist/managers/index.d.ts +1 -1
  13. package/dist/managers/logs/LogManager.d.ts +1 -1
  14. package/dist/managers/logs/LogManager.js +4 -0
  15. package/dist/managers/match/GuildMatchManager.d.ts +1 -1
  16. package/dist/managers/match/GuildMatchManager.js +4 -0
  17. package/dist/managers/mediator/GuildMediatorManager.d.ts +1 -1
  18. package/dist/managers/mediator/GuildMediatorManager.js +4 -0
  19. package/dist/managers/message/MessagesManager.d.ts +1 -1
  20. package/dist/managers/message/MessagesManager.js +21 -6
  21. package/dist/managers/minesgame/MinesGameManager.d.ts +1 -1
  22. package/dist/managers/minesgame/MinesGameManager.js +4 -0
  23. package/dist/managers/permission/GuildPermissionManager.d.ts +1 -1
  24. package/dist/managers/player/PlayerManager.d.ts +1 -1
  25. package/dist/managers/product/ProductManager.d.ts +1 -1
  26. package/dist/managers/product/ProductManager.js +2 -1
  27. package/dist/managers/shop/ShopManager.d.ts +1 -1
  28. package/dist/managers/shop/ShopManager.js +2 -1
  29. package/dist/managers/ticket/TicketManager.d.ts +1 -1
  30. package/dist/managers/ticket/TicketManager.js +4 -0
  31. package/dist/managers/ticketpanel/TicketPanelManager.d.ts +1 -1
  32. package/dist/managers/ticketpanel/TicketPanelManager.js +2 -1
  33. package/dist/managers/tournament/TournamentManager.d.ts +1 -1
  34. package/dist/managers/tournament/TournamentManager.js +4 -0
  35. package/dist/managers/user/GuildUserManager.d.ts +1 -1
  36. package/dist/managers/user/GuildUserManager.js +4 -0
  37. package/dist/managers/vipmember/VipMemberManager.d.ts +1 -1
  38. package/dist/managers/vipmember/VipMemberManager.js +4 -0
  39. package/dist/rest/REST.d.ts +1 -1
  40. package/dist/rest/index.d.ts +1 -1
  41. package/dist/structures/automaticmessage/AutomaticMessage.d.ts +1 -1
  42. package/dist/structures/bet/GuildBet.d.ts +1 -1
  43. package/dist/structures/bet/GuildBet.js +19 -11
  44. package/dist/structures/betuser/GuildBetUser.d.ts +1 -1
  45. package/dist/structures/betuser/GuildBetUser.js +17 -9
  46. package/dist/structures/guild/Guild.d.ts +1 -1
  47. package/dist/structures/index.d.ts +1 -1
  48. package/dist/structures/logentry/LogEntry.d.ts +1 -1
  49. package/dist/structures/match/GuildMatch.d.ts +1 -1
  50. package/dist/structures/match/GuildMatch.js +30 -10
  51. package/dist/structures/mediator/GuildMediator.d.ts +1 -1
  52. package/dist/structures/mediator/GuildMediator.js +11 -9
  53. package/dist/structures/minesgame/MinesGame.d.ts +1 -1
  54. package/dist/structures/minesgame/MinesGame.js +15 -0
  55. package/dist/structures/product/Product.d.ts +1 -1
  56. package/dist/structures/shop/Shop.d.ts +1 -1
  57. package/dist/structures/ticket/Ticket.d.ts +1 -1
  58. package/dist/structures/ticket/Ticket.js +16 -0
  59. package/dist/structures/ticketpanel/TicketPanel.d.ts +1 -1
  60. package/dist/structures/tournament/Tournament.d.ts +1 -1
  61. package/dist/structures/user/GuildUser.d.ts +1 -1
  62. package/dist/structures/user/GuildUser.js +2 -4
  63. package/dist/structures/vipmember/VipMember.d.ts +1 -1
  64. package/dist/structures/vipmember/VipMember.js +12 -7
  65. package/dist/types/RestTypes.d.ts +1 -1
  66. package/dist/types/api/APIAutomaticMessage.d.ts +1 -1
  67. package/dist/types/api/APIGuild.d.ts +1 -1
  68. package/dist/types/api/APIGuildBet.d.ts +1 -1
  69. package/dist/types/api/APIGuildBetUser.d.ts +1 -1
  70. package/dist/types/api/APIGuildGroupedChannel.d.ts +1 -1
  71. package/dist/types/api/APIGuildMatch.d.ts +1 -1
  72. package/dist/types/api/APIGuildUser.d.ts +1 -1
  73. package/dist/types/api/APITicketPanel.d.ts +1 -1
  74. package/dist/types/api/index.d.ts +1 -1
  75. package/dist/types/index.d.ts +1 -1
  76. package/package.json +1 -1
@@ -319,6 +319,7 @@ declare class GuildBetUserManager extends BaseManager<GuildBetUser> {
319
319
  deleteAll(): Promise<void>;
320
320
  resetAll(): Promise<GuildBetUser | Collection<string, GuildBetUser>>;
321
321
  set(data: APIGuildBetUser | APIGuildBetUser[]): GuildBetUser | Collection<string, GuildBetUser>;
322
+ toJSON(): APIGuildBetUser[];
322
323
  }
323
324
 
324
325
  declare class GuildBetUser implements APIGuildBetUser {
@@ -541,7 +542,7 @@ declare class GuildMatch {
541
542
  kick(player: Optional<APIPlayer>): Promise<GuildMatch>;
542
543
  update(data: Optional<APIGuildMatch>): Promise<GuildMatch>;
543
544
  delete(): Promise<boolean>;
544
- toJSON(): Optional<APIGuildMatch>;
545
+ toJSON(): APIGuildMatch;
545
546
  }
546
547
 
547
548
  interface Profile {
@@ -606,6 +607,7 @@ declare class GuildUserManager extends BaseManager<GuildUser> {
606
607
  deleteAll(): Promise<void>;
607
608
  resetAll(): Promise<Collection<string, GuildUser>>;
608
609
  set(data: APIGuildUser | APIGuildUser[]): GuildUser | Collection<string, GuildUser>;
610
+ toJSON(): APIGuildUser[];
609
611
  }
610
612
 
611
613
  declare class GuildUser implements APIGuildUser {
@@ -833,6 +835,7 @@ declare class GuildMediatorManager extends BaseManager<GuildMediator> {
833
835
  deleteAll(): Promise<void>;
834
836
  resetAll(): Promise<Collection<string, GuildMediator>>;
835
837
  set(data: APIGuildMediator | APIGuildMediator[]): GuildMediator | Collection<string, GuildMediator>;
838
+ toJSON(): APIGuildMediator[];
836
839
  }
837
840
 
838
841
  declare class GuildMediator implements APIGuildMediator {
@@ -878,7 +881,7 @@ declare class GuildMediator implements APIGuildMediator {
878
881
  update(data: Optional<APIGuildMediator>): Promise<this>;
879
882
  setPaymentlink(type: string, link: string): Promise<this>;
880
883
  delete(): Promise<boolean>;
881
- toJSON(): Optional<APIGuildMediator>;
884
+ toJSON(): APIGuildMediator;
882
885
  }
883
886
 
884
887
  type FetchReturn<T> = T extends null ? Collection<string, TicketPanel> : TicketPanel;
@@ -930,6 +933,7 @@ declare class TournamentManager extends BaseManager<Tournament> {
930
933
  set(data: APITournament | APITournament[]): Collection<string, Tournament>;
931
934
  _add(data: APITournament | APITournament[]): Tournament | Collection<string, Tournament>;
932
935
  create(data: Optional<APITournament>): Promise<Tournament>;
936
+ toJSON(): APITournament[];
933
937
  }
934
938
 
935
939
  declare class Tournament {
@@ -993,6 +997,7 @@ declare class VipMemberManager extends BaseManager<VipMember> {
993
997
  resetAll(): Promise<Collection<string, VipMember>>;
994
998
  delete(id: string): Promise<Collection<string, VipMember>>;
995
999
  deleteAll(): Promise<boolean>;
1000
+ toJSON(): APIVipMember[];
996
1001
  }
997
1002
 
998
1003
  declare class VipMember implements APIVipMember {
@@ -1042,7 +1047,7 @@ declare class VipMember implements APIVipMember {
1042
1047
  */
1043
1048
  update(data: Optional<APIVipMember>): Promise<this>;
1044
1049
  delete(): Promise<boolean>;
1045
- toJSON(): Record<keyof APIVipMember, unknown>;
1050
+ toJSON(): APIVipMember;
1046
1051
  }
1047
1052
 
1048
1053
  declare class GuildTicket {
@@ -1070,6 +1075,7 @@ declare class GuildTicket {
1070
1075
  setChannelId(id: string): Promise<GuildTicket>;
1071
1076
  setClosedById(id: string): Promise<GuildTicket>;
1072
1077
  setStatus(status: "on" | "off"): Promise<GuildTicket>;
1078
+ toJSON(): APIGuildTicket;
1073
1079
  }
1074
1080
 
1075
1081
  interface FetchOptions$5 {
@@ -1084,6 +1090,7 @@ declare class MinesGameManager {
1084
1090
  delete(gameId: string): Promise<unknown>;
1085
1091
  fetch(options?: FetchOptions$5): Promise<MinesGame | Collection<string, MinesGame>>;
1086
1092
  set(data: APIMinesGame | APIMinesGame[]): MinesGame | Collection<string, MinesGame>;
1093
+ toJSON(): APIMinesGame[];
1087
1094
  }
1088
1095
 
1089
1096
  declare class MinesGame {
@@ -1105,6 +1112,7 @@ declare class MinesGame {
1105
1112
  fetch(): Promise<this>;
1106
1113
  delete(): Promise<this>;
1107
1114
  update(data: Optional<APIMinesGame>): Promise<this>;
1115
+ toJSON(): APIMinesGame;
1108
1116
  }
1109
1117
 
1110
1118
  type FetchOptions$4 = {
@@ -1541,6 +1549,7 @@ declare class GuildManager {
1541
1549
  reset(guildId?: string): Promise<Guild | Collection<string, Guild>>;
1542
1550
  delete(options: DeleteOptions$1): Promise<Collection<string, Guild> | boolean>;
1543
1551
  set(data: APIGuild | APIGuild[]): Guild | Collection<string, Guild>;
1552
+ toJSON(): APIGuild[];
1544
1553
  }
1545
1554
 
1546
1555
  interface ClientOptions {
@@ -1623,6 +1632,7 @@ declare class GuildBetManager extends BaseManager<GuildBet> {
1623
1632
  create(data: Optional<APIGuildBet>): Promise<GuildBet>;
1624
1633
  delete(betId?: string): Promise<GuildBet>;
1625
1634
  set(data: Optional<APIGuildBet> | Optional<APIGuildBet>[] | GuildBet): GuildBet;
1635
+ toJSON(): APIGuildBet[];
1626
1636
  }
1627
1637
 
1628
1638
  type BufferMatch = Optional<APIGuildMatch & {
@@ -1646,6 +1656,7 @@ declare class LogManager extends BaseManager<LogEntry> {
1646
1656
  fetch(): Promise<Collection<string, LogEntry>>;
1647
1657
  create(data: Optional<APILogEntry>): Promise<LogEntry>;
1648
1658
  set(data: APILogEntry | APILogEntry[]): LogEntry | Collection<string, LogEntry>;
1659
+ toJSON(): APILogEntry[];
1649
1660
  }
1650
1661
 
1651
1662
  type FetchOptions$1 = {
@@ -1669,6 +1680,7 @@ declare class GuildMatchManager extends BaseManager<GuildMatch> {
1669
1680
  set(data: APIGuildMatch | APIGuildMatch[] | GuildMatch): GuildMatch | Collection<string, GuildMatch>;
1670
1681
  create(payload: Optional<APIGuildMatch>): Promise<GuildMatch>;
1671
1682
  delete(id?: string): Promise<GuildMatch | Collection<string, GuildMatch>>;
1683
+ toJSON(): APIGuildMatch[];
1672
1684
  }
1673
1685
 
1674
1686
  type T<e> = e & {
@@ -1678,6 +1690,7 @@ type T<e> = e & {
1678
1690
  };
1679
1691
  declare class MessagesManager<Structure> {
1680
1692
  cache: Collection<string, APIMessage>;
1693
+ _messages: APIMessage[];
1681
1694
  readonly base_url: string;
1682
1695
  readonly rest: REST;
1683
1696
  readonly guild: Guild;
@@ -1685,6 +1698,7 @@ declare class MessagesManager<Structure> {
1685
1698
  fetch(): Promise<APIMessage>;
1686
1699
  create(data: Optional<APIMessage> | Optional<APIMessage>[]): Promise<Collection<string, APIMessage>>;
1687
1700
  set(data: APIMessage | APIMessage[]): Collection<string, APIMessage>;
1701
+ toJSON(): APIMessage[];
1688
1702
  }
1689
1703
 
1690
1704
  declare class GuildPermissionManager extends BaseManager<APIGuildPermissions> {
@@ -1705,7 +1719,7 @@ declare class ShopManager extends BaseManager<Shop> {
1705
1719
  create(data: Optional<APIGuildShop>): Promise<Shop>;
1706
1720
  delete(id: string): Promise<Collection<string, Shop>>;
1707
1721
  set(data: APIGuildShop | APIGuildShop[] | Shop): Shop | Collection<string, Shop>;
1708
- toJSON(): Shop[];
1722
+ toJSON(): APIGuildShop[];
1709
1723
  }
1710
1724
 
1711
1725
  type FecthOptions = {
@@ -1726,6 +1740,7 @@ declare class GuildTicketManager {
1726
1740
  create(data: Optional<APIGuildTicket>): Promise<GuildTicket>;
1727
1741
  delete(options?: DeleteOptions): Promise<boolean>;
1728
1742
  set(data: APIGuildTicket | GuildTicket | APIGuildTicket[]): GuildTicket | Collection<string, GuildTicket>;
1743
+ toJSON(): APIGuildTicket[];
1729
1744
  }
1730
1745
 
1731
1746
  export { GuildTimerTypes as $, type APIAutomaticMessage as A, BETSTATUS as B, type Confirm as C, type Daily as D, GuildBetUser as E, type FetchOptions$2 as F, Guild as G, GuildBetUserManager as H, GuildChannelsType as I, type GuildLogsWebhookUrls as J, GuildManager as K, GuildMatch as L, GuildMatchChannelsType as M, GuildMatchManager as N, GuildMatchMessagesType as O, GuildMediator as P, GuildMediatorManager as Q, REST as R, type GuildModes as S, GuildPermissionManager as T, type GuildPrices as U, type GuildScores as V, type GuildStatus as W, GuildStatusEnum as X, GuildTicket as Y, type GuildTicketConfiguration as Z, GuildTicketManager as _, type APIGuild as a, GuildUser as a0, GuildUserManager as a1, LogEntry as a2, LogManager as a3, type LogMessage as a4, type Logs as a5, MATCHSTATUS as a6, MATCHTYPES as a7, type MatchSelection as a8, MessagesManager as a9, ProductManager as aA, MinesGame as aa, MinesGameManager as ab, type Optional as ac, type OriginalChannel as ad, type OriginalChannels as ae, PlayerManager as af, type PlayerOption as ag, Product as ah, type Profile as ai, type ProfileCard as aj, type RequestOptions as ak, type RestEvents as al, type RoulettePrize as am, type RouletteSettings as an, STATES as ao, Shop as ap, ShopManager as aq, type StatusResponse as ar, type Structure as as, TicketPanel as at, TicketPanelManager as au, Tournament as av, TournamentManager as aw, UserAccessoryType as ax, VipMember as ay, VipMemberManager as az, type APIGuildBet as b, type APIGuildBetUser as c, type APIGuildGroupedChannel as d, type APIGuildMatch as e, type APIGuildUser as f, type APITicketCategory as g, type APITicketPanel as h, type Accessory as i, AutomaticMessage as j, AutomaticMessageManager as k, type AutomaticMessagePayload as l, AutomaticMessagesTypes as m, type Banner as n, BaseManager as o, type BaseMatchModes as p, type BaseMatchStatus as q, BetChannelTypes as r, type BetQueue as s, BufferManager as t, type BufferMatch as u, type BufferTicket as v, type DailyCategories as w, type FetchReturn as x, GuildBet as y, GuildBetManager as z };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- 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, j as AutomaticMessage, k as AutomaticMessageManager, l as AutomaticMessagePayload, m as AutomaticMessagesTypes, B as BETSTATUS, n as Banner, o as BaseManager, p as BaseMatchModes, q as BaseMatchStatus, r as BetChannelTypes, s as BetQueue, t as BufferManager, u as BufferMatch, v as BufferTicket, C as Confirm, D as Daily, w as DailyCategories, F as FetchOptions, x as FetchReturn, G as Guild, y as GuildBet, z as GuildBetManager, E as GuildBetUser, H as GuildBetUserManager, I as GuildChannelsType, J as GuildLogsWebhookUrls, K as GuildManager, L as GuildMatch, M as GuildMatchChannelsType, N as GuildMatchManager, O as GuildMatchMessagesType, P as GuildMediator, Q as GuildMediatorManager, S as GuildModes, T as GuildPermissionManager, U as GuildPrices, V as GuildScores, W as GuildStatus, X as GuildStatusEnum, Y as GuildTicket, Z as GuildTicketConfiguration, _ as GuildTicketManager, $ as GuildTimerTypes, a0 as GuildUser, a1 as GuildUserManager, a2 as LogEntry, a3 as LogManager, a4 as LogMessage, a5 as Logs, a6 as MATCHSTATUS, a7 as MATCHTYPES, a8 as MatchSelection, a9 as MessagesManager, aa as MinesGame, ab as MinesGameManager, ac as Optional, ad as OriginalChannel, ae as OriginalChannels, af as PlayerManager, ag as PlayerOption, ah as Product, ai as Profile, aj as ProfileCard, R as REST, ak as RequestOptions, al as RestEvents, am as RoulettePrize, an as RouletteSettings, ao as STATES, ap as Shop, aq as ShopManager, ar as StatusResponse, as as Structure, at as TicketPanel, au as TicketPanelManager, av as Tournament, aw as TournamentManager, ax as UserAccessoryType, ay as VipMember, az as VipMemberManager } from './index-Ba4fOyKx.js';
1
+ 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, j as AutomaticMessage, k as AutomaticMessageManager, l as AutomaticMessagePayload, m as AutomaticMessagesTypes, B as BETSTATUS, n as Banner, o as BaseManager, p as BaseMatchModes, q as BaseMatchStatus, r as BetChannelTypes, s as BetQueue, t as BufferManager, u as BufferMatch, v as BufferTicket, C as Confirm, D as Daily, w as DailyCategories, F as FetchOptions, x as FetchReturn, G as Guild, y as GuildBet, z as GuildBetManager, E as GuildBetUser, H as GuildBetUserManager, I as GuildChannelsType, J as GuildLogsWebhookUrls, K as GuildManager, L as GuildMatch, M as GuildMatchChannelsType, N as GuildMatchManager, O as GuildMatchMessagesType, P as GuildMediator, Q as GuildMediatorManager, S as GuildModes, T as GuildPermissionManager, U as GuildPrices, V as GuildScores, W as GuildStatus, X as GuildStatusEnum, Y as GuildTicket, Z as GuildTicketConfiguration, _ as GuildTicketManager, $ as GuildTimerTypes, a0 as GuildUser, a1 as GuildUserManager, a2 as LogEntry, a3 as LogManager, a4 as LogMessage, a5 as Logs, a6 as MATCHSTATUS, a7 as MATCHTYPES, a8 as MatchSelection, a9 as MessagesManager, aa as MinesGame, ab as MinesGameManager, ac as Optional, ad as OriginalChannel, ae as OriginalChannels, af as PlayerManager, ag as PlayerOption, ah as Product, ai as Profile, aj as ProfileCard, R as REST, ak as RequestOptions, al as RestEvents, am as RoulettePrize, an as RouletteSettings, ao as STATES, ap as Shop, aq as ShopManager, ar as StatusResponse, as as Structure, at as TicketPanel, au as TicketPanelManager, av as Tournament, aw as TournamentManager, ax as UserAccessoryType, ay as VipMember, az as VipMemberManager } from './index-26CPLcdp.js';
2
2
  export { Collection } from './structures/Collection.js';
3
3
  export { APIEndpoint, APIEndpoints } from './rest/APIEndpoints.js';
4
4
  export { Routes } from './rest/Routes.js';
@@ -1,4 +1,4 @@
1
- export { k as AutomaticMessageManager } from '../../index-Ba4fOyKx.js';
1
+ export { k as AutomaticMessageManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { o as BaseManager } from '../index-Ba4fOyKx.js';
1
+ export { o as BaseManager } from '../index-26CPLcdp.js';
2
2
  import '../structures/Collection.js';
3
3
  import '../types/api/APIAdvert.js';
4
4
  import '../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { F as FetchOptions, z as GuildBetManager } from '../../index-Ba4fOyKx.js';
1
+ export { F as FetchOptions, z as GuildBetManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -78,6 +78,10 @@ class GuildBetManager extends import_base.BaseManager {
78
78
  return bet;
79
79
  }
80
80
  }
81
+ toJSON() {
82
+ const m = [...this.cache.values()];
83
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
84
+ }
81
85
  }
82
86
  // Annotate the CommonJS export names for ESM import in node:
83
87
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { H as GuildBetUserManager } from '../../index-Ba4fOyKx.js';
1
+ export { H as GuildBetUserManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -97,6 +97,10 @@ class GuildBetUserManager extends import_base.BaseManager {
97
97
  return user;
98
98
  }
99
99
  }
100
+ toJSON() {
101
+ const m = [...this.cache.values()];
102
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
103
+ }
100
104
  }
101
105
  // Annotate the CommonJS export names for ESM import in node:
102
106
  0 && (module.exports = {
@@ -1,5 +1,5 @@
1
1
  import '../../structures/Collection.js';
2
- export { t as BufferManager, u as BufferMatch, v as BufferTicket } from '../../index-Ba4fOyKx.js';
2
+ export { t as BufferManager, u as BufferMatch, v as BufferTicket } from '../../index-26CPLcdp.js';
3
3
  import '../../types/api/APIGuildTicket.js';
4
4
  import '../../types/api/APIAdvert.js';
5
5
  import '../../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { K as GuildManager } from '../../index-Ba4fOyKx.js';
1
+ export { K as GuildManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -118,6 +118,10 @@ class GuildManager {
118
118
  return guild;
119
119
  }
120
120
  }
121
+ toJSON() {
122
+ const m = [...this.cache.values()];
123
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
124
+ }
121
125
  }
122
126
  // Annotate the CommonJS export names for ESM import in node:
123
127
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { k as AutomaticMessageManager, o as BaseManager, t as BufferManager, u as BufferMatch, v as BufferTicket, F as FetchOptions, x as FetchReturn, z as GuildBetManager, H as GuildBetUserManager, K as GuildManager, N as GuildMatchManager, Q as GuildMediatorManager, T as GuildPermissionManager, _ as GuildTicketManager, a1 as GuildUserManager, a3 as LogManager, a9 as MessagesManager, ab as MinesGameManager, af as PlayerManager, ag as PlayerOption, aq as ShopManager, as as Structure, au as TicketPanelManager, aw as TournamentManager, az as VipMemberManager } from '../index-Ba4fOyKx.js';
1
+ export { k as AutomaticMessageManager, o as BaseManager, t as BufferManager, u as BufferMatch, v as BufferTicket, F as FetchOptions, x as FetchReturn, z as GuildBetManager, H as GuildBetUserManager, K as GuildManager, N as GuildMatchManager, Q as GuildMediatorManager, T as GuildPermissionManager, _ as GuildTicketManager, a1 as GuildUserManager, a3 as LogManager, a9 as MessagesManager, ab as MinesGameManager, af as PlayerManager, ag as PlayerOption, aq as ShopManager, as as Structure, au as TicketPanelManager, aw as TournamentManager, az as VipMemberManager } from '../index-26CPLcdp.js';
2
2
  import '../types/api/APIAdvert.js';
3
3
  import '../types/api/APIAutomaticRole.js';
4
4
  import '../types/api/APIBaseChannel.js';
@@ -1,4 +1,4 @@
1
- export { a3 as LogManager } from '../../index-Ba4fOyKx.js';
1
+ export { a3 as LogManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APILogEntry.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -81,6 +81,10 @@ class LogManager extends import_base.BaseManager {
81
81
  return logEntry;
82
82
  }
83
83
  }
84
+ toJSON() {
85
+ const m = [...this.cache.values()];
86
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
87
+ }
84
88
  }
85
89
  // Annotate the CommonJS export names for ESM import in node:
86
90
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { N as GuildMatchManager } from '../../index-Ba4fOyKx.js';
1
+ export { N as GuildMatchManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -106,6 +106,10 @@ class GuildMatchManager extends import_base.BaseManager {
106
106
  const response = await this.rest.request({ url, method: "DELETE" });
107
107
  return this.set(response);
108
108
  }
109
+ toJSON() {
110
+ const m = [...this.cache.values()];
111
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
112
+ }
109
113
  }
110
114
  // Annotate the CommonJS export names for ESM import in node:
111
115
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { Q as GuildMediatorManager } from '../../index-Ba4fOyKx.js';
1
+ export { Q as GuildMediatorManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildMediator.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -105,6 +105,10 @@ class GuildMediatorManager extends import_base.BaseManager {
105
105
  return mediator;
106
106
  }
107
107
  }
108
+ toJSON() {
109
+ const m = [...this.cache.values()];
110
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
111
+ }
108
112
  }
109
113
  // Annotate the CommonJS export names for ESM import in node:
110
114
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { a9 as MessagesManager } from '../../index-Ba4fOyKx.js';
1
+ export { a9 as MessagesManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIMessage.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -27,12 +27,14 @@ var import_Collection = require("../../structures/Collection");
27
27
  class MessagesManager {
28
28
  constructor(structure, base_url) {
29
29
  __publicField(this, "cache");
30
+ __publicField(this, "_messages");
30
31
  __publicField(this, "base_url");
31
32
  __publicField(this, "rest");
32
33
  __publicField(this, "guild");
33
34
  this.rest = structure.rest;
34
35
  this.guild = structure.guild;
35
36
  this.cache = new import_Collection.Collection("messages");
37
+ this._messages = [];
36
38
  this.base_url = base_url;
37
39
  }
38
40
  async fetch() {
@@ -45,15 +47,24 @@ class MessagesManager {
45
47
  return response;
46
48
  }
47
49
  async create(data) {
48
- const messages = [...this.cache.toArray()];
50
+ let messages = [...this.cache.toArray()];
49
51
  if (Array.isArray(data)) messages.push(...data);
50
52
  else messages.push(data);
51
- const response = await this.rest.request({
52
- method: "PATCH",
53
- url: this.base_url,
54
- payload: { set: messages }
53
+ messages = [.../* @__PURE__ */ new Set([...messages, this._messages])];
54
+ console.log({
55
+ messages,
56
+ s: messages.length
55
57
  });
56
- return this.set(response.messages);
58
+ if (messages.length >= 10) {
59
+ const response = await this.rest.request({
60
+ method: "PATCH",
61
+ url: this.base_url,
62
+ payload: { set: messages }
63
+ });
64
+ return this.set(response.messages);
65
+ } else {
66
+ for (let msg of messages) this._messages.push(msg);
67
+ }
57
68
  }
58
69
  set(data) {
59
70
  if (!data) return this.cache;
@@ -68,6 +79,10 @@ class MessagesManager {
68
79
  }
69
80
  return this.cache;
70
81
  }
82
+ toJSON() {
83
+ const m = [...this.cache.values()];
84
+ return m.filter((m2) => m2._id !== void 0);
85
+ }
71
86
  }
72
87
  // Annotate the CommonJS export names for ESM import in node:
73
88
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { ab as MinesGameManager } from '../../index-Ba4fOyKx.js';
1
+ export { ab as MinesGameManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIMinesGame.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -82,6 +82,10 @@ class MinesGameManager {
82
82
  return game;
83
83
  }
84
84
  }
85
+ toJSON() {
86
+ const m = [...this.cache.values()];
87
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
88
+ }
85
89
  }
86
90
  // Annotate the CommonJS export names for ESM import in node:
87
91
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { T as GuildPermissionManager } from '../../index-Ba4fOyKx.js';
1
+ export { T as GuildPermissionManager } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIGuildPermissions.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -1,5 +1,5 @@
1
1
  import '../../types/api/APIPlayer.js';
2
- export { af as PlayerManager, ag as PlayerOption, as as Structure } from '../../index-Ba4fOyKx.js';
2
+ export { af as PlayerManager, ag as PlayerOption, as as Structure } from '../../index-26CPLcdp.js';
3
3
  import '../../structures/Collection.js';
4
4
  import '../../types/api/APIAdvert.js';
5
5
  import '../../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { aA as ProductManager } from '../../index-Ba4fOyKx.js';
1
+ export { aA as ProductManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIProduct.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -91,7 +91,8 @@ class ProductManager extends import_base.BaseManager {
91
91
  }
92
92
  }
93
93
  toJSON() {
94
- return this.cache.map((p) => p.toJSON());
94
+ const m = [...this.cache.values()];
95
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
95
96
  }
96
97
  }
97
98
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,4 +1,4 @@
1
- export { aq as ShopManager } from '../../index-Ba4fOyKx.js';
1
+ export { aq as ShopManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildShop.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -89,7 +89,8 @@ class ShopManager extends import_base.BaseManager {
89
89
  }
90
90
  }
91
91
  toJSON() {
92
- return this.cache.toArray();
92
+ const m = [...this.cache.values()];
93
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
93
94
  }
94
95
  }
95
96
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,4 +1,4 @@
1
- export { _ as GuildTicketManager } from '../../index-Ba4fOyKx.js';
1
+ export { _ as GuildTicketManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildTicket.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -145,6 +145,10 @@ class GuildTicketManager {
145
145
  return ticket;
146
146
  }
147
147
  }
148
+ toJSON() {
149
+ const m = [...this.cache.values()];
150
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
151
+ }
148
152
  }
149
153
  // Annotate the CommonJS export names for ESM import in node:
150
154
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { x as FetchReturn, au as TicketPanelManager } from '../../index-Ba4fOyKx.js';
1
+ export { x as FetchReturn, au as TicketPanelManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -72,7 +72,8 @@ class TicketPanelManager extends import_base.BaseManager {
72
72
  }
73
73
  }
74
74
  toJSON() {
75
- return this.cache.map((a) => a.toJSON());
75
+ const m = [...this.cache.values()];
76
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
76
77
  }
77
78
  }
78
79
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,4 +1,4 @@
1
- export { aw as TournamentManager } from '../../index-Ba4fOyKx.js';
1
+ export { aw as TournamentManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APITournament.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -92,6 +92,10 @@ class TournamentManager extends import_base.BaseManager {
92
92
  const response = await this.rest.request({ url, method: "POST", payload: data });
93
93
  return this._add(response);
94
94
  }
95
+ toJSON() {
96
+ const m = [...this.cache.values()];
97
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
98
+ }
95
99
  }
96
100
  // Annotate the CommonJS export names for ESM import in node:
97
101
  0 && (module.exports = {
@@ -1,5 +1,5 @@
1
1
  import '../../structures/Collection.js';
2
- export { a1 as GuildUserManager } from '../../index-Ba4fOyKx.js';
2
+ export { a1 as GuildUserManager } from '../../index-26CPLcdp.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
5
5
  import '../../types/api/APIBaseChannel.js';
@@ -109,6 +109,10 @@ class GuildUserManager extends import_base.BaseManager {
109
109
  return user;
110
110
  }
111
111
  }
112
+ toJSON() {
113
+ const m = [...this.cache.values()];
114
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
115
+ }
112
116
  }
113
117
  // Annotate the CommonJS export names for ESM import in node:
114
118
  0 && (module.exports = {
@@ -1,4 +1,4 @@
1
- export { az as VipMemberManager } from '../../index-Ba4fOyKx.js';
1
+ export { az as VipMemberManager } from '../../index-26CPLcdp.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIVipMember.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -135,6 +135,10 @@ class VipMemberManager extends import_base.BaseManager {
135
135
  this.cache.clear();
136
136
  return value;
137
137
  }
138
+ toJSON() {
139
+ const m = [...this.cache.values()];
140
+ return m.filter((m2) => m2.toJSON !== void 0).map((m2) => m2.toJSON());
141
+ }
138
142
  }
139
143
  // Annotate the CommonJS export names for ESM import in node:
140
144
  0 && (module.exports = {
@@ -1,5 +1,5 @@
1
1
  import 'events';
2
- export { R as REST } from '../index-Ba4fOyKx.js';
2
+ export { R as REST } from '../index-26CPLcdp.js';
3
3
  import '../structures/Collection.js';
4
4
  import '../types/api/APIAdvert.js';
5
5
  import '../types/api/APIAutomaticRole.js';
@@ -1,6 +1,6 @@
1
1
  export { APIEndpoint, APIEndpoints } from './APIEndpoints.js';
2
2
  export { Routes } from './Routes.js';
3
- export { R as REST } from '../index-Ba4fOyKx.js';
3
+ export { R as REST } from '../index-26CPLcdp.js';
4
4
  import '../structures/Collection.js';
5
5
  import '../types/api/APIAdvert.js';
6
6
  import '../types/api/APIAutomaticRole.js';
@@ -1,5 +1,5 @@
1
1
  import 'discord-api-types/v10';
2
- export { j as AutomaticMessage } from '../../index-Ba4fOyKx.js';
2
+ export { j as AutomaticMessage } from '../../index-26CPLcdp.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
5
5
  import '../../types/api/APIBaseChannel.js';
@@ -1,4 +1,4 @@
1
- export { y as GuildBet } from '../../index-Ba4fOyKx.js';
1
+ export { y as GuildBet } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APIBetChannel.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -164,18 +164,26 @@ class GuildBet {
164
164
  return response;
165
165
  }
166
166
  toJSON() {
167
- let json = {};
168
- for (const [key, value] of Object.entries(this)) {
169
- const exclude = ["rest", "guild", "manager"];
170
- if (exclude.includes(key)) continue;
171
- if (typeof value !== "function") {
172
- json[key] = value;
173
- }
174
- }
175
167
  return {
176
- ...json,
177
- messages: this?.messages instanceof import_managers.MessagesManager ? this.messages?.cache?.toArray() : [],
178
- players: this.players.toArray()
168
+ _id: this._id,
169
+ channels: this.channels,
170
+ confirmed: this.confirmed,
171
+ createdAt: this.createdAt,
172
+ creatorId: this.creatorId,
173
+ guild_id: this.guild_id,
174
+ losers: this.losers,
175
+ maximumSize: this.maximumSize,
176
+ mediatorId: this.mediatorId,
177
+ messages: this.messages.cache.toArray(),
178
+ mode: this.mode,
179
+ players: this.players.toArray(),
180
+ price: this.price,
181
+ queues: this.queues,
182
+ status: this.status,
183
+ teams: this.teams,
184
+ type: this.type,
185
+ updatedAt: this.updatedAt,
186
+ winners: this.winners
179
187
  };
180
188
  }
181
189
  }
@@ -1,4 +1,4 @@
1
- export { E as GuildBetUser } from '../../index-Ba4fOyKx.js';
1
+ export { E as GuildBetUser } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIAdvert.js';
3
3
  import '../../types/api/APIAutomaticRole.js';
4
4
  import '../../types/api/APIBaseChannel.js';
@@ -220,15 +220,23 @@ const _GuildBetUser = class _GuildBetUser {
220
220
  return response;
221
221
  }
222
222
  toJSON() {
223
- let json = {};
224
- for (const [key, value] of Object.entries(this)) {
225
- const exclude = ["rest", "guilds", "guild", "manager"];
226
- if (exclude.includes(key)) continue;
227
- if (typeof value !== "function") {
228
- json[key] = value;
229
- }
230
- }
231
- return json;
223
+ return {
224
+ blacklist: this.blacklist,
225
+ coins: this.coins,
226
+ consecutive_wins: this.consecutive_wins,
227
+ createdAt: this.createdAt,
228
+ credit: this.credit,
229
+ daily: this.daily,
230
+ games: this.games,
231
+ guild_id: this.guild_id,
232
+ id: this.id,
233
+ losses: this.losses,
234
+ profile: this.profile,
235
+ spins: this.spins,
236
+ updatedAt: this.updatedAt,
237
+ used_codes: this.used_codes,
238
+ wins: this.wins
239
+ };
232
240
  }
233
241
  };
234
242
  _GuildBetUser_instances = new WeakSet();
@@ -1,4 +1,4 @@
1
- export { G as Guild } from '../../index-Ba4fOyKx.js';
1
+ export { G as Guild } from '../../index-26CPLcdp.js';
2
2
  import '../Collection.js';
3
3
  import '../../types/api/APIAutomaticRole.js';
4
4
  import '../../types/api/APIBuff.js';
@@ -1,4 +1,4 @@
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';
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-26CPLcdp.js';
2
2
  export { Collection } from './Collection.js';
3
3
  import '../types/api/APIAdvert.js';
4
4
  import '../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { a2 as LogEntry } from '../../index-Ba4fOyKx.js';
1
+ export { a2 as LogEntry } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APILogEntry.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { L as GuildMatch } from '../../index-Ba4fOyKx.js';
1
+ export { L as GuildMatch } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APIBaseChannel.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -257,17 +257,34 @@ const _GuildMatch = class _GuildMatch {
257
257
  return response;
258
258
  }
259
259
  toJSON() {
260
- let json = {};
261
- for (const [key, value] of Object.entries(this)) {
262
- const exclude = ["rest", "guilds", "guild", "manager"];
263
- if (exclude.includes(key)) continue;
264
- if (typeof value !== "function") {
265
- json[key] = value;
266
- }
267
- }
268
260
  return {
269
- ...json,
270
- messages: this?.messages instanceof import_managers.MessagesManager ? this.messages?.cache?.toArray() : []
261
+ _id: this._id,
262
+ admin_id: this.admin_id,
263
+ bet: this.bet,
264
+ betting: this.betting,
265
+ challenge: this.challenge,
266
+ channels: this.channels,
267
+ code: this.code,
268
+ confirmed: this.confirmed,
269
+ createdAt: this.createdAt,
270
+ creatorId: this.creatorId,
271
+ guild_id: this.guild_id,
272
+ kickedOut: this.kickedOut,
273
+ leaders: this.leaders,
274
+ logs: this.logs,
275
+ losers: this.losers,
276
+ maximumSize: this.maximumSize,
277
+ messages: this.messages.cache.toArray(),
278
+ mvps: this.mvps,
279
+ players: this.players,
280
+ roomCreatorId: this.roomCreatorId,
281
+ selections: this.selections,
282
+ status: this.status,
283
+ teams: this.teams,
284
+ type: this.type,
285
+ updatedAt: this.updatedAt,
286
+ url: this.url,
287
+ winners: this.winners
271
288
  };
272
289
  }
273
290
  };
@@ -283,6 +300,9 @@ update_fn = async function(data) {
283
300
  this.bet = this.guild.bets.set(data.bet);
284
301
  }
285
302
  }
303
+ console.log({
304
+ message: `[Match #update]: ${typeof this.messages} is instance ${this.messages instanceof import_managers.MessagesManager}`
305
+ });
286
306
  if (data?.messages?.length !== 0) {
287
307
  if (this?.messages instanceof import_managers.MessagesManager) this.messages.set(data.messages);
288
308
  else {
@@ -1,4 +1,4 @@
1
- export { P as GuildMediator } from '../../index-Ba4fOyKx.js';
1
+ export { P as GuildMediator } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIGuildMediator.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -135,15 +135,17 @@ const _GuildMediator = class _GuildMediator {
135
135
  return response;
136
136
  }
137
137
  toJSON() {
138
- let json = {};
139
- for (const [key, value] of Object.entries(this)) {
140
- const exclude = ["rest", "guilds", "guild", "manager"];
141
- if (exclude.includes(key)) continue;
142
- if (typeof value !== "function") {
143
- json[key] = value;
144
- }
145
- }
146
- return json;
138
+ return {
139
+ createdAt: this.createdAt,
140
+ external_links: this.external_links,
141
+ games: this.games,
142
+ guild_id: this.guild_id,
143
+ id: this.id,
144
+ mbway: this.mbway,
145
+ paypal: this.paypal,
146
+ revolut: this.revolut,
147
+ updatedAt: this.updatedAt
148
+ };
147
149
  }
148
150
  };
149
151
  _GuildMediator_instances = new WeakSet();
@@ -1,4 +1,4 @@
1
- export { aa as MinesGame } from '../../index-Ba4fOyKx.js';
1
+ export { aa as MinesGame } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIMinesGame.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -86,6 +86,21 @@ class MinesGame {
86
86
  });
87
87
  return __privateMethod(this, _MinesGame_instances, update_fn).call(this, response);
88
88
  }
89
+ toJSON() {
90
+ return {
91
+ _id: this._id,
92
+ bet: this.bet,
93
+ bombs: this.bombs,
94
+ bombsPosition: this.bombsPosition,
95
+ createdAt: this.createdAt,
96
+ creatorId: this.creatorId,
97
+ guild_id: this.guild_id,
98
+ maxMines: this.maxMines,
99
+ multiplier: this.multiplier,
100
+ status: this.status,
101
+ updatedAt: this.updatedAt
102
+ };
103
+ }
89
104
  }
90
105
  _MinesGame_instances = new WeakSet();
91
106
  update_fn = function(data) {
@@ -1,4 +1,4 @@
1
- export { ah as Product } from '../../index-Ba4fOyKx.js';
1
+ export { ah as Product } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APIProduct.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,5 +1,5 @@
1
1
  import 'discord-api-types/v10';
2
- export { ap as Shop } from '../../index-Ba4fOyKx.js';
2
+ export { ap as Shop } from '../../index-26CPLcdp.js';
3
3
  import '../../types/api/APIGuildShop.js';
4
4
  import '../../types/api/APIAdvert.js';
5
5
  import '../../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { Y as GuildTicket } from '../../index-Ba4fOyKx.js';
1
+ export { Y as GuildTicket } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIGuildTicket.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -133,6 +133,22 @@ class GuildTicket {
133
133
  });
134
134
  return __privateMethod(this, _GuildTicket_instances, update_fn).call(this, response);
135
135
  }
136
+ toJSON() {
137
+ return {
138
+ _id: this._id,
139
+ admin_id: this.admin_id,
140
+ channel_id: this.channel_id,
141
+ closed_by_id: this.closed_by_id,
142
+ createdAt: this.createdAt,
143
+ creator_id: this.creator_id,
144
+ customer_rating: this.customer_rating,
145
+ guild_id: this.guild_id,
146
+ messages: this.messages.cache.toArray(),
147
+ status: this.status,
148
+ type: this.type,
149
+ updatedAt: this.updatedAt
150
+ };
151
+ }
136
152
  }
137
153
  _GuildTicket_instances = new WeakSet();
138
154
  update_fn = function(data) {
@@ -1,5 +1,5 @@
1
1
  import 'discord-api-types/v10';
2
- export { at as TicketPanel } from '../../index-Ba4fOyKx.js';
2
+ export { at as TicketPanel } from '../../index-26CPLcdp.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
5
5
  import '../../types/api/APIBaseChannel.js';
@@ -1,4 +1,4 @@
1
- export { av as Tournament } from '../../index-Ba4fOyKx.js';
1
+ export { av as Tournament } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APITournament.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { a0 as GuildUser } from '../../index-Ba4fOyKx.js';
1
+ export { a0 as GuildUser } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIAdvert.js';
3
3
  import '../../types/api/APIAutomaticRole.js';
4
4
  import '../../types/api/APIBaseChannel.js';
@@ -346,10 +346,8 @@ const _GuildUser = class _GuildUser {
346
346
  else return true;
347
347
  }
348
348
  async addAdvert(data) {
349
- const url = import_Routes.Routes.guilds.users.resource(this.manager.guild.id, this.id, "adverts");
350
- const payload = data;
351
- const response = await this.rest.request({ method: "POST", url, payload });
352
- return __privateMethod(this, _GuildUser_instances, update_fn).call(this, response);
349
+ const payload = [...this.adverts, data];
350
+ return this.update({ adverts: payload });
353
351
  }
354
352
  async removeAdvert(advertId) {
355
353
  let advs = this.adverts;
@@ -1,4 +1,4 @@
1
- export { ay as VipMember } from '../../index-Ba4fOyKx.js';
1
+ export { ay as VipMember } from '../../index-26CPLcdp.js';
2
2
  import '../../types/api/APIVipMember.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -144,13 +144,18 @@ const _VipMember = class _VipMember {
144
144
  return response;
145
145
  }
146
146
  toJSON() {
147
- let json;
148
- for (const [key, value] of Object.entries(this)) {
149
- if (typeof value !== "function") {
150
- json[key] = value;
151
- }
152
- }
153
- return json;
147
+ return {
148
+ createdAt: this.createdAt,
149
+ duration: this.duration,
150
+ guild_id: this.guild_id,
151
+ id: this.id,
152
+ name: this.name,
153
+ roleId: this.roleId,
154
+ status: this.status,
155
+ type: this.type,
156
+ updatedAt: this.updatedAt,
157
+ voiceChannelId: this.voiceChannelId
158
+ };
154
159
  }
155
160
  };
156
161
  _VipMember_instances = new WeakSet();
@@ -1,5 +1,5 @@
1
1
  import '../structures/Collection.js';
2
- export { ak as RequestOptions, al as RestEvents } from '../index-Ba4fOyKx.js';
2
+ export { ak as RequestOptions, al as RestEvents } from '../index-26CPLcdp.js';
3
3
  import './api/APIAdvert.js';
4
4
  import './api/APIAutomaticRole.js';
5
5
  import './api/APIBaseChannel.js';
@@ -1,5 +1,5 @@
1
1
  import 'discord-api-types/v10';
2
- export { A as APIAutomaticMessage, l as AutomaticMessagePayload } from '../../index-Ba4fOyKx.js';
2
+ export { A as APIAutomaticMessage, l as AutomaticMessagePayload } from '../../index-26CPLcdp.js';
3
3
  import './APIAdvert.js';
4
4
  import './APIAutomaticRole.js';
5
5
  import './APIBaseChannel.js';
@@ -1,4 +1,4 @@
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';
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-26CPLcdp.js';
2
2
  import './APIAutomaticRole.js';
3
3
  import './APIBuff.js';
4
4
  import './APIGuildPermissions.js';
@@ -1,4 +1,4 @@
1
- export { b as APIGuildBet, r as BetChannelTypes, s as BetQueue } from '../../index-Ba4fOyKx.js';
1
+ export { b as APIGuildBet, r as BetChannelTypes, s as BetQueue } from '../../index-26CPLcdp.js';
2
2
  import './APIBetChannel.js';
3
3
  import './APIMessage.js';
4
4
  import './APIPlayer.js';
@@ -1,4 +1,4 @@
1
- export { c as APIGuildBetUser } from '../../index-Ba4fOyKx.js';
1
+ export { c as APIGuildBetUser } from '../../index-26CPLcdp.js';
2
2
  import './APIAdvert.js';
3
3
  import './APIAutomaticRole.js';
4
4
  import './APIBaseChannel.js';
@@ -1,4 +1,4 @@
1
- export { d as APIGuildGroupedChannel } from '../../index-Ba4fOyKx.js';
1
+ export { d as APIGuildGroupedChannel } from '../../index-26CPLcdp.js';
2
2
  import './APIAdvert.js';
3
3
  import './APIAutomaticRole.js';
4
4
  import './APIBaseChannel.js';
@@ -1,4 +1,4 @@
1
- export { e as APIGuildMatch, M as GuildMatchChannelsType, O as GuildMatchMessagesType, a8 as MatchSelection } from '../../index-Ba4fOyKx.js';
1
+ export { e as APIGuildMatch, M as GuildMatchChannelsType, O as GuildMatchMessagesType, a8 as MatchSelection } from '../../index-26CPLcdp.js';
2
2
  import './APIPlayer.js';
3
3
  import './APIBaseChannel.js';
4
4
  import './APIMessage.js';
@@ -1,4 +1,4 @@
1
- export { f as APIGuildUser, ai as Profile } from '../../index-Ba4fOyKx.js';
1
+ export { f as APIGuildUser, ai as Profile } from '../../index-26CPLcdp.js';
2
2
  import './APIAdvert.js';
3
3
  import './APIAutomaticRole.js';
4
4
  import './APIBaseChannel.js';
@@ -1,5 +1,5 @@
1
1
  import 'discord-api-types/v10';
2
- export { h as APITicketPanel } from '../../index-Ba4fOyKx.js';
2
+ export { h as APITicketPanel } from '../../index-26CPLcdp.js';
3
3
  import './APIAdvert.js';
4
4
  import './APIAutomaticRole.js';
5
5
  import './APIBaseChannel.js';
@@ -1,5 +1,5 @@
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-Ba4fOyKx.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-26CPLcdp.js';
3
3
  export { APIAutomaticRole, AutomaticRolesTypes } from './APIAutomaticRole.js';
4
4
  export { APIBaseChannel } from './APIBaseChannel.js';
5
5
  export { APIBetChannel } from './APIBetChannel.js';
@@ -1,4 +1,4 @@
1
- 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, ak as RequestOptions, al as RestEvents, am as RoulettePrize, an as RouletteSettings, ao as STATES, ar as StatusResponse, ax as UserAccessoryType } from '../index-Ba4fOyKx.js';
1
+ 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, ak as RequestOptions, al as RestEvents, am as RoulettePrize, an as RouletteSettings, ao as STATES, ar as StatusResponse, ax as UserAccessoryType } from '../index-26CPLcdp.js';
2
2
  export { APIAdvert } from './api/APIAdvert.js';
3
3
  export { APIAutomaticRole, AutomaticRolesTypes } from './api/APIAutomaticRole.js';
4
4
  export { APIBaseChannel } from './api/APIBaseChannel.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duque.edits/sdk",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",