@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.
Files changed (80) hide show
  1. package/dist/{index-BwmNIP2p.d.ts → index-26CPLcdp.d.ts} +303 -275
  2. package/dist/index.d.ts +2 -1
  3. package/dist/managers/automaticmessage/AutomaticMessageManager.d.ts +2 -1
  4. package/dist/managers/base.d.ts +2 -1
  5. package/dist/managers/bet/GuildBetManager.d.ts +2 -1
  6. package/dist/managers/bet/GuildBetManager.js +4 -0
  7. package/dist/managers/betuser/GuildBetUserManager.d.ts +2 -1
  8. package/dist/managers/betuser/GuildBetUserManager.js +4 -0
  9. package/dist/managers/buffer/BufferManager.d.ts +2 -1
  10. package/dist/managers/guild/GuildManager.d.ts +2 -1
  11. package/dist/managers/guild/GuildManager.js +4 -0
  12. package/dist/managers/index.d.ts +2 -1
  13. package/dist/managers/logs/LogManager.d.ts +2 -1
  14. package/dist/managers/logs/LogManager.js +4 -0
  15. package/dist/managers/match/GuildMatchManager.d.ts +2 -1
  16. package/dist/managers/match/GuildMatchManager.js +4 -0
  17. package/dist/managers/mediator/GuildMediatorManager.d.ts +2 -1
  18. package/dist/managers/mediator/GuildMediatorManager.js +4 -0
  19. package/dist/managers/message/MessagesManager.d.ts +2 -1
  20. package/dist/managers/message/MessagesManager.js +21 -6
  21. package/dist/managers/minesgame/MinesGameManager.d.ts +2 -1
  22. package/dist/managers/minesgame/MinesGameManager.js +4 -0
  23. package/dist/managers/permission/GuildPermissionManager.d.ts +2 -1
  24. package/dist/managers/player/PlayerManager.d.ts +2 -1
  25. package/dist/managers/product/ProductManager.d.ts +2 -1
  26. package/dist/managers/product/ProductManager.js +2 -1
  27. package/dist/managers/shop/ShopManager.d.ts +2 -1
  28. package/dist/managers/shop/ShopManager.js +2 -1
  29. package/dist/managers/ticket/TicketManager.d.ts +2 -1
  30. package/dist/managers/ticket/TicketManager.js +4 -0
  31. package/dist/managers/ticketpanel/TicketPanelManager.d.ts +2 -1
  32. package/dist/managers/ticketpanel/TicketPanelManager.js +2 -1
  33. package/dist/managers/tournament/TournamentManager.d.ts +2 -1
  34. package/dist/managers/tournament/TournamentManager.js +4 -0
  35. package/dist/managers/user/GuildUserManager.d.ts +2 -1
  36. package/dist/managers/user/GuildUserManager.js +4 -1
  37. package/dist/managers/vipmember/VipMemberManager.d.ts +2 -1
  38. package/dist/managers/vipmember/VipMemberManager.js +4 -0
  39. package/dist/rest/REST.d.ts +2 -1
  40. package/dist/rest/index.d.ts +2 -1
  41. package/dist/structures/automaticmessage/AutomaticMessage.d.ts +2 -1
  42. package/dist/structures/bet/GuildBet.d.ts +2 -1
  43. package/dist/structures/bet/GuildBet.js +19 -11
  44. package/dist/structures/betuser/GuildBetUser.d.ts +2 -1
  45. package/dist/structures/betuser/GuildBetUser.js +17 -9
  46. package/dist/structures/guild/Guild.d.ts +2 -1
  47. package/dist/structures/guild/Guild.js +49 -0
  48. package/dist/structures/index.d.ts +2 -1
  49. package/dist/structures/logentry/LogEntry.d.ts +2 -1
  50. package/dist/structures/match/GuildMatch.d.ts +2 -1
  51. package/dist/structures/match/GuildMatch.js +30 -10
  52. package/dist/structures/mediator/GuildMediator.d.ts +2 -1
  53. package/dist/structures/mediator/GuildMediator.js +11 -9
  54. package/dist/structures/minesgame/MinesGame.d.ts +2 -1
  55. package/dist/structures/minesgame/MinesGame.js +15 -0
  56. package/dist/structures/product/Product.d.ts +2 -1
  57. package/dist/structures/shop/Shop.d.ts +2 -1
  58. package/dist/structures/ticket/Ticket.d.ts +2 -1
  59. package/dist/structures/ticket/Ticket.js +16 -0
  60. package/dist/structures/ticketpanel/TicketPanel.d.ts +2 -1
  61. package/dist/structures/tournament/Tournament.d.ts +2 -1
  62. package/dist/structures/user/GuildUser.d.ts +2 -1
  63. package/dist/structures/user/GuildUser.js +5 -5
  64. package/dist/structures/vipmember/VipMember.d.ts +2 -1
  65. package/dist/structures/vipmember/VipMember.js +12 -7
  66. package/dist/types/RestTypes.d.ts +2 -1
  67. package/dist/types/api/APIAutomaticMessage.d.ts +2 -1
  68. package/dist/types/api/APIAutomaticRole.d.ts +18 -0
  69. package/dist/types/api/APIAutomaticRole.js +36 -0
  70. package/dist/types/api/APIGuild.d.ts +2 -1
  71. package/dist/types/api/APIGuildBet.d.ts +2 -1
  72. package/dist/types/api/APIGuildBetUser.d.ts +2 -1
  73. package/dist/types/api/APIGuildGroupedChannel.d.ts +2 -1
  74. package/dist/types/api/APIGuildMatch.d.ts +2 -1
  75. package/dist/types/api/APIGuildUser.d.ts +2 -1
  76. package/dist/types/api/APITicketPanel.d.ts +2 -1
  77. package/dist/types/api/index.d.ts +2 -1
  78. package/dist/types/api/index.js +2 -0
  79. package/dist/types/index.d.ts +2 -1
  80. package/package.json +1 -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';
