@duque.edits/sdk 1.6.0 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BlU-ryiZ.d.ts → index-Ba4fOyKx.d.ts} +297 -287
- 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 +0 -1
- package/dist/managers/vipmember/VipMemberManager.d.ts +2 -1
- 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/betuser/GuildBetUser.d.ts +2 -1
- package/dist/structures/guild/Guild.d.ts +2 -1
- package/dist/structures/guild/Guild.js +51 -3
- 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 +3 -1
- 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/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/APIGuild.js +1 -0
- 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 +4 -2
- package/dist/types/api/APIGuildPermissions.js +3 -1
- package/dist/types/api/APIGuildUser.d.ts +2 -1
- package/dist/types/api/APILogEntry.d.ts +1 -0
- package/dist/types/api/APILogEntry.js +1 -0
- 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 +2 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { APIAdvert } from './types/api/APIAdvert.js';
|
|
2
|
+
import { APIAutomaticRole, AutomaticRolesTypes } from './types/api/APIAutomaticRole.js';
|
|
2
3
|
import { APIBaseChannel } from './types/api/APIBaseChannel.js';
|
|
3
4
|
import { APIBetChannel } from './types/api/APIBetChannel.js';
|
|
4
5
|
import { APIBuff } from './types/api/APIBuff.js';
|
|
@@ -99,6 +100,7 @@ interface RouletteSettings {
|
|
|
99
100
|
tertiary_color: string;
|
|
100
101
|
text_color: string;
|
|
101
102
|
prizes: RoulettePrize[];
|
|
103
|
+
custom_banner: string;
|
|
102
104
|
}
|
|
103
105
|
declare enum AutomaticMessagesTypes {
|
|
104
106
|
MatchStarted = "match_started",
|
|
@@ -129,7 +131,8 @@ declare enum GuildChannelsType {
|
|
|
129
131
|
BettingChannel = "betting",
|
|
130
132
|
BotWarningsChannel = "bot_warnings_channel",
|
|
131
133
|
UserWarningsChannel = "user_warnings_channel",
|
|
132
|
-
TicketRatingChannel = "ticket_rating_channel"
|
|
134
|
+
TicketRatingChannel = "ticket_rating_channel",
|
|
135
|
+
RouletteChannel = "roulette_channel"
|
|
133
136
|
}
|
|
134
137
|
interface APIGuild {
|
|
135
138
|
/** Guild's id */
|
|
@@ -169,6 +172,7 @@ interface APIGuild {
|
|
|
169
172
|
bet_count: number;
|
|
170
173
|
timers: APITimer[];
|
|
171
174
|
buffs: APIBuff[];
|
|
175
|
+
automatic_roles: APIAutomaticRole[];
|
|
172
176
|
}
|
|
173
177
|
interface GuildLogsWebhookUrls {
|
|
174
178
|
queues: {
|
|
@@ -205,6 +209,13 @@ declare enum GuildTimerTypes {
|
|
|
205
209
|
Giveaway = "giveaway"
|
|
206
210
|
}
|
|
207
211
|
|
|
212
|
+
interface AutomaticMessagePayload {
|
|
213
|
+
content?: string;
|
|
214
|
+
embeds?: Partial<APIEmbed>[];
|
|
215
|
+
components?: any[];
|
|
216
|
+
attachments?: any[];
|
|
217
|
+
flags?: number;
|
|
218
|
+
}
|
|
208
219
|
interface APIAutomaticMessage {
|
|
209
220
|
id: string;
|
|
210
221
|
_id: string;
|
|
@@ -213,13 +224,7 @@ interface APIAutomaticMessage {
|
|
|
213
224
|
channel_ids: string[];
|
|
214
225
|
type: AutomaticMessagesTypes;
|
|
215
226
|
guild_id: string;
|
|
216
|
-
message:
|
|
217
|
-
content: string;
|
|
218
|
-
embeds: APIEmbed[];
|
|
219
|
-
components: any[];
|
|
220
|
-
attachments: any[];
|
|
221
|
-
flags: number;
|
|
222
|
-
};
|
|
227
|
+
message: AutomaticMessagePayload;
|
|
223
228
|
interval_ms: number;
|
|
224
229
|
createdAt: Date;
|
|
225
230
|
updatedAt: Date;
|
|
@@ -302,276 +307,6 @@ interface APIGuildBetUser {
|
|
|
302
307
|
updatedAt: Date;
|
|
303
308
|
}
|
|
304
309
|
|
|
305
|
-
type MatchSelection = {
|
|
306
|
-
type: "creator" | "mvps" | "winners" | "rematch";
|
|
307
|
-
selected: string[];
|
|
308
|
-
confirmed: string[];
|
|
309
|
-
};
|
|
310
|
-
interface APIGuildMatch {
|
|
311
|
-
selections: MatchSelection[];
|
|
312
|
-
/** Match's type */
|
|
313
|
-
type: BaseMatchModes;
|
|
314
|
-
guild_id: string;
|
|
315
|
-
/** Match's status */
|
|
316
|
-
status: BaseMatchStatus;
|
|
317
|
-
/** Match's challenge */
|
|
318
|
-
challenge: boolean;
|
|
319
|
-
admin_id: string;
|
|
320
|
-
/** Match's players */
|
|
321
|
-
players: APIPlayer[];
|
|
322
|
-
code: string;
|
|
323
|
-
/** Match's winners */
|
|
324
|
-
winners: APIPlayer[];
|
|
325
|
-
betting: number;
|
|
326
|
-
/** Match's losers */
|
|
327
|
-
losers: APIPlayer[];
|
|
328
|
-
/** Match;s messages */
|
|
329
|
-
messages: APIMessage[];
|
|
330
|
-
/** Matches channels */
|
|
331
|
-
channels: APIBaseChannel[];
|
|
332
|
-
/** Match's maximum size */
|
|
333
|
-
maximumSize: number;
|
|
334
|
-
/** Match's kicked out */
|
|
335
|
-
kickedOut: APIPlayer[];
|
|
336
|
-
/** Match's confirmed */
|
|
337
|
-
confirmed: Confirm[];
|
|
338
|
-
/** Match's leaders */
|
|
339
|
-
leaders: APIPlayer[];
|
|
340
|
-
teams: APIPlayer[][];
|
|
341
|
-
creatorId: string;
|
|
342
|
-
/** Match's room creator id */
|
|
343
|
-
roomCreatorId: string;
|
|
344
|
-
bet: APIGuildBet | GuildBet;
|
|
345
|
-
/** Creation Date */
|
|
346
|
-
createdAt: Date;
|
|
347
|
-
/** Updated Date */
|
|
348
|
-
updatedAt: Date;
|
|
349
|
-
/** Match's id */
|
|
350
|
-
_id: string;
|
|
351
|
-
mvps: string[];
|
|
352
|
-
url: string;
|
|
353
|
-
logs: {
|
|
354
|
-
shutted: string;
|
|
355
|
-
closed: string;
|
|
356
|
-
managed: string;
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
declare enum GuildMatchChannelsType {
|
|
360
|
-
CreationChannel = "creation_channel",
|
|
361
|
-
TextChannel = "text_channel"
|
|
362
|
-
}
|
|
363
|
-
declare enum GuildMatchMessagesType {
|
|
364
|
-
CreationMessage = "creation_message"
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
interface Profile {
|
|
368
|
-
bannerUrl?: string;
|
|
369
|
-
avatarUrl?: string;
|
|
370
|
-
bio?: string;
|
|
371
|
-
name?: string;
|
|
372
|
-
extra?: string;
|
|
373
|
-
textColor?: string;
|
|
374
|
-
primaryColor?: string;
|
|
375
|
-
secondaryColor?: string;
|
|
376
|
-
tertiaryColor?: string;
|
|
377
|
-
booster?: {
|
|
378
|
-
status?: "on" | "off";
|
|
379
|
-
expires?: number;
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
interface APIGuildUser {
|
|
383
|
-
/** User's id */
|
|
384
|
-
id: string;
|
|
385
|
-
guild_id: string;
|
|
386
|
-
/** User's daily */
|
|
387
|
-
daily: Omit<Daily, "credit">;
|
|
388
|
-
profile: Profile;
|
|
389
|
-
/** User's points */
|
|
390
|
-
points: number;
|
|
391
|
-
creations: number;
|
|
392
|
-
/** User's wins */
|
|
393
|
-
wins: number;
|
|
394
|
-
consecutive_wins: number;
|
|
395
|
-
adverts: APIAdvert[];
|
|
396
|
-
/** User's mvps */
|
|
397
|
-
mvps: number;
|
|
398
|
-
coins: number;
|
|
399
|
-
/** User's losses */
|
|
400
|
-
losses: number;
|
|
401
|
-
/** User's games */
|
|
402
|
-
games: number;
|
|
403
|
-
/** If user is blacklisted */
|
|
404
|
-
blacklist: boolean;
|
|
405
|
-
/** User's accessories such as double point */
|
|
406
|
-
accessories: Accessory[];
|
|
407
|
-
/** User's original channels */
|
|
408
|
-
original_channels: OriginalChannels;
|
|
409
|
-
spins: number;
|
|
410
|
-
used_codes: string[];
|
|
411
|
-
/** Creation Date */
|
|
412
|
-
createdAt: Date;
|
|
413
|
-
/** Updated Date */
|
|
414
|
-
updatedAt: Date;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
interface APITicketPanel {
|
|
418
|
-
message: {
|
|
419
|
-
embeds: APIEmbed[];
|
|
420
|
-
};
|
|
421
|
-
name: string;
|
|
422
|
-
guild_id: string;
|
|
423
|
-
_id: string;
|
|
424
|
-
components_type: "button" | "stringselect";
|
|
425
|
-
categories: APITicketCategory[];
|
|
426
|
-
/** Creation Date */
|
|
427
|
-
createdAt: Date;
|
|
428
|
-
/** Updated Date */
|
|
429
|
-
updatedAt: Date;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
interface APITicketCategory {
|
|
433
|
-
/** Category's type */
|
|
434
|
-
type: string;
|
|
435
|
-
/** Category's emoji */
|
|
436
|
-
emoji: string;
|
|
437
|
-
/** Category's description */
|
|
438
|
-
description: string;
|
|
439
|
-
/** Category's alias */
|
|
440
|
-
alias: string;
|
|
441
|
-
name: string;
|
|
442
|
-
role_ids: string[];
|
|
443
|
-
_id: string;
|
|
444
|
-
}
|
|
445
|
-
interface LogMessage {
|
|
446
|
-
/** The message's content */
|
|
447
|
-
content: string | Buffer<any>;
|
|
448
|
-
/** The message's sender */
|
|
449
|
-
userId: string;
|
|
450
|
-
/** The message's type */
|
|
451
|
-
type: string;
|
|
452
|
-
/** Creation Date */
|
|
453
|
-
createdAt: Date;
|
|
454
|
-
/** Updated Date */
|
|
455
|
-
updatedAt: Date;
|
|
456
|
-
}
|
|
457
|
-
/** Base match modes */
|
|
458
|
-
type BaseMatchModes = "1v1" | "2v2" | "3v3" | "4v4" | "5v5" | "6v6";
|
|
459
|
-
/** Base match status */
|
|
460
|
-
type BaseMatchStatus = "on" | "created" | "off" | "shutted";
|
|
461
|
-
/** The logs of the structure */
|
|
462
|
-
interface Logs {
|
|
463
|
-
/** The messages of the structure */
|
|
464
|
-
messages: LogMessage[];
|
|
465
|
-
}
|
|
466
|
-
/** Original Channel */
|
|
467
|
-
type OriginalChannel = {
|
|
468
|
-
/** Channel id */
|
|
469
|
-
channelId: string;
|
|
470
|
-
/** Match id */
|
|
471
|
-
matchId: string;
|
|
472
|
-
};
|
|
473
|
-
/** Original Channels */
|
|
474
|
-
type OriginalChannels = OriginalChannel[];
|
|
475
|
-
/** Accessories */
|
|
476
|
-
type Accessory = {
|
|
477
|
-
type: UserAccessoryType;
|
|
478
|
-
units: number;
|
|
479
|
-
time: number;
|
|
480
|
-
active: {
|
|
481
|
-
units: number;
|
|
482
|
-
time: number;
|
|
483
|
-
};
|
|
484
|
-
};
|
|
485
|
-
declare enum UserAccessoryType {
|
|
486
|
-
PointsProtection = "points_protection",
|
|
487
|
-
LossesProtection = "losses_protection",
|
|
488
|
-
DoublePoints = "double_points"
|
|
489
|
-
}
|
|
490
|
-
/** Daily information */
|
|
491
|
-
type Daily = {
|
|
492
|
-
/** Wins */
|
|
493
|
-
wins: number;
|
|
494
|
-
/** Coins */
|
|
495
|
-
coins: number;
|
|
496
|
-
/** Points */
|
|
497
|
-
points: number;
|
|
498
|
-
/** Credit */
|
|
499
|
-
credit: number;
|
|
500
|
-
/** Losses */
|
|
501
|
-
losses: number;
|
|
502
|
-
/** Mvps */
|
|
503
|
-
mvps: number;
|
|
504
|
-
bets: number;
|
|
505
|
-
/** Date of the daily */
|
|
506
|
-
date: Date;
|
|
507
|
-
};
|
|
508
|
-
interface Banner {
|
|
509
|
-
/** Equipped banner */
|
|
510
|
-
equipped: number;
|
|
511
|
-
/** Bought banners */
|
|
512
|
-
allowed: number[];
|
|
513
|
-
}
|
|
514
|
-
interface ProfileCard {
|
|
515
|
-
/** Profile's description */
|
|
516
|
-
description: string;
|
|
517
|
-
/** Profile's banner */
|
|
518
|
-
banner: Banner;
|
|
519
|
-
}
|
|
520
|
-
interface Confirm {
|
|
521
|
-
/** Confirm's type */
|
|
522
|
-
type: string;
|
|
523
|
-
/** Confirm's id */
|
|
524
|
-
ids: string[];
|
|
525
|
-
/** Confirm's counts */
|
|
526
|
-
count: number;
|
|
527
|
-
}
|
|
528
|
-
type Optional<T> = {
|
|
529
|
-
[K in keyof T]?: T[K];
|
|
530
|
-
};
|
|
531
|
-
declare enum MATCHTYPES {
|
|
532
|
-
OneVOne = "1v1",
|
|
533
|
-
TwoVTwo = "2v2",
|
|
534
|
-
ThreeVThree = "3v3",
|
|
535
|
-
FourVFour = "4v4",
|
|
536
|
-
FiveVFive = "5v5",
|
|
537
|
-
SixVSix = "6v6"
|
|
538
|
-
}
|
|
539
|
-
declare enum MATCHSTATUS {
|
|
540
|
-
ON = "on",
|
|
541
|
-
OFF = "off",
|
|
542
|
-
CREATED = "created",
|
|
543
|
-
SHUTTED = "shutted"
|
|
544
|
-
}
|
|
545
|
-
declare enum BETSTATUS {
|
|
546
|
-
ON = "on",
|
|
547
|
-
OFF = "off",
|
|
548
|
-
CREATED = "created",
|
|
549
|
-
SHUTTED = "shutted",
|
|
550
|
-
WAITING = "waiting"
|
|
551
|
-
}
|
|
552
|
-
declare enum STATES {
|
|
553
|
-
ON = "on",
|
|
554
|
-
OFF = "off",
|
|
555
|
-
CREATED = "created",
|
|
556
|
-
SHUTTED = "shutted",
|
|
557
|
-
WAITING = "waiting"
|
|
558
|
-
}
|
|
559
|
-
interface StatusResponse {
|
|
560
|
-
status: "ok" | "error";
|
|
561
|
-
services: {
|
|
562
|
-
fastify: boolean;
|
|
563
|
-
mongo: {
|
|
564
|
-
ok: boolean;
|
|
565
|
-
latency: number;
|
|
566
|
-
};
|
|
567
|
-
redis: {
|
|
568
|
-
ok: boolean;
|
|
569
|
-
latency: number;
|
|
570
|
-
};
|
|
571
|
-
};
|
|
572
|
-
timestamp: string;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
310
|
type FetchOptions$9 = {
|
|
576
311
|
userId?: string;
|
|
577
312
|
cache?: boolean;
|
|
@@ -809,6 +544,56 @@ declare class GuildMatch {
|
|
|
809
544
|
toJSON(): Optional<APIGuildMatch>;
|
|
810
545
|
}
|
|
811
546
|
|
|
547
|
+
interface Profile {
|
|
548
|
+
bannerUrl?: string;
|
|
549
|
+
avatarUrl?: string;
|
|
550
|
+
bio?: string;
|
|
551
|
+
name?: string;
|
|
552
|
+
extra?: string;
|
|
553
|
+
textColor?: string;
|
|
554
|
+
primaryColor?: string;
|
|
555
|
+
secondaryColor?: string;
|
|
556
|
+
tertiaryColor?: string;
|
|
557
|
+
booster?: {
|
|
558
|
+
status?: "on" | "off";
|
|
559
|
+
expires?: number;
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
interface APIGuildUser {
|
|
563
|
+
/** User's id */
|
|
564
|
+
id: string;
|
|
565
|
+
guild_id: string;
|
|
566
|
+
/** User's daily */
|
|
567
|
+
daily: Omit<Daily, "credit">;
|
|
568
|
+
profile: Profile;
|
|
569
|
+
/** User's points */
|
|
570
|
+
points: number;
|
|
571
|
+
creations: number;
|
|
572
|
+
/** User's wins */
|
|
573
|
+
wins: number;
|
|
574
|
+
consecutive_wins: number;
|
|
575
|
+
adverts: APIAdvert[];
|
|
576
|
+
/** User's mvps */
|
|
577
|
+
mvps: number;
|
|
578
|
+
coins: number;
|
|
579
|
+
/** User's losses */
|
|
580
|
+
losses: number;
|
|
581
|
+
/** User's games */
|
|
582
|
+
games: number;
|
|
583
|
+
/** If user is blacklisted */
|
|
584
|
+
blacklist: boolean;
|
|
585
|
+
/** User's accessories such as double point */
|
|
586
|
+
accessories: Accessory[];
|
|
587
|
+
/** User's original channels */
|
|
588
|
+
original_channels: OriginalChannels;
|
|
589
|
+
spins: number;
|
|
590
|
+
used_codes: string[];
|
|
591
|
+
/** Creation Date */
|
|
592
|
+
createdAt: Date;
|
|
593
|
+
/** Updated Date */
|
|
594
|
+
updatedAt: Date;
|
|
595
|
+
}
|
|
596
|
+
|
|
812
597
|
type FetchOptions$8 = {
|
|
813
598
|
userId?: string;
|
|
814
599
|
cache?: boolean;
|
|
@@ -862,6 +647,7 @@ declare class GuildUser implements APIGuildUser {
|
|
|
862
647
|
readonly manager: GuildUserManager;
|
|
863
648
|
/** The rest client */
|
|
864
649
|
readonly rest: REST;
|
|
650
|
+
readonly guild: Guild;
|
|
865
651
|
/**
|
|
866
652
|
* Bet user
|
|
867
653
|
* @param data The user's data
|
|
@@ -956,7 +742,7 @@ interface RestEvents {
|
|
|
956
742
|
guildDelete: [Guild];
|
|
957
743
|
guildsDelete: [Collection<string, Guild>];
|
|
958
744
|
userDelete: [GuildUser];
|
|
959
|
-
userUpdate: [GuildUser];
|
|
745
|
+
userUpdate: [GuildUser, Guild];
|
|
960
746
|
usersDelete: [Collection<string, GuildUser>];
|
|
961
747
|
betuserDelete: [GuildBetUser];
|
|
962
748
|
betuserUpdate: [GuildBetUser];
|
|
@@ -971,13 +757,7 @@ declare class AutomaticMessage {
|
|
|
971
757
|
name: string;
|
|
972
758
|
admin_id: string;
|
|
973
759
|
channel_ids: string[];
|
|
974
|
-
message:
|
|
975
|
-
content: string;
|
|
976
|
-
embeds: APIEmbed[];
|
|
977
|
-
components: any[];
|
|
978
|
-
attachments: any[];
|
|
979
|
-
flags: number;
|
|
980
|
-
};
|
|
760
|
+
message: AutomaticMessagePayload;
|
|
981
761
|
guild_id: string;
|
|
982
762
|
interval_ms: number;
|
|
983
763
|
createdAt: Date;
|
|
@@ -1395,6 +1175,226 @@ declare class Product implements APIProduct {
|
|
|
1395
1175
|
toJSON(): APIProduct;
|
|
1396
1176
|
}
|
|
1397
1177
|
|
|
1178
|
+
type MatchSelection = {
|
|
1179
|
+
type: "creator" | "mvps" | "winners" | "rematch";
|
|
1180
|
+
selected: string[];
|
|
1181
|
+
confirmed: string[];
|
|
1182
|
+
};
|
|
1183
|
+
interface APIGuildMatch {
|
|
1184
|
+
selections: MatchSelection[];
|
|
1185
|
+
/** Match's type */
|
|
1186
|
+
type: BaseMatchModes;
|
|
1187
|
+
guild_id: string;
|
|
1188
|
+
/** Match's status */
|
|
1189
|
+
status: BaseMatchStatus;
|
|
1190
|
+
/** Match's challenge */
|
|
1191
|
+
challenge: boolean;
|
|
1192
|
+
admin_id: string;
|
|
1193
|
+
/** Match's players */
|
|
1194
|
+
players: APIPlayer[];
|
|
1195
|
+
code: string;
|
|
1196
|
+
/** Match's winners */
|
|
1197
|
+
winners: APIPlayer[];
|
|
1198
|
+
betting: number;
|
|
1199
|
+
/** Match's losers */
|
|
1200
|
+
losers: APIPlayer[];
|
|
1201
|
+
/** Match;s messages */
|
|
1202
|
+
messages: APIMessage[];
|
|
1203
|
+
/** Matches channels */
|
|
1204
|
+
channels: APIBaseChannel[];
|
|
1205
|
+
/** Match's maximum size */
|
|
1206
|
+
maximumSize: number;
|
|
1207
|
+
/** Match's kicked out */
|
|
1208
|
+
kickedOut: APIPlayer[];
|
|
1209
|
+
/** Match's confirmed */
|
|
1210
|
+
confirmed: Confirm[];
|
|
1211
|
+
/** Match's leaders */
|
|
1212
|
+
leaders: APIPlayer[];
|
|
1213
|
+
teams: APIPlayer[][];
|
|
1214
|
+
creatorId: string;
|
|
1215
|
+
/** Match's room creator id */
|
|
1216
|
+
roomCreatorId: string;
|
|
1217
|
+
bet: APIGuildBet | GuildBet;
|
|
1218
|
+
/** Creation Date */
|
|
1219
|
+
createdAt: Date;
|
|
1220
|
+
/** Updated Date */
|
|
1221
|
+
updatedAt: Date;
|
|
1222
|
+
/** Match's id */
|
|
1223
|
+
_id: string;
|
|
1224
|
+
mvps: string[];
|
|
1225
|
+
url: string;
|
|
1226
|
+
logs: {
|
|
1227
|
+
shutted: string;
|
|
1228
|
+
closed: string;
|
|
1229
|
+
managed: string;
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
declare enum GuildMatchChannelsType {
|
|
1233
|
+
CreationChannel = "creation_channel",
|
|
1234
|
+
TextChannel = "text_channel"
|
|
1235
|
+
}
|
|
1236
|
+
declare enum GuildMatchMessagesType {
|
|
1237
|
+
CreationMessage = "creation_message"
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
interface APITicketPanel {
|
|
1241
|
+
message: {
|
|
1242
|
+
embeds: APIEmbed[];
|
|
1243
|
+
};
|
|
1244
|
+
name: string;
|
|
1245
|
+
guild_id: string;
|
|
1246
|
+
_id: string;
|
|
1247
|
+
components_type: "button" | "stringselect";
|
|
1248
|
+
categories: APITicketCategory[];
|
|
1249
|
+
/** Creation Date */
|
|
1250
|
+
createdAt: Date;
|
|
1251
|
+
/** Updated Date */
|
|
1252
|
+
updatedAt: Date;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
interface APITicketCategory {
|
|
1256
|
+
/** Category's type */
|
|
1257
|
+
type: string;
|
|
1258
|
+
/** Category's emoji */
|
|
1259
|
+
emoji: string;
|
|
1260
|
+
/** Category's description */
|
|
1261
|
+
description: string;
|
|
1262
|
+
/** Category's alias */
|
|
1263
|
+
alias: string;
|
|
1264
|
+
name: string;
|
|
1265
|
+
role_ids: string[];
|
|
1266
|
+
_id: string;
|
|
1267
|
+
}
|
|
1268
|
+
interface LogMessage {
|
|
1269
|
+
/** The message's content */
|
|
1270
|
+
content: string | Buffer<any>;
|
|
1271
|
+
/** The message's sender */
|
|
1272
|
+
userId: string;
|
|
1273
|
+
/** The message's type */
|
|
1274
|
+
type: string;
|
|
1275
|
+
/** Creation Date */
|
|
1276
|
+
createdAt: Date;
|
|
1277
|
+
/** Updated Date */
|
|
1278
|
+
updatedAt: Date;
|
|
1279
|
+
}
|
|
1280
|
+
/** Base match modes */
|
|
1281
|
+
type BaseMatchModes = "1v1" | "2v2" | "3v3" | "4v4" | "5v5" | "6v6";
|
|
1282
|
+
/** Base match status */
|
|
1283
|
+
type BaseMatchStatus = "on" | "created" | "off" | "shutted";
|
|
1284
|
+
/** The logs of the structure */
|
|
1285
|
+
interface Logs {
|
|
1286
|
+
/** The messages of the structure */
|
|
1287
|
+
messages: LogMessage[];
|
|
1288
|
+
}
|
|
1289
|
+
/** Original Channel */
|
|
1290
|
+
type OriginalChannel = {
|
|
1291
|
+
/** Channel id */
|
|
1292
|
+
channelId: string;
|
|
1293
|
+
/** Match id */
|
|
1294
|
+
matchId: string;
|
|
1295
|
+
};
|
|
1296
|
+
/** Original Channels */
|
|
1297
|
+
type OriginalChannels = OriginalChannel[];
|
|
1298
|
+
/** Accessories */
|
|
1299
|
+
type Accessory = {
|
|
1300
|
+
type: UserAccessoryType;
|
|
1301
|
+
units: number;
|
|
1302
|
+
time: number;
|
|
1303
|
+
active: {
|
|
1304
|
+
units: number;
|
|
1305
|
+
time: number;
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1308
|
+
declare enum UserAccessoryType {
|
|
1309
|
+
PointsProtection = "points_protection",
|
|
1310
|
+
LossesProtection = "losses_protection",
|
|
1311
|
+
DoublePoints = "double_points"
|
|
1312
|
+
}
|
|
1313
|
+
/** Daily information */
|
|
1314
|
+
type Daily = {
|
|
1315
|
+
/** Wins */
|
|
1316
|
+
wins: number;
|
|
1317
|
+
/** Coins */
|
|
1318
|
+
coins: number;
|
|
1319
|
+
/** Points */
|
|
1320
|
+
points: number;
|
|
1321
|
+
/** Credit */
|
|
1322
|
+
credit: number;
|
|
1323
|
+
/** Losses */
|
|
1324
|
+
losses: number;
|
|
1325
|
+
/** Mvps */
|
|
1326
|
+
mvps: number;
|
|
1327
|
+
bets: number;
|
|
1328
|
+
/** Date of the daily */
|
|
1329
|
+
date: Date;
|
|
1330
|
+
};
|
|
1331
|
+
interface Banner {
|
|
1332
|
+
/** Equipped banner */
|
|
1333
|
+
equipped: number;
|
|
1334
|
+
/** Bought banners */
|
|
1335
|
+
allowed: number[];
|
|
1336
|
+
}
|
|
1337
|
+
interface ProfileCard {
|
|
1338
|
+
/** Profile's description */
|
|
1339
|
+
description: string;
|
|
1340
|
+
/** Profile's banner */
|
|
1341
|
+
banner: Banner;
|
|
1342
|
+
}
|
|
1343
|
+
interface Confirm {
|
|
1344
|
+
/** Confirm's type */
|
|
1345
|
+
type: string;
|
|
1346
|
+
/** Confirm's id */
|
|
1347
|
+
ids: string[];
|
|
1348
|
+
/** Confirm's counts */
|
|
1349
|
+
count: number;
|
|
1350
|
+
}
|
|
1351
|
+
type Optional<T> = {
|
|
1352
|
+
[K in keyof T]?: T[K];
|
|
1353
|
+
};
|
|
1354
|
+
declare enum MATCHTYPES {
|
|
1355
|
+
OneVOne = "1v1",
|
|
1356
|
+
TwoVTwo = "2v2",
|
|
1357
|
+
ThreeVThree = "3v3",
|
|
1358
|
+
FourVFour = "4v4",
|
|
1359
|
+
FiveVFive = "5v5",
|
|
1360
|
+
SixVSix = "6v6"
|
|
1361
|
+
}
|
|
1362
|
+
declare enum MATCHSTATUS {
|
|
1363
|
+
ON = "on",
|
|
1364
|
+
OFF = "off",
|
|
1365
|
+
CREATED = "created",
|
|
1366
|
+
SHUTTED = "shutted"
|
|
1367
|
+
}
|
|
1368
|
+
declare enum BETSTATUS {
|
|
1369
|
+
ON = "on",
|
|
1370
|
+
OFF = "off",
|
|
1371
|
+
CREATED = "created",
|
|
1372
|
+
SHUTTED = "shutted",
|
|
1373
|
+
WAITING = "waiting"
|
|
1374
|
+
}
|
|
1375
|
+
declare enum STATES {
|
|
1376
|
+
ON = "on",
|
|
1377
|
+
OFF = "off",
|
|
1378
|
+
CREATED = "created",
|
|
1379
|
+
SHUTTED = "shutted",
|
|
1380
|
+
WAITING = "waiting"
|
|
1381
|
+
}
|
|
1382
|
+
interface StatusResponse {
|
|
1383
|
+
status: "ok" | "error";
|
|
1384
|
+
services: {
|
|
1385
|
+
fastify: boolean;
|
|
1386
|
+
mongo: {
|
|
1387
|
+
ok: boolean;
|
|
1388
|
+
latency: number;
|
|
1389
|
+
};
|
|
1390
|
+
redis: {
|
|
1391
|
+
ok: boolean;
|
|
1392
|
+
latency: number;
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
timestamp: string;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
1398
|
declare class Guild {
|
|
1399
1399
|
#private;
|
|
1400
1400
|
/** The data of this guild */
|
|
@@ -1453,6 +1453,7 @@ declare class Guild {
|
|
|
1453
1453
|
codes: Collection<string, APICode>;
|
|
1454
1454
|
coin_symbol: string;
|
|
1455
1455
|
buffs: Collection<string, APIBuff>;
|
|
1456
|
+
automatic_roles: Collection<string, APIAutomaticRole>;
|
|
1456
1457
|
/**
|
|
1457
1458
|
* The guild structure
|
|
1458
1459
|
* @param data The guild's data
|
|
@@ -1499,6 +1500,15 @@ declare class Guild {
|
|
|
1499
1500
|
admin_id?: string;
|
|
1500
1501
|
}>;
|
|
1501
1502
|
deleteBuff(id: string): Promise<this>;
|
|
1503
|
+
createAutomaticRole(data: Optional<APIAutomaticRole>): Promise<{
|
|
1504
|
+
_id: string;
|
|
1505
|
+
createdAt: Date;
|
|
1506
|
+
updatedAt: Date;
|
|
1507
|
+
type?: AutomaticRolesTypes;
|
|
1508
|
+
role_id?: string;
|
|
1509
|
+
rule?: number;
|
|
1510
|
+
}>;
|
|
1511
|
+
deleteDeleteAutomaticRole(id: string): Promise<this>;
|
|
1502
1512
|
toJSON(): APIGuild;
|
|
1503
1513
|
}
|
|
1504
1514
|
type AvailableScores = "win" | "loss" | "mvp" | "creator" | "coin";
|
|
@@ -1718,4 +1728,4 @@ declare class GuildTicketManager {
|
|
|
1718
1728
|
set(data: APIGuildTicket | GuildTicket | APIGuildTicket[]): GuildTicket | Collection<string, GuildTicket>;
|
|
1719
1729
|
}
|
|
1720
1730
|
|
|
1721
|
-
export {
|
|
1731
|
+
export { GuildTimerTypes as $, type APIAutomaticMessage as A, BETSTATUS as B, type Confirm as C, type Daily as D, GuildBetUser as E, type FetchOptions$2 as F, Guild as G, GuildBetUserManager as H, GuildChannelsType as I, type GuildLogsWebhookUrls as J, GuildManager as K, GuildMatch as L, GuildMatchChannelsType as M, GuildMatchManager as N, GuildMatchMessagesType as O, GuildMediator as P, GuildMediatorManager as Q, REST as R, type GuildModes as S, GuildPermissionManager as T, type GuildPrices as U, type GuildScores as V, type GuildStatus as W, GuildStatusEnum as X, GuildTicket as Y, type GuildTicketConfiguration as Z, GuildTicketManager as _, type APIGuild as a, GuildUser as a0, GuildUserManager as a1, LogEntry as a2, LogManager as a3, type LogMessage as a4, type Logs as a5, MATCHSTATUS as a6, MATCHTYPES as a7, type MatchSelection as a8, MessagesManager as a9, ProductManager as aA, MinesGame as aa, MinesGameManager as ab, type Optional as ac, type OriginalChannel as ad, type OriginalChannels as ae, PlayerManager as af, type PlayerOption as ag, Product as ah, type Profile as ai, type ProfileCard as aj, type RequestOptions as ak, type RestEvents as al, type RoulettePrize as am, type RouletteSettings as an, STATES as ao, Shop as ap, ShopManager as aq, type StatusResponse as ar, type Structure as as, TicketPanel as at, TicketPanelManager as au, Tournament as av, TournamentManager as aw, UserAccessoryType as ax, VipMember as ay, VipMemberManager as az, type APIGuildBet as b, type APIGuildBetUser as c, type APIGuildGroupedChannel as d, type APIGuildMatch as e, type APIGuildUser as f, type APITicketCategory as g, type APITicketPanel as h, type Accessory as i, AutomaticMessage as j, AutomaticMessageManager as k, type AutomaticMessagePayload as l, AutomaticMessagesTypes as m, type Banner as n, BaseManager as o, type BaseMatchModes as p, type BaseMatchStatus as q, BetChannelTypes as r, type BetQueue as s, BufferManager as t, type BufferMatch as u, type BufferTicket as v, type DailyCategories as w, type FetchReturn as x, GuildBet as y, GuildBetManager as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
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 AutomaticMessagesTypes, B as BETSTATUS,
|
|
1
|
+
export { A as APIAutomaticMessage, a as APIGuild, b as APIGuildBet, c as APIGuildBetUser, d as APIGuildGroupedChannel, e as APIGuildMatch, f as APIGuildUser, g as APITicketCategory, h as APITicketPanel, i as Accessory, j as AutomaticMessage, k as AutomaticMessageManager, l as AutomaticMessagePayload, m as AutomaticMessagesTypes, B as BETSTATUS, n as Banner, o as BaseManager, p as BaseMatchModes, q as BaseMatchStatus, r as BetChannelTypes, s as BetQueue, t as BufferManager, u as BufferMatch, v as BufferTicket, C as Confirm, D as Daily, w as DailyCategories, F as FetchOptions, x as FetchReturn, G as Guild, y as GuildBet, z as GuildBetManager, E as GuildBetUser, H as GuildBetUserManager, I as GuildChannelsType, J as GuildLogsWebhookUrls, K as GuildManager, L as GuildMatch, M as GuildMatchChannelsType, N as GuildMatchManager, O as GuildMatchMessagesType, P as GuildMediator, Q as GuildMediatorManager, S as GuildModes, T as GuildPermissionManager, U as GuildPrices, V as GuildScores, W as GuildStatus, X as GuildStatusEnum, Y as GuildTicket, Z as GuildTicketConfiguration, _ as GuildTicketManager, $ as GuildTimerTypes, a0 as GuildUser, a1 as GuildUserManager, a2 as LogEntry, a3 as LogManager, a4 as LogMessage, a5 as Logs, a6 as MATCHSTATUS, a7 as MATCHTYPES, a8 as MatchSelection, a9 as MessagesManager, aa as MinesGame, ab as MinesGameManager, ac as Optional, ad as OriginalChannel, ae as OriginalChannels, af as PlayerManager, ag as PlayerOption, ah as Product, ai as Profile, aj as ProfileCard, R as REST, ak as RequestOptions, al as RestEvents, am as RoulettePrize, an as RouletteSettings, ao as STATES, ap as Shop, aq as ShopManager, ar as StatusResponse, as as Structure, at as TicketPanel, au as TicketPanelManager, av as Tournament, aw as TournamentManager, ax as UserAccessoryType, ay as VipMember, az as VipMemberManager } from './index-Ba4fOyKx.js';
|
|
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';
|
|
5
5
|
export { APIAdvert } from './types/api/APIAdvert.js';
|
|
6
|
+
export { APIAutomaticRole, AutomaticRolesTypes } from './types/api/APIAutomaticRole.js';
|
|
6
7
|
export { APIBaseChannel } from './types/api/APIBaseChannel.js';
|
|
7
8
|
export { APIBetChannel } from './types/api/APIBetChannel.js';
|
|
8
9
|
export { APIBuff } from './types/api/APIBuff.js';
|