@duque.edits/sdk 1.6.9 → 1.7.2

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 (61) hide show
  1. package/dist/{index-26CPLcdp.d.ts → index-iLzxxeFt.d.ts} +0 -1
  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/betuser/GuildBetUserManager.d.ts +1 -1
  7. package/dist/managers/buffer/BufferManager.d.ts +1 -1
  8. package/dist/managers/guild/GuildManager.d.ts +1 -1
  9. package/dist/managers/guild/GuildManager.js +2 -3
  10. package/dist/managers/index.d.ts +1 -1
  11. package/dist/managers/logs/LogManager.d.ts +1 -1
  12. package/dist/managers/match/GuildMatchManager.d.ts +1 -1
  13. package/dist/managers/match/GuildMatchManager.js +3 -1
  14. package/dist/managers/mediator/GuildMediatorManager.d.ts +1 -1
  15. package/dist/managers/message/MessagesManager.d.ts +1 -1
  16. package/dist/managers/message/MessagesManager.js +7 -15
  17. package/dist/managers/minesgame/MinesGameManager.d.ts +1 -1
  18. package/dist/managers/permission/GuildPermissionManager.d.ts +1 -1
  19. package/dist/managers/player/PlayerManager.d.ts +1 -1
  20. package/dist/managers/product/ProductManager.d.ts +1 -1
  21. package/dist/managers/shop/ShopManager.d.ts +1 -1
  22. package/dist/managers/ticket/TicketManager.d.ts +1 -1
  23. package/dist/managers/ticketpanel/TicketPanelManager.d.ts +1 -1
  24. package/dist/managers/tournament/TournamentManager.d.ts +1 -1
  25. package/dist/managers/user/GuildUserManager.d.ts +1 -1
  26. package/dist/managers/vipmember/VipMemberManager.d.ts +1 -1
  27. package/dist/rest/REST.d.ts +1 -1
  28. package/dist/rest/REST.js +8 -13
  29. package/dist/rest/index.d.ts +1 -1
  30. package/dist/structures/automaticmessage/AutomaticMessage.d.ts +1 -1
  31. package/dist/structures/bet/GuildBet.d.ts +1 -1
  32. package/dist/structures/betuser/GuildBetUser.d.ts +1 -1
  33. package/dist/structures/guild/Guild.d.ts +1 -1
  34. package/dist/structures/guild/Guild.js +2 -2
  35. package/dist/structures/index.d.ts +1 -1
  36. package/dist/structures/logentry/LogEntry.d.ts +1 -1
  37. package/dist/structures/match/GuildMatch.d.ts +1 -1
  38. package/dist/structures/mediator/GuildMediator.d.ts +1 -1
  39. package/dist/structures/minesgame/MinesGame.d.ts +1 -1
  40. package/dist/structures/product/Product.d.ts +1 -1
  41. package/dist/structures/shop/Shop.d.ts +1 -1
  42. package/dist/structures/ticket/Ticket.d.ts +1 -1
  43. package/dist/structures/ticketpanel/TicketPanel.d.ts +1 -1
  44. package/dist/structures/tournament/Tournament.d.ts +1 -1
  45. package/dist/structures/user/GuildUser.d.ts +1 -1
  46. package/dist/structures/user/GuildUser.js +1 -1
  47. package/dist/structures/vipmember/VipMember.d.ts +1 -1
  48. package/dist/types/RestTypes.d.ts +1 -1
  49. package/dist/types/api/APIAutomaticMessage.d.ts +1 -1
  50. package/dist/types/api/APIGuild.d.ts +1 -1
  51. package/dist/types/api/APIGuildBet.d.ts +1 -1
  52. package/dist/types/api/APIGuildBetUser.d.ts +1 -1
  53. package/dist/types/api/APIGuildGroupedChannel.d.ts +1 -1
  54. package/dist/types/api/APIGuildMatch.d.ts +1 -1
  55. package/dist/types/api/APIGuildPermissions.d.ts +1 -0
  56. package/dist/types/api/APIGuildPermissions.js +1 -0
  57. package/dist/types/api/APIGuildUser.d.ts +1 -1
  58. package/dist/types/api/APITicketPanel.d.ts +1 -1
  59. package/dist/types/api/index.d.ts +1 -1
  60. package/dist/types/index.d.ts +1 -1
  61. package/package.json +3 -3