@@ -171,6 +172,7 @@ interface APIGuild {
171
172
  bet_count: number;
172
173
  timers: APITimer[];
173
174
  buffs: APIBuff[];
175
+ automatic_roles: APIAutomaticRole[];
174
176
  }
175
177
  interface GuildLogsWebhookUrls {
176
178
  queues: {
@@ -305,276 +307,6 @@ interface APIGuildBetUser {
305
307
  updatedAt: Date;
306
308
  }
307
309
 
308
- type MatchSelection = {
309
- type: "creator" | "mvps" | "winners" | "rematch";
310
- selected: string[];
311
- confirmed: string[];
312
- };
313
- interface APIGuildMatch {
314
- selections: MatchSelection[];
315
- /** Match's type */
316
- type: BaseMatchModes;
317
- guild_id: string;
318
- /** Match's status */
319
- status: BaseMatchStatus;
320
- /** Match's challenge */
321
- challenge: boolean;
322
- admin_id: string;
323
- /** Match's players */
324
- players: APIPlayer[];
325
- code: string;
326
- /** Match's winners */
327
- winners: APIPlayer[];
328
- betting: number;
329
- /** Match's losers */
330
- losers: APIPlayer[];
331
- /** Match;s messages */
332
- messages: APIMessage[];
333
- /** Matches channels */
334
- channels: APIBaseChannel[];
335
- /** Match's maximum size */
336
- maximumSize: number;
337
- /** Match's kicked out */
338
- kickedOut: APIPlayer[];
339
- /** Match's confirmed */
340
- confirmed: Confirm[];
341
- /** Match's leaders */
342
- leaders: APIPlayer[];
343
- teams: APIPlayer[][];
344
- creatorId: string;
345
- /** Match's room creator id */
346
- roomCreatorId: string;
347
- bet: APIGuildBet | GuildBet;
348
- /** Creation Date */
349
- createdAt: Date;
350
- /** Updated Date */
351
- updatedAt: Date;
352
- /** Match's id */
353
- _id: string;
354
- mvps: string[];
355
- url: string;
356
- logs: {
357
- shutted: string;
358
- closed: string;
359
- managed: string;
360
- };
361
- }
362
- declare enum GuildMatchChannelsType {
363
- CreationChannel = "creation_channel",
364
- TextChannel = "text_channel"
365
- }
366
- declare enum GuildMatchMessagesType {
367
- CreationMessage = "creation_message"
368
- }
369
-
370
- interface Profile {
371
- bannerUrl?: string;
372
- avatarUrl?: string;
373
- bio?: string;
374
- name?: string;
375
- extra?: string;
376
- textColor?: string;
377
- primaryColor?: string;
378
- secondaryColor?: string;
379
- tertiaryColor?: string;
380
- booster?: {
381
- status?: "on" | "off";
382
- expires?: number;
383
- };
384
- }
385
- interface APIGuildUser {
386
- /** User's id */
387
- id: string;
388
- guild_id: string;
389
- /** User's daily */
390
- daily: Omit<Daily, "credit">;
391
- profile: Profile;
392
- /** User's points */
393
- points: number;
394
- creations: number;
395
- /** User's wins */
396
- wins: number;
397
- consecutive_wins: number;
398
- adverts: APIAdvert[];
399
- /** User's mvps */
400
- mvps: number;
401
- coins: number;
402
- /** User's losses */
403
- losses: number;
404
- /** User's games */
405
- games: number;
406
- /** If user is blacklisted */
407
- blacklist: boolean;
408
- /** User's accessories such as double point */
409
- accessories: Accessory[];
410
- /** User's original channels */
411
- original_channels: OriginalChannels;
412
- spins: number;
413
- used_codes: string[];
414
- /** Creation Date */
415
- createdAt: Date;
416
- /** Updated Date */
417
- updatedAt: Date;
418
- }
419
-
420
- interface APITicketPanel {
421
- message: {
422
- embeds: APIEmbed[];
423
- };
424
- name: string;
425
- guild_id: string;
426
- _id: string;
427
- components_type: "button" | "stringselect";
428
- categories: APITicketCategory[];
429
- /** Creation Date */
430
- createdAt: Date;
431
- /** Updated Date */
432
- updatedAt: Date;
433
- }
434
-
435
- interface APITicketCategory {
436
- /** Category's type */
437
- type: string;
438
- /** Category's emoji */
439
- emoji: string;
440
- /** Category's description */
441
- description: string;
442
- /** Category's alias */
443
- alias: string;
444
- name: string;
445
- role_ids: string[];
446
- _id: string;
447
- }
448
- interface LogMessage {
449
- /** The message's content */
450
- content: string | Buffer<any>;
451
- /** The message's sender */
452
- userId: string;
453
- /** The message's type */
454
- type: string;
455
- /** Creation Date */
456
- createdAt: Date;
457
- /** Updated Date */
458
- updatedAt: Date;
459
- }
460
- /** Base match modes */
461
- type BaseMatchModes = "1v1" | "2v2" | "3v3" | "4v4" | "5v5" | "6v6";
462
- /** Base match status */
463
- type BaseMatchStatus = "on" | "created" | "off" | "shutted";
464
- /** The logs of the structure */
465
- interface Logs {
466
- /** The messages of the structure */
467
- messages: LogMessage[];
468
- }
469
- /** Original Channel */
470
- type OriginalChannel = {
471
- /** Channel id */
472
- channelId: string;
473
- /** Match id */
474
- matchId: string;
475
- };
476
- /** Original Channels */
477
- type OriginalChannels = OriginalChannel[];
478
- /** Accessories */
479
- type Accessory = {
480
- type: UserAccessoryType;
481
- units: number;
482
- time: number;
483
- active: {
484
- units: number;
485
- time: number;
486
- };
487
- };
488
- declare enum UserAccessoryType {
489
- PointsProtection = "points_protection",
490
- LossesProtection = "losses_protection",
491
- DoublePoints = "double_points"
492
- }
493
- /** Daily information */
494
- type Daily = {
495
- /** Wins */
496
- wins: number;
497
- /** Coins */
498
- coins: number;
499
- /** Points */
500
- points: number;
501
- /** Credit */
502
- credit: number;
503
- /** Losses */
504
- losses: number;
505
- /** Mvps */
506
- mvps: number;
507
- bets: number;
508
- /** Date of the daily */
509
- date: Date;
510
- };
511
- interface Banner {
512
- /** Equipped banner */
513
- equipped: number;
514
- /** Bought banners */
515
- allowed: number[];
516
- }
517
- interface ProfileCard {
518
- /** Profile's description */
519
- description: string;
520
- /** Profile's banner */
521
- banner: Banner;
522
- }
523
- interface Confirm {
524
- /** Confirm's type */
525
- type: string;
526
- /** Confirm's id */
527
- ids: string[];
528
- /** Confirm's counts */
529
- count: number;
530
- }
531
- type Optional<T> = {
532
- [K in keyof T]?: T[K];
533
- };
534
- declare enum MATCHTYPES {
535
- OneVOne = "1v1",
536
- TwoVTwo = "2v2",
537
- ThreeVThree = "3v3",
538
- FourVFour = "4v4",
539
- FiveVFive = "5v5",
540
- SixVSix = "6v6"
541
- }
542
- declare enum MATCHSTATUS {
543
- ON = "on",
544
- OFF = "off",
545
- CREATED = "created",
546
- SHUTTED = "shutted"
547
- }
548
- declare enum BETSTATUS {
549
- ON = "on",
550
- OFF = "off",
551
- CREATED = "created",
552
- SHUTTED = "shutted",
553
- WAITING = "waiting"
554
- }
555
- declare enum STATES {
556
- ON = "on",
557
- OFF = "off",
558
- CREATED = "created",
559
- SHUTTED = "shutted",
560
- WAITING = "waiting"
561
- }
562
- interface StatusResponse {
563
- status: "ok" | "error";
564
- services: {
565
- fastify: boolean;
566
- mongo: {
567
- ok: boolean;
568
- latency: number;
569
- };
570
- redis: {
571
- ok: boolean;
572
- latency: number;
573
- };
574
- };
575
- timestamp: string;
576
- }
577
-
578
310
  type FetchOptions$9 = {
579
311
  userId?: string;
580
312
  cache?: boolean;
@@ -587,6 +319,7 @@ declare class GuildBetUserManager extends BaseManager<GuildBetUser> {
587
319
  deleteAll(): Promise<void>;
588
320
  resetAll(): Promise<GuildBetUser | Collection<string, GuildBetUser>>;
589
321
  set(data: APIGuildBetUser | APIGuildBetUser[]): GuildBetUser | Collection<string, GuildBetUser>;
322
+ toJSON(): APIGuildBetUser[];
590
323
  }
591
324
 
592
325
  declare class GuildBetUser implements APIGuildBetUser {
@@ -809,7 +542,57 @@ declare class GuildMatch {
809
542
  kick(player: Optional<APIPlayer>): Promise<GuildMatch>;
810
543
  update(data: Optional<APIGuildMatch>): Promise<GuildMatch>;
811
544
  delete(): Promise<boolean>;
812
- toJSON(): Optional<APIGuildMatch>;
545
+ toJSON(): APIGuildMatch;
546
+ }
547
+
548
+ interface Profile {
549
+ bannerUrl?: string;
550
+ avatarUrl?: string;
551
+ bio?: string;
552
+ name?: string;
553
+ extra?: string;
554
+ textColor?: string;
555
+ primaryColor?: string;
556
+ secondaryColor?: string;
557
+ tertiaryColor?: string;
558
+ booster?: {
559
+ status?: "on" | "off";
560
+ expires?: number;
561
+ };
562
+ }
563
+ interface APIGuildUser {
564
+ /** User's id */
565
+ id: string;
566
+ guild_id: string;
567
+ /** User's daily */
568
+ daily: Omit<Daily, "credit">;
569
+ profile: Profile;
570
+ /** User's points */
571
+ points: number;
572
+ creations: number;
573
+ /** User's wins */
574
+ wins: number;
575
+ consecutive_wins: number;
576
+ adverts: APIAdvert[];
577
+ /** User's mvps */
578
+ mvps: number;
579
+ coins: number;
580
+ /** User's losses */
581
+ losses: number;
582
+ /** User's games */
583
+ games: number;
584
+ /** If user is blacklisted */
585
+ blacklist: boolean;
586
+ /** User's accessories such as double point */
587
+ accessories: Accessory[];
588
+ /** User's original channels */
589
+ original_channels: OriginalChannels;
590
+ spins: number;
591
+ used_codes: string[];
592
+ /** Creation Date */
593
+ createdAt: Date;
594
+ /** Updated Date */
595
+ updatedAt: Date;
813
596
  }
814
597
 
815
598
  type FetchOptions$8 = {
@@ -824,6 +607,7 @@ declare class GuildUserManager extends BaseManager<GuildUser> {
824
607
  deleteAll(): Promise<void>;
825
608
  resetAll(): Promise<Collection<string, GuildUser>>;
826
609
  set(data: APIGuildUser | APIGuildUser[]): GuildUser | Collection<string, GuildUser>;
610
+ toJSON(): APIGuildUser[];
827
611
  }
828
612
 
829
613
  declare class GuildUser implements APIGuildUser {
@@ -865,6 +649,7 @@ declare class GuildUser implements APIGuildUser {
865
649
  readonly manager: GuildUserManager;
866
650
  /** The rest client */
867
651
  readonly rest: REST;
652
+ readonly guild: Guild;
868
653
  /**
869
654
  * Bet user
870
655
  * @param data The user's data
@@ -959,7 +744,7 @@ interface RestEvents {
959
744
  guildDelete: [Guild];
960
745
  guildsDelete: [Collection<string, Guild>];
961
746
  userDelete: [GuildUser];
962
- userUpdate: [GuildUser];
747
+ userUpdate: [GuildUser, Guild];
963
748
  usersDelete: [Collection<string, GuildUser>];
964
749
  betuserDelete: [GuildBetUser];
965
750
  betuserUpdate: [GuildBetUser];
@@ -1050,6 +835,7 @@ declare class GuildMediatorManager extends BaseManager<GuildMediator> {
1050
835
  deleteAll(): Promise<void>;
1051
836
  resetAll(): Promise<Collection<string, GuildMediator>>;
1052
837
  set(data: APIGuildMediator | APIGuildMediator[]): GuildMediator | Collection<string, GuildMediator>;
838
+ toJSON(): APIGuildMediator[];
1053
839
  }
1054
840
 
1055
841
  declare class GuildMediator implements APIGuildMediator {
@@ -1095,7 +881,7 @@ declare class GuildMediator implements APIGuildMediator {
1095
881
  update(data: Optional<APIGuildMediator>): Promise<this>;
1096
882
  setPaymentlink(type: string, link: string): Promise<this>;
1097
883
  delete(): Promise<boolean>;
1098
- toJSON(): Optional<APIGuildMediator>;
884
+ toJSON(): APIGuildMediator;
1099
885
  }
1100
886
 
1101
887
  type FetchReturn<T> = T extends null ? Collection<string, TicketPanel> : TicketPanel;
@@ -1147,6 +933,7 @@ declare class TournamentManager extends BaseManager<Tournament> {
1147
933
  set(data: APITournament | APITournament[]): Collection<string, Tournament>;
1148
934
  _add(data: APITournament | APITournament[]): Tournament | Collection<string, Tournament>;
1149
935
  create(data: Optional<APITournament>): Promise<Tournament>;
936
+ toJSON(): APITournament[];
1150
937
  }
1151
938
 
1152
939
  declare class Tournament {
@@ -1210,6 +997,7 @@ declare class VipMemberManager extends BaseManager<VipMember> {
1210
997
  resetAll(): Promise<Collection<string, VipMember>>;
1211
998
  delete(id: string): Promise<Collection<string, VipMember>>;
1212
999
  deleteAll(): Promise<boolean>;
1000
+ toJSON(): APIVipMember[];
1213
1001
  }
1214
1002
 
1215
1003
  declare class VipMember implements APIVipMember {
@@ -1259,7 +1047,7 @@ declare class VipMember implements APIVipMember {
1259
1047
  */
1260
1048
  update(data: Optional<APIVipMember>): Promise<this>;
1261
1049
  delete(): Promise<boolean>;
1262
- toJSON(): Record<keyof APIVipMember, unknown>;
1050
+ toJSON(): APIVipMember;
1263
1051
  }
1264
1052
 
1265
1053
  declare class GuildTicket {
@@ -1287,6 +1075,7 @@ declare class GuildTicket {
1287
1075
  setChannelId(id: string): Promise<GuildTicket>;
1288
1076
  setClosedById(id: string): Promise<GuildTicket>;
1289
1077
  setStatus(status: "on" | "off"): Promise<GuildTicket>;
1078
+ toJSON(): APIGuildTicket;
1290
1079
  }
1291
1080
 
1292
1081
  interface FetchOptions$5 {
@@ -1301,6 +1090,7 @@ declare class MinesGameManager {
1301
1090
  delete(gameId: string): Promise<unknown>;
1302
1091
  fetch(options?: FetchOptions$5): Promise<MinesGame | Collection<string, MinesGame>>;
1303
1092
  set(data: APIMinesGame | APIMinesGame[]): MinesGame | Collection<string, MinesGame>;
1093
+ toJSON(): APIMinesGame[];
1304
1094
  }
1305
1095
 
1306
1096
  declare class MinesGame {
@@ -1322,6 +1112,7 @@ declare class MinesGame {
1322
1112
  fetch(): Promise<this>;
1323
1113
  delete(): Promise<this>;
1324
1114
  update(data: Optional<APIMinesGame>): Promise<this>;
1115
+ toJSON(): APIMinesGame;
1325
1116
  }
1326
1117
 
1327
1118
  type FetchOptions$4 = {
@@ -1392,6 +1183,226 @@ declare class Product implements APIProduct {
1392
1183
  toJSON(): APIProduct;
1393
1184
  }
1394
1185
 
1186
+ type MatchSelection = {
1187
+ type: "creator" | "mvps" | "winners" | "rematch";
1188
+ selected: string[];
1189
+ confirmed: string[];
1190
+ };
1191
+ interface APIGuildMatch {
1192
+ selections: MatchSelection[];
1193
+ /** Match's type */
1194
+ type: BaseMatchModes;
1195
+ guild_id: string;
1196
+ /** Match's status */
1197
+ status: BaseMatchStatus;
1198
+ /** Match's challenge */
1199
+ challenge: boolean;
1200
+ admin_id: string;
1201
+ /** Match's players */
1202
+ players: APIPlayer[];
1203
+ code: string;
1204
+ /** Match's winners */
1205
+ winners: APIPlayer[];
1206
+ betting: number;
1207
+ /** Match's losers */
1208
+ losers: APIPlayer[];
1209
+ /** Match;s messages */
1210
+ messages: APIMessage[];
1211
+ /** Matches channels */
1212
+ channels: APIBaseChannel[];
1213
+ /** Match's maximum size */
1214
+ maximumSize: number;
1215
+ /** Match's kicked out */
1216
+ kickedOut: APIPlayer[];
1217
+ /** Match's confirmed */
1218
+ confirmed: Confirm[];
1219
+ /** Match's leaders */
1220
+ leaders: APIPlayer[];
1221
+ teams: APIPlayer[][];
1222
+ creatorId: string;
1223
+ /** Match's room creator id */
1224
+ roomCreatorId: string;
1225
+ bet: APIGuildBet | GuildBet;
1226
+ /** Creation Date */
1227
+ createdAt: Date;
1228
+ /** Updated Date */
1229
+ updatedAt: Date;
1230
+ /** Match's id */
1231
+ _id: string;
1232
+ mvps: string[];
1233
+ url: string;
1234
+ logs: {
1235
+ shutted: string;
1236
+ closed: string;
1237
+ managed: string;
1238
+ };
1239
+ }
1240
+ declare enum GuildMatchChannelsType {
1241
+ CreationChannel = "creation_channel",
1242
+ TextChannel = "text_channel"
1243
+ }
1244
+ declare enum GuildMatchMessagesType {
1245
+ CreationMessage = "creation_message"
1246
+ }
1247
+
1248
+ interface APITicketPanel {
1249
+ message: {
1250
+ embeds: APIEmbed[];
1251
+ };
1252
+ name: string;
1253
+ guild_id: string;
1254
+ _id: string;
1255
+ components_type: "button" | "stringselect";
1256
+ categories: APITicketCategory[];
1257
+ /** Creation Date */
1258
+ createdAt: Date;
1259
+ /** Updated Date */
1260
+ updatedAt: Date;
1261
+ }
1262
+
1263
+ interface APITicketCategory {
1264
+ /** Category's type */
1265
+ type: string;
1266
+ /** Category's emoji */
1267
+ emoji: string;
1268
+ /** Category's description */
1269
+ description: string;
1270
+ /** Category's alias */
1271
+ alias: string;
1272
+ name: string;
1273
+ role_ids: string[];
1274
+ _id: string;
1275
+ }
1276
+ interface LogMessage {
1277
+ /** The message's content */
1278
+ content: string | Buffer<any>;
1279
+ /** The message's sender */
1280
+ userId: string;
1281
+ /** The message's type */
1282
+ type: string;
1283
+ /** Creation Date */
1284
+ createdAt: Date;
1285
+ /** Updated Date */
1286
+ updatedAt: Date;
1287
+ }
1288
+ /** Base match modes */
1289
+ type BaseMatchModes = "1v1" | "2v2" | "3v3" | "4v4" | "5v5" | "6v6";
1290
+ /** Base match status */
1291
+ type BaseMatchStatus = "on" | "created" | "off" | "shutted";
1292
+ /** The logs of the structure */
1293
+ interface Logs {
1294
+ /** The messages of the structure */
1295
+ messages: LogMessage[];
1296
+ }
1297
+ /** Original Channel */
1298
+ type OriginalChannel = {
1299
+ /** Channel id */
1300
+ channelId: string;
1301
+ /** Match id */
1302
+ matchId: string;
1303
+ };
1304
+ /** Original Channels */
1305
+ type OriginalChannels = OriginalChannel[];
1306
+ /** Accessories */
1307
+ type Accessory = {
1308
+ type: UserAccessoryType;
1309
+ units: number;
1310
+ time: number;
1311
+ active: {
1312
+ units: number;
1313
+ time: number;
1314
+ };
1315
+ };
1316
+ declare enum UserAccessoryType {
1317
+ PointsProtection = "points_protection",
1318
+ LossesProtection = "losses_protection",
1319
+ DoublePoints = "double_points"
1320
+ }
1321
+ /** Daily information */
1322
+ type Daily = {
1323
+ /** Wins */
1324
+ wins: number;
1325
+ /** Coins */
1326
+ coins: number;
1327
+ /** Points */
1328
+ points: number;
1329
+ /** Credit */
1330
+ credit: number;
1331
+ /** Losses */
1332
+ losses: number;
1333
+ /** Mvps */
1334
+ mvps: number;
1335
+ bets: number;
1336
+ /** Date of the daily */
1337
+ date: Date;
1338
+ };
1339
+ interface Banner {
1340
+ /** Equipped banner */
1341
+ equipped: number;
1342
+ /** Bought banners */
1343
+ allowed: number[];
1344
+ }
1345
+ interface ProfileCard {
1346
+ /** Profile's description */
1347
+ description: string;
1348
+ /** Profile's banner */
1349
+ banner: Banner;
1350
+ }
1351
+ interface Confirm {
1352
+ /** Confirm's type */
1353
+ type: string;
1354
+ /** Confirm's id */
1355
+ ids: string[];
1356
+ /** Confirm's counts */
1357
+ count: number;
1358
+ }
1359
+ type Optional<T> = {
1360
+ [K in keyof T]?: T[K];
1361
+ };
1362
+ declare enum MATCHTYPES {
1363
+ OneVOne = "1v1",
1364
+ TwoVTwo = "2v2",
1365
+ ThreeVThree = "3v3",
1366
+ FourVFour = "4v4",
1367
+ FiveVFive = "5v5",
1368
+ SixVSix = "6v6"
1369
+ }
1370
+ declare enum MATCHSTATUS {
1371
+ ON = "on",
1372
+ OFF = "off",
1373
+ CREATED = "created",
1374
+ SHUTTED = "shutted"
1375
+ }
1376
+ declare enum BETSTATUS {
1377
+ ON = "on",
1378
+ OFF = "off",
1379
+ CREATED = "created",
1380
+ SHUTTED = "shutted",
1381
+ WAITING = "waiting"
1382
+ }
1383
+ declare enum STATES {
1384
+ ON = "on",
1385
+ OFF = "off",
1386
+ CREATED = "created",
1387
+ SHUTTED = "shutted",
1388
+ WAITING = "waiting"
1389
+ }
1390
+ interface StatusResponse {
1391
+ status: "ok" | "error";
1392
+ services: {
1393
+ fastify: boolean;
1394
+ mongo: {
1395
+ ok: boolean;
1396
+ latency: number;
1397
+ };
1398
+ redis: {
1399
+ ok: boolean;
1400
+ latency: number;
1401
+ };
1402
+ };
1403
+ timestamp: string;
1404
+ }
1405
+
1395
1406
  declare class Guild {
1396
1407
  #private;
1397
1408
  /** The data of this guild */
@@ -1450,6 +1461,7 @@ declare class Guild {
1450
1461
  codes: Collection<string, APICode>;
1451
1462
  coin_symbol: string;
1452
1463
  buffs: Collection<string, APIBuff>;
1464
+ automatic_roles: Collection<string, APIAutomaticRole>;
1453
1465
  /**
1454
1466
  * The guild structure
1455
1467
  * @param data The guild's data
@@ -1496,6 +1508,15 @@ declare class Guild {
1496
1508
  admin_id?: string;
1497
1509
  }>;
1498
1510
  deleteBuff(id: string): Promise<this>;
1511
+ createAutomaticRole(data: Optional<APIAutomaticRole>): Promise<{
1512
+ _id: string;
1513
+ createdAt: Date;
1514
+ updatedAt: Date;
1515
+ type?: AutomaticRolesTypes;
1516
+ role_id?: string;
1517
+ rule?: number;
1518
+ }>;
1519
+ deleteDeleteAutomaticRole(id: string): Promise<this>;
1499
1520
  toJSON(): APIGuild;
1500
1521
  }
1501
1522
  type AvailableScores = "win" | "loss" | "mvp" | "creator" | "coin";
@@ -1528,6 +1549,7 @@ declare class GuildManager {
1528
1549
  reset(guildId?: string): Promise<Guild | Collection<string, Guild>>;
1529
1550
  delete(options: DeleteOptions$1): Promise<Collection<string, Guild> | boolean>;
1530
1551
  set(data: APIGuild | APIGuild[]): Guild | Collection<string, Guild>;
1552
+ toJSON(): APIGuild[];
1531
1553
  }
1532
1554
 
1533
1555
  interface ClientOptions {
@@ -1610,6 +1632,7 @@ declare class GuildBetManager extends BaseManager<GuildBet> {
1610
1632
  create(data: Optional<APIGuildBet>): Promise<GuildBet>;
1611
1633
  delete(betId?: string): Promise<GuildBet>;
1612
1634
  set(data: Optional<APIGuildBet> | Optional<APIGuildBet>[] | GuildBet): GuildBet;
1635
+ toJSON(): APIGuildBet[];
1613
1636
  }
1614
1637
 
1615
1638
  type BufferMatch = Optional<APIGuildMatch & {
@@ -1633,6 +1656,7 @@ declare class LogManager extends BaseManager<LogEntry> {
1633
1656
  fetch(): Promise<Collection<string, LogEntry>>;
1634
1657
  create(data: Optional<APILogEntry>): Promise<LogEntry>;
1635
1658
  set(data: APILogEntry | APILogEntry[]): LogEntry | Collection<string, LogEntry>;
1659
+ toJSON(): APILogEntry[];
1636
1660
  }
1637
1661
 
1638
1662
  type FetchOptions$1 = {
@@ -1656,6 +1680,7 @@ declare class GuildMatchManager extends BaseManager<GuildMatch> {
1656
1680
  set(data: APIGuildMatch | APIGuildMatch[] | GuildMatch): GuildMatch | Collection<string, GuildMatch>;
1657
1681
  create(payload: Optional<APIGuildMatch>): Promise<GuildMatch>;
1658
1682
  delete(id?: string): Promise<GuildMatch | Collection<string, GuildMatch>>;
1683
+ toJSON(): APIGuildMatch[];
1659
1684
  }
1660
1685
 
1661
1686
  type T<e> = e & {
@@ -1665,6 +1690,7 @@ type T<e> = e & {
1665
1690
  };
1666
1691
  declare class MessagesManager<Structure> {
1667
1692
  cache: Collection<string, APIMessage>;
1693
+ _messages: APIMessage[];
1668
1694
  readonly base_url: string;
1669
1695
  readonly rest: REST;
1670
1696
  readonly guild: Guild;
@@ -1672,6 +1698,7 @@ declare class MessagesManager<Structure> {
1672
1698
  fetch(): Promise<APIMessage>;
1673
1699
  create(data: Optional<APIMessage> | Optional<APIMessage>[]): Promise<Collection<string, APIMessage>>;
1674
1700
  set(data: APIMessage | APIMessage[]): Collection<string, APIMessage>;
1701
+ toJSON(): APIMessage[];
1675
1702
  }
1676
1703
 
1677
1704
  declare class GuildPermissionManager extends BaseManager<APIGuildPermissions> {
@@ -1692,7 +1719,7 @@ declare class ShopManager extends BaseManager<Shop> {
1692
1719
  create(data: Optional<APIGuildShop>): Promise<Shop>;
1693
1720
  delete(id: string): Promise<Collection<string, Shop>>;
1694
1721
  set(data: APIGuildShop | APIGuildShop[] | Shop): Shop | Collection<string, Shop>;
1695
- toJSON(): Shop[];
1722
+ toJSON(): APIGuildShop[];
1696
1723
  }
1697
1724
 
1698
1725
  type FecthOptions = {
@@ -1713,6 +1740,7 @@ declare class GuildTicketManager {
1713
1740
  create(data: Optional<APIGuildTicket>): Promise<GuildTicket>;
1714
1741
  delete(options?: DeleteOptions): Promise<boolean>;
1715
1742
  set(data: APIGuildTicket | GuildTicket | APIGuildTicket[]): GuildTicket | Collection<string, GuildTicket>;
1743
+ toJSON(): APIGuildTicket[];
1716
1744
  }
1717
1745
 
1718
1746
  export { GuildTimerTypes as $, type APIAutomaticMessage as A, BETSTATUS as B, type Confirm as C, type Daily as D, GuildBetUser as E, type FetchOptions$2 as F, Guild as G, GuildBetUserManager as H, GuildChannelsType as I, type GuildLogsWebhookUrls as J, GuildManager as K, GuildMatch as L, GuildMatchChannelsType as M, GuildMatchManager as N, GuildMatchMessagesType as O, GuildMediator as P, GuildMediatorManager as Q, REST as R, type GuildModes as S, GuildPermissionManager as T, type GuildPrices as U, type GuildScores as V, type GuildStatus as W, GuildStatusEnum as X, GuildTicket as Y, type GuildTicketConfiguration as Z, GuildTicketManager as _, type APIGuild as a, GuildUser as a0, GuildUserManager as a1, LogEntry as a2, LogManager as a3, type LogMessage as a4, type Logs as a5, MATCHSTATUS as a6, MATCHTYPES as a7, type MatchSelection as a8, MessagesManager as a9, ProductManager as aA, MinesGame as aa, MinesGameManager as ab, type Optional as ac, type OriginalChannel as ad, type OriginalChannels as ae, PlayerManager as af, type PlayerOption as ag, Product as ah, type Profile as ai, type ProfileCard as aj, type RequestOptions as ak, type RestEvents as al, type RoulettePrize as am, type RouletteSettings as an, STATES as ao, Shop as ap, ShopManager as aq, type StatusResponse as ar, type Structure as as, TicketPanel as at, TicketPanelManager as au, Tournament as av, TournamentManager as aw, UserAccessoryType as ax, VipMember as ay, VipMemberManager as az, type APIGuildBet as b, type APIGuildBetUser as c, type APIGuildGroupedChannel as d, type APIGuildMatch as e, type APIGuildUser as f, type APITicketCategory as g, type APITicketPanel as h, type Accessory as i, AutomaticMessage as j, AutomaticMessageManager as k, type AutomaticMessagePayload as l, AutomaticMessagesTypes as m, type Banner as n, BaseManager as o, type BaseMatchModes as p, type BaseMatchStatus as q, BetChannelTypes as r, type BetQueue as s, BufferManager as t, type BufferMatch as u, type BufferTicket as v, type DailyCategories as w, type FetchReturn as x, GuildBet as y, GuildBetManager as z };