@duque.edits/sdk 1.6.3 → 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.
- package/dist/{index-BwmNIP2p.d.ts → index-26CPLcdp.d.ts} +303 -275
- package/dist/index.d.ts +2 -1
- package/dist/managers/automaticmessage/AutomaticMessageManager.d.ts +2 -1
- package/dist/managers/base.d.ts +2 -1
- package/dist/managers/bet/GuildBetManager.d.ts +2 -1
- package/dist/managers/bet/GuildBetManager.js +4 -0
- package/dist/managers/betuser/GuildBetUserManager.d.ts +2 -1
- package/dist/managers/betuser/GuildBetUserManager.js +4 -0
- package/dist/managers/buffer/BufferManager.d.ts +2 -1
- package/dist/managers/guild/GuildManager.d.ts +2 -1
- package/dist/managers/guild/GuildManager.js +4 -0
- package/dist/managers/index.d.ts +2 -1
- package/dist/managers/logs/LogManager.d.ts +2 -1
- package/dist/managers/logs/LogManager.js +4 -0
- package/dist/managers/match/GuildMatchManager.d.ts +2 -1
- package/dist/managers/match/GuildMatchManager.js +4 -0
- package/dist/managers/mediator/GuildMediatorManager.d.ts +2 -1
- package/dist/managers/mediator/GuildMediatorManager.js +4 -0
- package/dist/managers/message/MessagesManager.d.ts +2 -1
- package/dist/managers/message/MessagesManager.js +21 -6
- package/dist/managers/minesgame/MinesGameManager.d.ts +2 -1
- package/dist/managers/minesgame/MinesGameManager.js +4 -0
- package/dist/managers/permission/GuildPermissionManager.d.ts +2 -1
- package/dist/managers/player/PlayerManager.d.ts +2 -1
- package/dist/managers/product/ProductManager.d.ts +2 -1
- package/dist/managers/product/ProductManager.js +2 -1
- package/dist/managers/shop/ShopManager.d.ts +2 -1
- package/dist/managers/shop/ShopManager.js +2 -1
- package/dist/managers/ticket/TicketManager.d.ts +2 -1
- package/dist/managers/ticket/TicketManager.js +4 -0
- package/dist/managers/ticketpanel/TicketPanelManager.d.ts +2 -1
- package/dist/managers/ticketpanel/TicketPanelManager.js +2 -1
- package/dist/managers/tournament/TournamentManager.d.ts +2 -1
- package/dist/managers/tournament/TournamentManager.js +4 -0
- package/dist/managers/user/GuildUserManager.d.ts +2 -1
- package/dist/managers/user/GuildUserManager.js +4 -1
- package/dist/managers/vipmember/VipMemberManager.d.ts +2 -1
- package/dist/managers/vipmember/VipMemberManager.js +4 -0
- package/dist/rest/REST.d.ts +2 -1
- package/dist/rest/index.d.ts +2 -1
- package/dist/structures/automaticmessage/AutomaticMessage.d.ts +2 -1
- package/dist/structures/bet/GuildBet.d.ts +2 -1
- package/dist/structures/bet/GuildBet.js +19 -11
- package/dist/structures/betuser/GuildBetUser.d.ts +2 -1
- package/dist/structures/betuser/GuildBetUser.js +17 -9
- package/dist/structures/guild/Guild.d.ts +2 -1
- package/dist/structures/guild/Guild.js +49 -0
- package/dist/structures/index.d.ts +2 -1
- package/dist/structures/logentry/LogEntry.d.ts +2 -1
- package/dist/structures/match/GuildMatch.d.ts +2 -1
- package/dist/structures/match/GuildMatch.js +30 -10
- package/dist/structures/mediator/GuildMediator.d.ts +2 -1
- package/dist/structures/mediator/GuildMediator.js +11 -9
- package/dist/structures/minesgame/MinesGame.d.ts +2 -1
- package/dist/structures/minesgame/MinesGame.js +15 -0
- package/dist/structures/product/Product.d.ts +2 -1
- package/dist/structures/shop/Shop.d.ts +2 -1
- package/dist/structures/ticket/Ticket.d.ts +2 -1
- package/dist/structures/ticket/Ticket.js +16 -0
- package/dist/structures/ticketpanel/TicketPanel.d.ts +2 -1
- package/dist/structures/tournament/Tournament.d.ts +2 -1
- package/dist/structures/user/GuildUser.d.ts +2 -1
- package/dist/structures/user/GuildUser.js +5 -5
- package/dist/structures/vipmember/VipMember.d.ts +2 -1
- package/dist/structures/vipmember/VipMember.js +12 -7
- package/dist/types/RestTypes.d.ts +2 -1
- package/dist/types/api/APIAutomaticMessage.d.ts +2 -1
- package/dist/types/api/APIAutomaticRole.d.ts +18 -0
- package/dist/types/api/APIAutomaticRole.js +36 -0
- package/dist/types/api/APIGuild.d.ts +2 -1
- package/dist/types/api/APIGuildBet.d.ts +2 -1
- package/dist/types/api/APIGuildBetUser.d.ts +2 -1
- package/dist/types/api/APIGuildGroupedChannel.d.ts +2 -1
- package/dist/types/api/APIGuildMatch.d.ts +2 -1
- package/dist/types/api/APIGuildUser.d.ts +2 -1
- package/dist/types/api/APITicketPanel.d.ts +2 -1
- package/dist/types/api/index.d.ts +2 -1
- package/dist/types/api/index.js +2 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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
|
+
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-
|
|
1
|
+
export { a2 as LogEntry } from '../../index-26CPLcdp.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-
|
|
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';
|
|
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';
|
|
@@ -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
|
-
|
|
270
|
-
|
|
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,6 +1,7 @@
|
|
|
1
|
-
export { P as GuildMediator } from '../../index-
|
|
1
|
+
export { P as GuildMediator } from '../../index-26CPLcdp.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';
|
|
@@ -135,15 +135,17 @@ const _GuildMediator = class _GuildMediator {
|
|
|
135
135
|
return response;
|
|
136
136
|
}
|
|
137
137
|
toJSON() {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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,6 +1,7 @@
|
|
|
1
|
-
export { aa as MinesGame } from '../../index-
|
|
1
|
+
export { aa as MinesGame } from '../../index-26CPLcdp.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';
|
|
@@ -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,7 +1,8 @@
|
|
|
1
|
-
export { ah as Product } from '../../index-
|
|
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';
|
|
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-
|
|
2
|
+
export { ap as Shop } from '../../index-26CPLcdp.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-
|
|
1
|
+
export { Y as GuildTicket } from '../../index-26CPLcdp.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';
|
|
@@ -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,6 +1,7 @@
|
|
|
1
1
|
import 'discord-api-types/v10';
|
|
2
|
-
export { at as TicketPanel } from '../../index-
|
|
2
|
+
export { at as TicketPanel } from '../../index-26CPLcdp.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-
|
|
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';
|
|
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-
|
|
1
|
+
export { a0 as GuildUser } from '../../index-26CPLcdp.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;
|
|
@@ -344,10 +346,8 @@ const _GuildUser = class _GuildUser {
|
|
|
344
346
|
else return true;
|
|
345
347
|
}
|
|
346
348
|
async addAdvert(data) {
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
const response = await this.rest.request({ method: "POST", url, payload });
|
|
350
|
-
return __privateMethod(this, _GuildUser_instances, update_fn).call(this, response);
|
|
349
|
+
const payload = [...this.adverts, data];
|
|
350
|
+
return this.update({ adverts: payload });
|
|
351
351
|
}
|
|
352
352
|
async removeAdvert(advertId) {
|
|
353
353
|
let advs = this.adverts;
|
|
@@ -492,7 +492,7 @@ update_fn = function(data) {
|
|
|
492
492
|
this.updatedAt = /* @__PURE__ */ new Date();
|
|
493
493
|
this.createdAt = new Date(data.createdAt);
|
|
494
494
|
this.manager.set(this);
|
|
495
|
-
this.rest.emit("userUpdate", this);
|
|
495
|
+
this.rest.emit("userUpdate", this, this.guild);
|
|
496
496
|
return this;
|
|
497
497
|
};
|
|
498
498
|
let GuildUser = _GuildUser;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { ay as VipMember } from '../../index-
|
|
1
|
+
export { ay as VipMember } from '../../index-26CPLcdp.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';
|
|
@@ -144,13 +144,18 @@ const _VipMember = class _VipMember {
|
|
|
144
144
|
return response;
|
|
145
145
|
}
|
|
146
146
|
toJSON() {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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,6 +1,7 @@
|
|
|
1
1
|
import '../structures/Collection.js';
|
|
2
|
-
export { ak as RequestOptions, al as RestEvents } from '../index-
|
|
2
|
+
export { ak as RequestOptions, al as RestEvents } from '../index-26CPLcdp.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-
|
|
2
|
+
export { A as APIAutomaticMessage, l as AutomaticMessagePayload } from '../../index-26CPLcdp.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-
|
|
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
|
+
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-
|
|
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';
|
|
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-
|
|
1
|
+
export { c as APIGuildBetUser } from '../../index-26CPLcdp.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-
|
|
1
|
+
export { d as APIGuildGroupedChannel } from '../../index-26CPLcdp.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-
|
|
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';
|
|
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-
|
|
1
|
+
export { f as APIGuildUser, ai as Profile } from '../../index-26CPLcdp.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-
|
|
2
|
+
export { h as APITicketPanel } from '../../index-26CPLcdp.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-
|
|
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
|
+
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';
|
package/dist/types/api/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __export(api_exports, {
|
|
|
28
28
|
module.exports = __toCommonJS(api_exports);
|
|
29
29
|
__reExport(api_exports, require("./APIAdvert"), module.exports);
|
|
30
30
|
__reExport(api_exports, require("./APIAutomaticMessage"), module.exports);
|
|
31
|
+
__reExport(api_exports, require("./APIAutomaticRole"), module.exports);
|
|
31
32
|
__reExport(api_exports, require("./APIBaseChannel"), module.exports);
|
|
32
33
|
__reExport(api_exports, require("./APIBetChannel"), module.exports);
|
|
33
34
|
__reExport(api_exports, require("./APIBuff"), module.exports);
|
|
@@ -99,6 +100,7 @@ var STATES = /* @__PURE__ */ ((STATES2) => {
|
|
|
99
100
|
UserAccessoryType,
|
|
100
101
|
...require("./APIAdvert"),
|
|
101
102
|
...require("./APIAutomaticMessage"),
|
|
103
|
+
...require("./APIAutomaticRole"),
|
|
102
104
|
...require("./APIBaseChannel"),
|
|
103
105
|
...require("./APIBetChannel"),
|
|
104
106
|
...require("./APIBuff"),
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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-
|
|
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
|
+
export { APIAutomaticRole, AutomaticRolesTypes } from './api/APIAutomaticRole.js';
|
|
3
4
|
export { APIBaseChannel } from './api/APIBaseChannel.js';
|
|
4
5
|
export { APIBetChannel } from './api/APIBetChannel.js';
|
|
5
6
|
export { APIBuff } from './api/APIBuff.js';
|