@@ -1690,7 +1690,6 @@ type T<e> = e & {
1690
1690
  };
1691
1691
  declare class MessagesManager<Structure> {
1692
1692
  cache: Collection<string, APIMessage>;
1693
- _messages: APIMessage[];
1694
1693
  readonly base_url: string;
1695
1694
  readonly rest: REST;
1696
1695
  readonly guild: Guild;
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-26CPLcdp.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-iLzxxeFt.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-26CPLcdp.js';
1
+ export { k as AutomaticMessageManager } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { o as BaseManager } from '../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { F as FetchOptions, z as GuildBetManager } from '../../index-iLzxxeFt.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 { H as GuildBetUserManager } from '../../index-26CPLcdp.js';
1
+ export { H as GuildBetUserManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -1,5 +1,5 @@
1
1
  import '../../structures/Collection.js';
2
- export { t as BufferManager, u as BufferMatch, v as BufferTicket } from '../../index-26CPLcdp.js';
2
+ export { t as BufferManager, u as BufferMatch, v as BufferTicket } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { K as GuildManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -67,9 +67,8 @@ class GuildManager {
67
67
  for (let _guild of response) {
68
68
  if (!_guild.id) continue;
69
69
  const guild = new import_Guild.Guild(_guild, this.rest);
70
- await guild._start().then((g) => {
71
- this.cache.set(g.id, g);
72
- });
70
+ await guild._start();
71
+ this.cache.set(guild.id, guild);
73
72
  }
74
73
  return this.cache;
75
74
  }
@@ -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-26CPLcdp.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-iLzxxeFt.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-26CPLcdp.js';
1
+ export { a3 as LogManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APILogEntry.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { N as GuildMatchManager } from '../../index-26CPLcdp.js';
1
+ export { N as GuildMatchManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -98,8 +98,10 @@ class GuildMatchManager extends import_base.BaseManager {
98
98
  url,
99
99
  payload
100
100
  });
101
+ const match = this.set(response);
102
+ this.rest.emit("matchCreate", match);
101
103
  if (this.guild.match_count !== this.cache.size + 1) await this.guild.update({ match_count: this.cache.size + 1 });
102
- return this.set(response);
104
+ return match;
103
105
  }
104
106
  async delete(id) {
105
107
  const url = import_Routes.Routes.fields(this.base_url, id);
@@ -1,4 +1,4 @@
1
- export { Q as GuildMediatorManager } from '../../index-26CPLcdp.js';
1
+ export { Q as GuildMediatorManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildMediator.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { a9 as MessagesManager } from '../../index-26CPLcdp.js';
1
+ export { a9 as MessagesManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIMessage.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -27,21 +27,18 @@ 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");
31
30
  __publicField(this, "base_url");
32
31
  __publicField(this, "rest");
33
32
  __publicField(this, "guild");
34
33
  this.rest = structure.rest;
35
34
  this.guild = structure.guild;
36
35
  this.cache = new import_Collection.Collection("messages");
37
- this._messages = [];
38
36
  this.base_url = base_url;
39
37
  }
40
38
  async fetch() {
41
39
  const response = await this.rest.request({
42
40
  method: "GET",
43
- url: this.base_url,
44
- payload: {}
41
+ url: this.base_url
45
42
  });
46
43
  this.cache.set(response._id, response);
47
44
  return response;
@@ -50,17 +47,12 @@ class MessagesManager {
50
47
  let messages = [...this.cache.toArray()];
51
48
  if (Array.isArray(data)) messages.push(...data);
52
49
  else messages.push(data);
53
- messages = [.../* @__PURE__ */ new Set([...messages, this._messages])];
54
- if (messages.length >= 10) {
55
- const response = await this.rest.request({
56
- method: "PATCH",
57
- url: this.base_url,
58
- payload: { set: messages }
59
- });
60
- return this.set(response.messages);
61
- } else {
62
- for (let msg of messages) this._messages.push(msg);
63
- }
50
+ const response = await this.rest.request({
51
+ method: "PATCH",
52
+ url: this.base_url,
53
+ payload: { set: messages }
54
+ });
55
+ return this.set(response.messages);
64
56
  }
65
57
  set(data) {
66
58
  if (!data) return this.cache;
@@ -1,4 +1,4 @@
1
- export { ab as MinesGameManager } from '../../index-26CPLcdp.js';
1
+ export { ab as MinesGameManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIMinesGame.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { T as GuildPermissionManager } from '../../index-26CPLcdp.js';
1
+ export { T as GuildPermissionManager } from '../../index-iLzxxeFt.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-26CPLcdp.js';
2
+ export { af as PlayerManager, ag as PlayerOption, as as Structure } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { aA as ProductManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIProduct.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { aq as ShopManager } from '../../index-26CPLcdp.js';
1
+ export { aq as ShopManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildShop.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { _ as GuildTicketManager } from '../../index-26CPLcdp.js';
1
+ export { _ as GuildTicketManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIGuildTicket.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { x as FetchReturn, au as TicketPanelManager } from '../../index-26CPLcdp.js';
1
+ export { x as FetchReturn, au as TicketPanelManager } from '../../index-iLzxxeFt.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 { aw as TournamentManager } from '../../index-26CPLcdp.js';
1
+ export { aw as TournamentManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APITournament.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,5 +1,5 @@
1
1
  import '../../structures/Collection.js';
2
- export { a1 as GuildUserManager } from '../../index-26CPLcdp.js';
2
+ export { a1 as GuildUserManager } from '../../index-iLzxxeFt.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 { az as VipMemberManager } from '../../index-26CPLcdp.js';
1
+ export { az as VipMemberManager } from '../../index-iLzxxeFt.js';
2
2
  import '../../structures/Collection.js';
3
3
  import '../../types/api/APIVipMember.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,5 +1,5 @@
1
1
  import 'events';
2
- export { R as REST } from '../index-26CPLcdp.js';
2
+ export { R as REST } from '../index-iLzxxeFt.js';
3
3
  import '../structures/Collection.js';
4
4
  import '../types/api/APIAdvert.js';
5
5
  import '../types/api/APIAutomaticRole.js';
package/dist/rest/REST.js CHANGED
@@ -92,7 +92,7 @@ class REST extends import_events.default {
92
92
  return this;
93
93
  }
94
94
  formatUrl(url) {
95
- return (url.endsWith("/") ? url.slice(0, url.length - 1) : url) ?? "/status";
95
+ return ((url.endsWith("/") ? url.slice(0, url.length - 1) : url) ?? "/status").replaceAll("//", "/");
96
96
  }
97
97
  /**
98
98
  * Request Data from a certain url
@@ -105,6 +105,7 @@ class REST extends import_events.default {
105
105
  import_Assertion.Assertion.assertString(this.clientKey);
106
106
  import_Assertion.Assertion.assertString(url);
107
107
  url = this.formatUrl(import_Routes.Routes.base + url);
108
+ console.log(url);
108
109
  const headers = new import_undici.Headers();
109
110
  headers.append("authorization", this.authKey);
110
111
  headers.append("client_key", this.clientKey);
@@ -115,19 +116,13 @@ class REST extends import_events.default {
115
116
  if ("cache" in body) delete body.cache;
116
117
  if ("rest" in body) delete body.rest;
117
118
  if ("guilds" in body) delete body.guilds;
118
- const methodUpper = method.toUpperCase();
119
- const hasBody = body !== void 0 && body !== null && methodUpper !== "GET" && methodUpper !== "HEAD";
119
+ if ("guild" in body) delete body.guild;
120
120
  const res = await (0, import_undici.request)(url, {
121
- method: methodUpper,
122
- headers: {
123
- ...headers,
124
- ...hasBody && { "content-type": "application/json" }
125
- },
126
- ...hasBody && {
127
- body: JSON.stringify(body)
128
- },
129
- bodyTimeout: 12e4,
130
- headersTimeout: 12e4
121
+ method: method.toUpperCase(),
122
+ headers,
123
+ body: JSON.stringify(body),
124
+ bodyTimeout: 120 * 1e3,
125
+ headersTimeout: 120 * 1e3
131
126
  });
132
127
  const responseBody = await res.body.json();
133
128
  const { data, message } = responseBody;
@@ -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-26CPLcdp.js';
3
+ export { R as REST } from '../index-iLzxxeFt.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-26CPLcdp.js';
2
+ export { j as AutomaticMessage } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { y as GuildBet } from '../../index-iLzxxeFt.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APIBetChannel.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { E as GuildBetUser } from '../../index-26CPLcdp.js';
1
+ export { E as GuildBetUser } from '../../index-iLzxxeFt.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 { G as Guild } from '../../index-26CPLcdp.js';
1
+ export { G as Guild } from '../../index-iLzxxeFt.js';
2
2
  import '../Collection.js';
3
3
  import '../../types/api/APIAutomaticRole.js';
4
4
  import '../../types/api/APIBuff.js';
@@ -230,7 +230,7 @@ class Guild {
230
230
  this.tournaments.fetch(),
231
231
  this.shops.fetch(),
232
232
  this.automaticMessages.fetch(),
233
- this.ticket_panels.fetch(null)
233
+ this.ticket_panels.fetch()
234
234
  ]);
235
235
  return this;
236
236
  }
@@ -726,7 +726,7 @@ update_fn = function(data) {
726
726
  });
727
727
  }
728
728
  }
729
- if ("automatic_roles" in data) {
729
+ if (data?.automatic_roles) {
730
730
  this.automatic_roles = new import_Collection.Collection();
731
731
  for (let role of data?.automatic_roles || []) {
732
732
  this.automatic_roles.set(role._id, {
@@ -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-26CPLcdp.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-iLzxxeFt.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-26CPLcdp.js';
1
+ export { a2 as LogEntry } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { L as GuildMatch } from '../../index-iLzxxeFt.js';
2
2
  import '../../types/api/APIPlayer.js';
3
3
  import '../../types/api/APIBaseChannel.js';
4
4
  import '../../types/api/APIAdvert.js';
@@ -1,4 +1,4 @@
1
- export { P as GuildMediator } from '../../index-26CPLcdp.js';
1
+ export { P as GuildMediator } from '../../index-iLzxxeFt.js';
2
2
  import '../../types/api/APIGuildMediator.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { aa as MinesGame } from '../../index-26CPLcdp.js';
1
+ export { aa as MinesGame } from '../../index-iLzxxeFt.js';
2
2
  import '../../types/api/APIMinesGame.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -1,4 +1,4 @@
1
- export { ah as Product } from '../../index-26CPLcdp.js';
1
+ export { ah as Product } from '../../index-iLzxxeFt.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-26CPLcdp.js';
2
+ export { ap as Shop } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { Y as GuildTicket } from '../../index-iLzxxeFt.js';
2
2
  import '../../types/api/APIGuildTicket.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -1,5 +1,5 @@
1
1
  import 'discord-api-types/v10';
2
- export { at as TicketPanel } from '../../index-26CPLcdp.js';
2
+ export { at as TicketPanel } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { av as Tournament } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { a0 as GuildUser } from '../../index-iLzxxeFt.js';
2
2
  import '../../types/api/APIAdvert.js';
3
3
  import '../../types/api/APIAutomaticRole.js';
4
4
  import '../../types/api/APIBaseChannel.js';
@@ -412,7 +412,7 @@ const _GuildUser = class _GuildUser {
412
412
  }
413
413
  }
414
414
  }
415
- if ("accessories" in data) payload["accessories"] = data["accessories"];
415
+ if (data?.accessories) payload["accessories"] = data["accessories"];
416
416
  const response = await this.rest.request({
417
417
  method: "patch",
418
418
  url,
@@ -1,4 +1,4 @@
1
- export { ay as VipMember } from '../../index-26CPLcdp.js';
1
+ export { ay as VipMember } from '../../index-iLzxxeFt.js';
2
2
  import '../../types/api/APIVipMember.js';
3
3
  import '../../types/api/APIAdvert.js';
4
4
  import '../../types/api/APIAutomaticRole.js';
@@ -1,5 +1,5 @@
1
1
  import '../structures/Collection.js';
2
- export { ak as RequestOptions, al as RestEvents } from '../index-26CPLcdp.js';
2
+ export { ak as RequestOptions, al as RestEvents } from '../index-iLzxxeFt.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-26CPLcdp.js';
2
+ export { A as APIAutomaticMessage, l as AutomaticMessagePayload } from '../../index-iLzxxeFt.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-26CPLcdp.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-iLzxxeFt.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-26CPLcdp.js';
1
+ export { b as APIGuildBet, r as BetChannelTypes, s as BetQueue } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { c as APIGuildBetUser } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { d as APIGuildGroupedChannel } from '../../index-iLzxxeFt.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-26CPLcdp.js';
1
+ export { e as APIGuildMatch, M as GuildMatchChannelsType, O as GuildMatchMessagesType, a8 as MatchSelection } from '../../index-iLzxxeFt.js';
2
2
  import './APIPlayer.js';
3
3
  import './APIBaseChannel.js';
4
4
  import './APIMessage.js';
@@ -28,6 +28,7 @@ declare enum GuildPermissionsTypes {
28
28
  CreateQueueFromAnyChannel = "create_queues_from_any_channel",
29
29
  PunishMembers = "punish_members",
30
30
  ChangeNick = "change_nick",
31
+ ChangeBio = "change_bio",
31
32
  GiveWarnings = "give_warnings",
32
33
  ManageBlacklist = "manage_blacklist"
33
34
  }
@@ -46,6 +46,7 @@ var GuildPermissionsTypes = /* @__PURE__ */ ((GuildPermissionsTypes2) => {
46
46
  GuildPermissionsTypes2["CreateQueueFromAnyChannel"] = "create_queues_from_any_channel";
47
47
  GuildPermissionsTypes2["PunishMembers"] = "punish_members";
48
48
  GuildPermissionsTypes2["ChangeNick"] = "change_nick";
49
+ GuildPermissionsTypes2["ChangeBio"] = "change_bio";
49
50
  GuildPermissionsTypes2["GiveWarnings"] = "give_warnings";
50
51
  GuildPermissionsTypes2["ManageBlacklist"] = "manage_blacklist";
51
52
  return GuildPermissionsTypes2;
@@ -1,4 +1,4 @@
1
- export { f as APIGuildUser, ai as Profile } from '../../index-26CPLcdp.js';
1
+ export { f as APIGuildUser, ai as Profile } from '../../index-iLzxxeFt.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-26CPLcdp.js';
2
+ export { h as APITicketPanel } from '../../index-iLzxxeFt.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-26CPLcdp.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-iLzxxeFt.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-26CPLcdp.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-iLzxxeFt.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.9",
3
+ "version": "1.7.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  "@discordjs/builders": "^1.13.1",
42
42
  "discord-api-types": "^0.38.39",
43
43
  "tsup": "^8.5.1",
44
- "undici": "^7.10.0"
44
+ "undici": "^7.24.7"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@eslint/js": "^9.29.0",
@@ -59,4 +59,4 @@
59
59
  "engines": {
60
60
  "node": ">=20"
61
61
  }
62
- }
62
+ }