@duque.edits/sdk 1.3.6 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{index-BAy2XOWP.d.ts → index-sk2XkpmT.d.ts} +55 -6
- 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/betuser/GuildBetUserManager.d.ts +2 -1
- package/dist/managers/buffer/BufferManager.d.ts +2 -1
- package/dist/managers/guild/GuildManager.d.ts +2 -1
- package/dist/managers/index.d.ts +2 -1
- package/dist/managers/logs/LogManager.d.ts +2 -1
- package/dist/managers/match/GuildMatchManager.d.ts +2 -1
- package/dist/managers/mediator/GuildMediatorManager.d.ts +2 -1
- package/dist/managers/message/MessagesManager.d.ts +2 -1
- package/dist/managers/minesgame/MinesGameManager.d.ts +2 -1
- 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/shop/ShopManager.d.ts +2 -1
- package/dist/managers/ticket/TicketManager.d.ts +2 -1
- package/dist/managers/ticketpanel/TicketPanelManager.d.ts +2 -1
- package/dist/managers/tournament/TournamentManager.d.ts +2 -1
- package/dist/managers/user/GuildUserManager.d.ts +2 -1
- package/dist/managers/user/GuildUserManager.js +1 -0
- package/dist/managers/vipmember/VipMemberManager.d.ts +2 -1
- package/dist/rest/REST.d.ts +2 -1
- package/dist/rest/REST.js +3 -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/betuser/GuildBetUser.d.ts +2 -1
- package/dist/structures/guild/Guild.d.ts +2 -1
- package/dist/structures/guild/Guild.js +53 -9
- 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/mediator/GuildMediator.d.ts +2 -1
- package/dist/structures/minesgame/MinesGame.d.ts +2 -1
- 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/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 +28 -19
- package/dist/structures/vipmember/VipMember.d.ts +2 -1
- package/dist/types/RestTypes.d.ts +2 -1
- package/dist/types/api/APIAutomaticMessage.d.ts +2 -1
- package/dist/types/api/APIGuild.d.ts +2 -1
- package/dist/types/api/APIGuild.js +11 -2
- 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/APIGuildPermissions.d.ts +3 -1
- package/dist/types/api/APIGuildPermissions.js +2 -0
- package/dist/types/api/APIGuildUser.d.ts +2 -1
- package/dist/types/api/APITicketPanel.d.ts +2 -1
- package/dist/types/api/APITimer.d.ts +9 -0
- package/dist/types/api/APITimer.js +16 -0
- package/dist/types/api/index.d.ts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -36,6 +36,7 @@ var import_TicketPanelManager = require("../../managers/ticketpanel/TicketPanelM
|
|
|
36
36
|
var import_TournamentManager = require("../../managers/tournament/TournamentManager");
|
|
37
37
|
var import_Routes = require("../../rest/Routes");
|
|
38
38
|
var import_Assertion = require("../../utils/Assertion");
|
|
39
|
+
var import_Collection = require("../Collection");
|
|
39
40
|
var _Guild_instances, update_fn;
|
|
40
41
|
class Guild {
|
|
41
42
|
/**
|
|
@@ -96,6 +97,7 @@ class Guild {
|
|
|
96
97
|
__publicField(this, "webhook_urls");
|
|
97
98
|
__publicField(this, "adverts");
|
|
98
99
|
__publicField(this, "ticket_panels");
|
|
100
|
+
__publicField(this, "timers");
|
|
99
101
|
__publicField(this, "codes");
|
|
100
102
|
__publicField(this, "coin_symbol");
|
|
101
103
|
this.data = data;
|
|
@@ -107,7 +109,6 @@ class Guild {
|
|
|
107
109
|
this.modes = data?.modes;
|
|
108
110
|
this.prices = data?.prices;
|
|
109
111
|
this.scores = data?.scores;
|
|
110
|
-
this.codes = data?.codes;
|
|
111
112
|
this.prefix = data?.prefix;
|
|
112
113
|
this.prefixes = data?.prefixes;
|
|
113
114
|
this.status = data?.status;
|
|
@@ -125,11 +126,22 @@ class Guild {
|
|
|
125
126
|
},
|
|
126
127
|
users: {
|
|
127
128
|
punished: "",
|
|
128
|
-
updated: ""
|
|
129
|
+
updated: "",
|
|
130
|
+
creations: "",
|
|
131
|
+
wins: "",
|
|
132
|
+
losses: "",
|
|
133
|
+
credit: "",
|
|
134
|
+
spins: "",
|
|
135
|
+
mvps: "",
|
|
136
|
+
points: ""
|
|
129
137
|
},
|
|
130
138
|
shop: {
|
|
131
139
|
redeemed: ""
|
|
132
140
|
},
|
|
141
|
+
roullete: {
|
|
142
|
+
spins_gained: "",
|
|
143
|
+
spins_used: ""
|
|
144
|
+
},
|
|
133
145
|
tickets: {
|
|
134
146
|
closed: "",
|
|
135
147
|
opened: ""
|
|
@@ -164,9 +176,9 @@ class Guild {
|
|
|
164
176
|
updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
|
|
165
177
|
});
|
|
166
178
|
}
|
|
167
|
-
this.codes =
|
|
179
|
+
this.codes = new import_Collection.Collection();
|
|
168
180
|
for (let _adv of data?.codes || []) {
|
|
169
|
-
this.codes.
|
|
181
|
+
this.codes.set(_adv._id, {
|
|
170
182
|
_id: _adv._id,
|
|
171
183
|
admin_id: _adv.admin_id,
|
|
172
184
|
type: _adv.type,
|
|
@@ -177,6 +189,13 @@ class Guild {
|
|
|
177
189
|
updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
|
|
178
190
|
});
|
|
179
191
|
}
|
|
192
|
+
this.timers = new import_Collection.Collection();
|
|
193
|
+
for (let _timer of data?.timers || []) {
|
|
194
|
+
this.timers.set(_timer.id, {
|
|
195
|
+
..._timer,
|
|
196
|
+
expiresAt: new Date(_timer.expiresAt)
|
|
197
|
+
});
|
|
198
|
+
}
|
|
180
199
|
}
|
|
181
200
|
async _start() {
|
|
182
201
|
await Promise.all([
|
|
@@ -252,7 +271,7 @@ class Guild {
|
|
|
252
271
|
return __privateMethod(this, _Guild_instances, update_fn).call(this, response);
|
|
253
272
|
}
|
|
254
273
|
async createCode(data) {
|
|
255
|
-
this.codes.
|
|
274
|
+
this.codes.set(data._id, data);
|
|
256
275
|
const url = import_Routes.Routes.guilds.get(this.id);
|
|
257
276
|
const payload = { codes: this.codes };
|
|
258
277
|
const response = await this.rest.request({ method: "PATCH", url, payload });
|
|
@@ -347,11 +366,22 @@ class Guild {
|
|
|
347
366
|
},
|
|
348
367
|
users: {
|
|
349
368
|
punished: data?.users?.punished || this.webhook_urls?.users?.punished || "",
|
|
350
|
-
updated: data?.users?.updated || this.webhook_urls?.users?.updated || ""
|
|
369
|
+
updated: data?.users?.updated || this.webhook_urls?.users?.updated || "",
|
|
370
|
+
wins: data?.users?.wins || this.webhook_urls?.users?.wins || "",
|
|
371
|
+
creations: data?.users?.creations || this.webhook_urls?.users?.creations || "",
|
|
372
|
+
credit: data?.users?.credit || this.webhook_urls?.users?.credit || "",
|
|
373
|
+
losses: data?.users?.losses || this.webhook_urls?.users?.losses || "",
|
|
374
|
+
mvps: data?.users?.mvps || this.webhook_urls?.users?.mvps || "",
|
|
375
|
+
points: data?.users?.points || this.webhook_urls?.users?.points || "",
|
|
376
|
+
spins: data?.users?.spins || this.webhook_urls?.users?.spins || ""
|
|
351
377
|
},
|
|
352
378
|
shop: {
|
|
353
379
|
redeemed: data?.shop?.redeemed || this.webhook_urls?.shop?.redeemed || ""
|
|
354
380
|
},
|
|
381
|
+
roullete: {
|
|
382
|
+
spins_gained: data?.roullete?.spins_gained || this.webhook_urls?.roullete?.spins_gained || "",
|
|
383
|
+
spins_used: data?.roullete?.spins_used || this.webhook_urls?.roullete?.spins_used || ""
|
|
384
|
+
},
|
|
355
385
|
tickets: {
|
|
356
386
|
closed: data?.tickets?.closed || this.webhook_urls?.tickets?.closed || "",
|
|
357
387
|
opened: data?.tickets?.opened || this.webhook_urls?.tickets?.opened || ""
|
|
@@ -529,7 +559,7 @@ class Guild {
|
|
|
529
559
|
bet_count: this.bet_count,
|
|
530
560
|
channels: this.channels,
|
|
531
561
|
client_key: this.client_key,
|
|
532
|
-
codes: this.codes,
|
|
562
|
+
codes: this.codes.toArray(),
|
|
533
563
|
coin_symbol: this.coin_symbol,
|
|
534
564
|
createdAt: this.createdAt,
|
|
535
565
|
daily_categories: this.daily_categories,
|
|
@@ -544,6 +574,7 @@ class Guild {
|
|
|
544
574
|
roulette_settings: this.roulette_settings,
|
|
545
575
|
scores: this.scores,
|
|
546
576
|
status: this.status,
|
|
577
|
+
timers: this.timers.toArray(),
|
|
547
578
|
tickets_configuration: this.tickets_configuration,
|
|
548
579
|
updatedAt: this.updatedAt,
|
|
549
580
|
webhook_urls: this.webhook_urls
|
|
@@ -569,11 +600,11 @@ update_fn = function(data) {
|
|
|
569
600
|
updatedAt: _adv.updatedAt ? new Date(_adv.updatedAt) : /* @__PURE__ */ new Date()
|
|
570
601
|
});
|
|
571
602
|
}
|
|
603
|
+
continue;
|
|
572
604
|
}
|
|
573
605
|
if (key === "code") {
|
|
574
|
-
this.codes = [];
|
|
575
606
|
for (let _adv of data.codes) {
|
|
576
|
-
this.codes.
|
|
607
|
+
this.codes.set(_adv._id, {
|
|
577
608
|
_id: _adv._id,
|
|
578
609
|
admin_id: _adv.admin_id,
|
|
579
610
|
type: _adv.type,
|
|
@@ -586,6 +617,19 @@ update_fn = function(data) {
|
|
|
586
617
|
}
|
|
587
618
|
continue;
|
|
588
619
|
}
|
|
620
|
+
if (key === "timers") {
|
|
621
|
+
this.timers = new import_Collection.Collection();
|
|
622
|
+
for (let _timer of data.timers) {
|
|
623
|
+
this.timers.set(_timer.id, {
|
|
624
|
+
id: _timer.id,
|
|
625
|
+
type: _timer.type,
|
|
626
|
+
role_id: _timer.role_id,
|
|
627
|
+
target_id: _timer.target_id,
|
|
628
|
+
expiresAt: _timer.expiresAt ? new Date(_timer.expiresAt) : /* @__PURE__ */ new Date()
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
continue;
|
|
632
|
+
}
|
|
589
633
|
}
|
|
590
634
|
this.updatedAt = /* @__PURE__ */ new Date();
|
|
591
635
|
this.rest.guilds.cache.set(this.id, this);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { j as AutomaticMessage, G as Guild, x as GuildBet, z as GuildBetUser, K as GuildMatch, O as GuildMediator, X as GuildTicket,
|
|
1
|
+
export { j as AutomaticMessage, G as Guild, x as GuildBet, z as GuildBetUser, K as GuildMatch, O as GuildMediator, X as GuildTicket, $ as GuildUser, a1 as LogEntry, a9 as MinesGame, ag as Product, ao as Shop, as as TicketPanel, au as Tournament, ax as VipMember } from '../index-sk2XkpmT.js';
|
|
2
2
|
export { Collection } from './Collection.js';
|
|
3
3
|
import '../types/api/APIAdvert.js';
|
|
4
4
|
import '../types/api/APIBaseChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../types/api/APILogEntry.js';
|
|
|
19
19
|
import '../types/api/APIMinesGame.js';
|
|
20
20
|
import '../types/api/APIVipMember.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../types/api/APITimer.js';
|
|
22
23
|
import '../types/api/APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a1 as LogEntry } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APILogEntry.js';
|
|
3
3
|
import '../../types/api/APIAdvert.js';
|
|
4
4
|
import '../../types/api/APIBaseChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APIMinesGame.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { K as GuildMatch } from '../../index-
|
|
1
|
+
export { K as GuildMatch } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APIPlayer.js';
|
|
3
3
|
import '../../types/api/APIBaseChannel.js';
|
|
4
4
|
import '../../types/api/APIAdvert.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APIMinesGame.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { O as GuildMediator } from '../../index-
|
|
1
|
+
export { O as GuildMediator } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APIGuildMediator.js';
|
|
3
3
|
import '../../types/api/APIAdvert.js';
|
|
4
4
|
import '../../types/api/APIBaseChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APIMinesGame.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a9 as MinesGame } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APIMinesGame.js';
|
|
3
3
|
import '../../types/api/APIAdvert.js';
|
|
4
4
|
import '../../types/api/APIBaseChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APILogEntry.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ag as Product } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APIPlayer.js';
|
|
3
3
|
import '../../types/api/APIProduct.js';
|
|
4
4
|
import '../../types/api/APIAdvert.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APIMinesGame.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'discord-api-types/v10';
|
|
2
|
-
export {
|
|
2
|
+
export { ao as Shop } from '../../index-sk2XkpmT.js';
|
|
3
3
|
import '../../types/api/APIGuildShop.js';
|
|
4
4
|
import '../../types/api/APIAdvert.js';
|
|
5
5
|
import '../../types/api/APIBaseChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APIProduct.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { X as GuildTicket } from '../../index-
|
|
1
|
+
export { X as GuildTicket } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APIGuildTicket.js';
|
|
3
3
|
import '../../types/api/APIAdvert.js';
|
|
4
4
|
import '../../types/api/APIBaseChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APIMinesGame.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'discord-api-types/v10';
|
|
2
|
-
export {
|
|
2
|
+
export { as as TicketPanel } from '../../index-sk2XkpmT.js';
|
|
3
3
|
import '../../types/api/APIAdvert.js';
|
|
4
4
|
import '../../types/api/APIBaseChannel.js';
|
|
5
5
|
import '../../types/api/APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APIMinesGame.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { au as Tournament } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APIPlayer.js';
|
|
3
3
|
import '../../types/api/APITournament.js';
|
|
4
4
|
import '../../types/api/APIAdvert.js';
|
|
@@ -20,3 +20,4 @@ import '../../types/api/APIMinesGame.js';
|
|
|
20
20
|
import '../../types/api/APIVipMember.js';
|
|
21
21
|
import '../Collection.js';
|
|
22
22
|
import 'events';
|
|
23
|
+
import '../../types/api/APITimer.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { $ as GuildUser } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APIAdvert.js';
|
|
3
3
|
import '../../types/api/APIBaseChannel.js';
|
|
4
4
|
import '../../types/api/APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APIMinesGame.js';
|
|
|
19
19
|
import '../../types/api/APIVipMember.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -322,6 +322,8 @@ const _GuildUser = class _GuildUser {
|
|
|
322
322
|
if (hasTimeExpired && acc.units !== 0) return { value: true, type: "units" };
|
|
323
323
|
return { value: true, type: "units" };
|
|
324
324
|
}
|
|
325
|
+
async getActiveAccessories() {
|
|
326
|
+
}
|
|
325
327
|
async hasAccessory(type) {
|
|
326
328
|
const acc = await this.getAccessory(type);
|
|
327
329
|
if (acc?.time === 0 && acc?.units === 0) return false;
|
|
@@ -351,17 +353,18 @@ const _GuildUser = class _GuildUser {
|
|
|
351
353
|
if (!data?.type) data.type = "add";
|
|
352
354
|
const url = import_Routes.Routes.guilds.users.get(this.manager.guild.id, this.id);
|
|
353
355
|
let payload = {};
|
|
354
|
-
|
|
355
|
-
payload["
|
|
356
|
+
const wrapped = this.userDailyWrapper(data);
|
|
357
|
+
payload["daily"] = wrapped.daily;
|
|
358
|
+
payload["consecutive_wins"] = wrapped.consecutive_wins;
|
|
356
359
|
const numericFields = [
|
|
357
360
|
"wins",
|
|
358
361
|
"points",
|
|
359
362
|
"losses",
|
|
360
363
|
"mvps",
|
|
361
|
-
"games",
|
|
362
364
|
"creations",
|
|
363
365
|
"spins",
|
|
364
366
|
"coins",
|
|
367
|
+
"games",
|
|
365
368
|
"consecutive_wins"
|
|
366
369
|
];
|
|
367
370
|
const arrayFields = ["items", "original_channels", "adverts", "used_codes"];
|
|
@@ -453,8 +456,14 @@ const _GuildUser = class _GuildUser {
|
|
|
453
456
|
userDailyWrapper(user) {
|
|
454
457
|
const now = /* @__PURE__ */ new Date();
|
|
455
458
|
const sameDay = !!this.daily?.date && (0, import_isSameDayUTC.isSameDateUTC)(this.daily.date, now);
|
|
456
|
-
const
|
|
457
|
-
|
|
459
|
+
const prev = this.daily ?? {
|
|
460
|
+
points: 0,
|
|
461
|
+
wins: 0,
|
|
462
|
+
coins: 0,
|
|
463
|
+
losses: 0,
|
|
464
|
+
mvps: 0,
|
|
465
|
+
date: now
|
|
466
|
+
};
|
|
458
467
|
const inc = {
|
|
459
468
|
points: user?.points || 0,
|
|
460
469
|
wins: user?.wins ?? 0,
|
|
@@ -462,24 +471,24 @@ const _GuildUser = class _GuildUser {
|
|
|
462
471
|
losses: user?.losses || 0,
|
|
463
472
|
mvps: user?.mvps || 0
|
|
464
473
|
};
|
|
465
|
-
|
|
466
|
-
points:
|
|
467
|
-
wins:
|
|
468
|
-
coins:
|
|
469
|
-
losses:
|
|
470
|
-
mvps:
|
|
474
|
+
const daily = {
|
|
475
|
+
points: (0, import_clamp0.clamp0)((sameDay ? prev.points : 0) + inc.points),
|
|
476
|
+
wins: (0, import_clamp0.clamp0)((sameDay ? prev.wins : 0) + inc.wins),
|
|
477
|
+
coins: (0, import_clamp0.clamp0)((sameDay ? prev.coins : 0) + inc.coins),
|
|
478
|
+
losses: (0, import_clamp0.clamp0)((sameDay ? prev.losses : 0) + inc.losses),
|
|
479
|
+
mvps: (0, import_clamp0.clamp0)((sameDay ? prev.mvps : 0) + inc.mvps),
|
|
471
480
|
date: now
|
|
472
481
|
};
|
|
473
482
|
const hasGainedWins = inc.wins > 0;
|
|
474
483
|
const hasLostToday = inc.losses > 0;
|
|
475
|
-
let consecutive = user
|
|
476
|
-
if (hasLostToday)
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
484
|
+
let consecutive = user?.consecutive_wins ?? this.consecutive_wins ?? 0;
|
|
485
|
+
if (hasLostToday) consecutive = 0;
|
|
486
|
+
else if (hasGainedWins) consecutive += 1;
|
|
487
|
+
return {
|
|
488
|
+
...user,
|
|
489
|
+
daily,
|
|
490
|
+
consecutive_wins: consecutive
|
|
491
|
+
};
|
|
483
492
|
}
|
|
484
493
|
};
|
|
485
494
|
_GuildUser_instances = new WeakSet();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ax as VipMember } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import '../../types/api/APIVipMember.js';
|
|
3
3
|
import '../../types/api/APIAdvert.js';
|
|
4
4
|
import '../../types/api/APIBaseChannel.js';
|
|
@@ -19,4 +19,5 @@ import '../../types/api/APILogEntry.js';
|
|
|
19
19
|
import '../../types/api/APIMinesGame.js';
|
|
20
20
|
import '../Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import '../../types/api/APITimer.js';
|
|
22
23
|
import '../../types/api/APITournament.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../structures/Collection.js';
|
|
2
|
-
export {
|
|
2
|
+
export { aj as RequestOptions, ak as RestEvents } from '../index-sk2XkpmT.js';
|
|
3
3
|
import './api/APIAdvert.js';
|
|
4
4
|
import './api/APIBaseChannel.js';
|
|
5
5
|
import './api/APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ import './api/APILogEntry.js';
|
|
|
19
19
|
import './api/APIMinesGame.js';
|
|
20
20
|
import './api/APIVipMember.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import './api/APITimer.js';
|
|
22
23
|
import './api/APITournament.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'discord-api-types/v10';
|
|
2
|
-
export { A as APIAutomaticMessage } from '../../index-
|
|
2
|
+
export { A as APIAutomaticMessage } from '../../index-sk2XkpmT.js';
|
|
3
3
|
import './APIAdvert.js';
|
|
4
4
|
import './APIBaseChannel.js';
|
|
5
5
|
import './APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ import './APIMinesGame.js';
|
|
|
19
19
|
import './APIVipMember.js';
|
|
20
20
|
import '../../structures/Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import './APITimer.js';
|
|
22
23
|
import './APITournament.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { a as APIGuild, l as AutomaticMessagesTypes, v as DailyCategories, H as GuildChannelsType, I as GuildLogsWebhookUrls, Q as GuildModes, T as GuildPrices, U as GuildScores, V as GuildStatus, W as GuildStatusEnum, Y as GuildTicketConfiguration,
|
|
1
|
+
export { a as APIGuild, l as AutomaticMessagesTypes, v as DailyCategories, H as GuildChannelsType, I as GuildLogsWebhookUrls, Q as GuildModes, T as GuildPrices, U as GuildScores, V as GuildStatus, W as GuildStatusEnum, Y as GuildTicketConfiguration, _ as GuildTimerTypes, al as RoulettePrize, am as RouletteSettings } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import './APIGuildPermissions.js';
|
|
3
|
+
import './APITimer.js';
|
|
3
4
|
import './APIGuildAdvert.js';
|
|
4
5
|
import './APICode.js';
|
|
5
6
|
import './APIAdvert.js';
|
|
@@ -20,7 +20,8 @@ var APIGuild_exports = {};
|
|
|
20
20
|
__export(APIGuild_exports, {
|
|
21
21
|
AutomaticMessagesTypes: () => AutomaticMessagesTypes,
|
|
22
22
|
GuildChannelsType: () => GuildChannelsType,
|
|
23
|
-
GuildStatusEnum: () => GuildStatusEnum
|
|
23
|
+
GuildStatusEnum: () => GuildStatusEnum,
|
|
24
|
+
GuildTimerTypes: () => GuildTimerTypes
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(APIGuild_exports);
|
|
26
27
|
var GuildStatusEnum = /* @__PURE__ */ ((GuildStatusEnum2) => {
|
|
@@ -64,11 +65,19 @@ var GuildChannelsType = /* @__PURE__ */ ((GuildChannelsType2) => {
|
|
|
64
65
|
GuildChannelsType2["RouletteLogs"] = "roulette_logs";
|
|
65
66
|
GuildChannelsType2["Rules"] = "rules";
|
|
66
67
|
GuildChannelsType2["BettingChannel"] = "betting";
|
|
68
|
+
GuildChannelsType2["BotWarningsChannel"] = "bot_warnings_channel";
|
|
69
|
+
GuildChannelsType2["UserWarningsChannel"] = "user_warnings_channel";
|
|
67
70
|
return GuildChannelsType2;
|
|
68
71
|
})(GuildChannelsType || {});
|
|
72
|
+
var GuildTimerTypes = /* @__PURE__ */ ((GuildTimerTypes2) => {
|
|
73
|
+
GuildTimerTypes2["TemporaryRole"] = "temporary_role";
|
|
74
|
+
GuildTimerTypes2["Giveaway"] = "giveaway";
|
|
75
|
+
return GuildTimerTypes2;
|
|
76
|
+
})(GuildTimerTypes || {});
|
|
69
77
|
// Annotate the CommonJS export names for ESM import in node:
|
|
70
78
|
0 && (module.exports = {
|
|
71
79
|
AutomaticMessagesTypes,
|
|
72
80
|
GuildChannelsType,
|
|
73
|
-
GuildStatusEnum
|
|
81
|
+
GuildStatusEnum,
|
|
82
|
+
GuildTimerTypes
|
|
74
83
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as APIGuildBet, q as BetChannelTypes, r as BetQueue } from '../../index-
|
|
1
|
+
export { b as APIGuildBet, q as BetChannelTypes, r as BetQueue } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import './APIBetChannel.js';
|
|
3
3
|
import './APIMessage.js';
|
|
4
4
|
import './APIPlayer.js';
|
|
@@ -19,4 +19,5 @@ import './APIMinesGame.js';
|
|
|
19
19
|
import './APIVipMember.js';
|
|
20
20
|
import '../../structures/Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import './APITimer.js';
|
|
22
23
|
import './APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as APIGuildBetUser } from '../../index-
|
|
1
|
+
export { c as APIGuildBetUser } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import './APIAdvert.js';
|
|
3
3
|
import './APIBaseChannel.js';
|
|
4
4
|
import './APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ import './APIMinesGame.js';
|
|
|
19
19
|
import './APIVipMember.js';
|
|
20
20
|
import '../../structures/Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import './APITimer.js';
|
|
22
23
|
import './APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as APIGuildGroupedChannel } from '../../index-
|
|
1
|
+
export { d as APIGuildGroupedChannel } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import './APIAdvert.js';
|
|
3
3
|
import './APIBaseChannel.js';
|
|
4
4
|
import './APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ import './APIMinesGame.js';
|
|
|
19
19
|
import './APIVipMember.js';
|
|
20
20
|
import '../../structures/Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import './APITimer.js';
|
|
22
23
|
import './APITournament.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { e as APIGuildMatch, L as GuildMatchChannelsType, N as GuildMatchMessagesType,
|
|
1
|
+
export { e as APIGuildMatch, L as GuildMatchChannelsType, N as GuildMatchMessagesType, a7 as MatchSelection } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import './APIPlayer.js';
|
|
3
3
|
import './APIBaseChannel.js';
|
|
4
4
|
import './APIMessage.js';
|
|
@@ -19,4 +19,5 @@ import './APIMinesGame.js';
|
|
|
19
19
|
import './APIVipMember.js';
|
|
20
20
|
import '../../structures/Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import './APITimer.js';
|
|
22
23
|
import './APITournament.js';
|
|
@@ -25,7 +25,9 @@ declare enum GuildPermissionsTypes {
|
|
|
25
25
|
MediatorRole = "mediator_role",
|
|
26
26
|
ManageRouletteRolls = "manage_roulette_rolls",
|
|
27
27
|
CreateShop = "create_shop",
|
|
28
|
-
DeliverShopProduct = "deliver_shop_product"
|
|
28
|
+
DeliverShopProduct = "deliver_shop_product",
|
|
29
|
+
CreateQueueFromAnyChannel = "create_queues_from_any_channel",
|
|
30
|
+
PunishMembers = "punish_members"
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export { type APIGuildPermissions, GuildPermissionsTypes, type Permission };
|
|
@@ -44,6 +44,8 @@ var GuildPermissionsTypes = /* @__PURE__ */ ((GuildPermissionsTypes2) => {
|
|
|
44
44
|
GuildPermissionsTypes2["ManageRouletteRolls"] = "manage_roulette_rolls";
|
|
45
45
|
GuildPermissionsTypes2["CreateShop"] = "create_shop";
|
|
46
46
|
GuildPermissionsTypes2["DeliverShopProduct"] = "deliver_shop_product";
|
|
47
|
+
GuildPermissionsTypes2["CreateQueueFromAnyChannel"] = "create_queues_from_any_channel";
|
|
48
|
+
GuildPermissionsTypes2["PunishMembers"] = "punish_members";
|
|
47
49
|
return GuildPermissionsTypes2;
|
|
48
50
|
})(GuildPermissionsTypes || {});
|
|
49
51
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { f as APIGuildUser,
|
|
1
|
+
export { f as APIGuildUser, ah as Profile } from '../../index-sk2XkpmT.js';
|
|
2
2
|
import './APIAdvert.js';
|
|
3
3
|
import './APIBaseChannel.js';
|
|
4
4
|
import './APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ import './APIMinesGame.js';
|
|
|
19
19
|
import './APIVipMember.js';
|
|
20
20
|
import '../../structures/Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import './APITimer.js';
|
|
22
23
|
import './APITournament.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'discord-api-types/v10';
|
|
2
|
-
export { h as APITicketPanel } from '../../index-
|
|
2
|
+
export { h as APITicketPanel } from '../../index-sk2XkpmT.js';
|
|
3
3
|
import './APIAdvert.js';
|
|
4
4
|
import './APIBaseChannel.js';
|
|
5
5
|
import './APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ import './APIMinesGame.js';
|
|
|
19
19
|
import './APIVipMember.js';
|
|
20
20
|
import '../../structures/Collection.js';
|
|
21
21
|
import 'events';
|
|
22
|
+
import './APITimer.js';
|
|
22
23
|
import './APITournament.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var APITimer_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(APITimer_exports);
|
|
@@ -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 AutomaticMessagesTypes, B as BETSTATUS, m as Banner, o as BaseMatchModes, p as BaseMatchStatus, q as BetChannelTypes, r as BetQueue, C as Confirm, D as Daily, v as DailyCategories, H as GuildChannelsType, I as GuildLogsWebhookUrls, L as GuildMatchChannelsType, N as GuildMatchMessagesType, Q as GuildModes, T as GuildPrices, U as GuildScores, V as GuildStatus, W as GuildStatusEnum, Y as GuildTicketConfiguration,
|
|
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 AutomaticMessagesTypes, B as BETSTATUS, m as Banner, o as BaseMatchModes, p as BaseMatchStatus, q as BetChannelTypes, r as BetQueue, C as Confirm, D as Daily, v as DailyCategories, H as GuildChannelsType, I as GuildLogsWebhookUrls, L as GuildMatchChannelsType, N as GuildMatchMessagesType, Q as GuildModes, T as GuildPrices, U as GuildScores, V as GuildStatus, W as GuildStatusEnum, Y as GuildTicketConfiguration, _ as GuildTimerTypes, a3 as LogMessage, a4 as Logs, a5 as MATCHSTATUS, a6 as MATCHTYPES, a7 as MatchSelection, ab as Optional, ac as OriginalChannel, ad as OriginalChannels, ah as Profile, ai as ProfileCard, al as RoulettePrize, am as RouletteSettings, an as STATES, aq as StatusResponse, aw as UserAccessoryType } from '../../index-sk2XkpmT.js';
|
|
3
3
|
export { APIBaseChannel } from './APIBaseChannel.js';
|
|
4
4
|
export { APIBetChannel } from './APIBetChannel.js';
|
|
5
5
|
export { APICode } from './APICode.js';
|
|
@@ -19,4 +19,5 @@ export { APIVipMember } from './APIVipMember.js';
|
|
|
19
19
|
import '../../structures/Collection.js';
|
|
20
20
|
import 'events';
|
|
21
21
|
import 'discord-api-types/v10';
|
|
22
|
+
import './APITimer.js';
|
|
22
23
|
import './APITournament.js';
|
package/dist/types/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, l as AutomaticMessagesTypes, B as BETSTATUS, m as Banner, o as BaseMatchModes, p as BaseMatchStatus, q as BetChannelTypes, r as BetQueue, C as Confirm, D as Daily, v as DailyCategories, H as GuildChannelsType, I as GuildLogsWebhookUrls, L as GuildMatchChannelsType, N as GuildMatchMessagesType, Q as GuildModes, T as GuildPrices, U as GuildScores, V as GuildStatus, W as GuildStatusEnum, Y as GuildTicketConfiguration,
|
|
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 AutomaticMessagesTypes, B as BETSTATUS, m as Banner, o as BaseMatchModes, p as BaseMatchStatus, q as BetChannelTypes, r as BetQueue, C as Confirm, D as Daily, v as DailyCategories, H as GuildChannelsType, I as GuildLogsWebhookUrls, L as GuildMatchChannelsType, N as GuildMatchMessagesType, Q as GuildModes, T as GuildPrices, U as GuildScores, V as GuildStatus, W as GuildStatusEnum, Y as GuildTicketConfiguration, _ as GuildTimerTypes, a3 as LogMessage, a4 as Logs, a5 as MATCHSTATUS, a6 as MATCHTYPES, a7 as MatchSelection, ab as Optional, ac as OriginalChannel, ad as OriginalChannels, ah as Profile, ai as ProfileCard, aj as RequestOptions, ak as RestEvents, al as RoulettePrize, am as RouletteSettings, an as STATES, aq as StatusResponse, aw as UserAccessoryType } from '../index-sk2XkpmT.js';
|
|
2
2
|
export { APIAdvert } from './api/APIAdvert.js';
|
|
3
3
|
export { APIBaseChannel } from './api/APIBaseChannel.js';
|
|
4
4
|
export { APIBetChannel } from './api/APIBetChannel.js';
|
|
@@ -19,4 +19,5 @@ export { APIVipMember } from './api/APIVipMember.js';
|
|
|
19
19
|
import '../structures/Collection.js';
|
|
20
20
|
import 'events';
|
|
21
21
|
import 'discord-api-types/v10';
|
|
22
|
+
import './api/APITimer.js';
|
|
22
23
|
import './api/APITournament.js';
|