@duque.edits/sdk 0.1.6 → 0.1.8

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 (47) hide show
  1. package/dist/managers/base.js +0 -6
  2. package/dist/managers/buffer/BufferManager.js +2 -2
  3. package/dist/managers/guild/GuildManager.js +6 -4
  4. package/dist/managers/index.js +5 -1
  5. package/dist/managers/logs/LogManager.js +60 -0
  6. package/dist/managers/match/GuildMatchManager.js +1 -1
  7. package/dist/managers/message/MessagesManager.js +1 -1
  8. package/dist/managers/minesgame/MinesGameManager.js +67 -0
  9. package/dist/managers/ticket/TicketManager.js +3 -3
  10. package/dist/managers/user/GuildUserManager.js +13 -21
  11. package/dist/managers/vipmember/VipMemberManager.js +2 -2
  12. package/dist/rest/REST.js +16 -17
  13. package/dist/rest/Routes.js +3 -3
  14. package/dist/structures/Collection.js +2 -2
  15. package/dist/structures/guild/Guild.js +142 -75
  16. package/dist/structures/index.js +1 -0
  17. package/dist/structures/match/GuildMatch.js +32 -74
  18. package/dist/structures/minesgame/MinesGame.js +72 -0
  19. package/dist/structures/user/GuildUser.js +16 -13
  20. package/dist/types/api/APIGuild.js +16 -0
  21. package/dist/types/api/APIGuildMatch.js +9 -0
  22. package/dist/types/api/APILogEntry.js +2 -0
  23. package/dist/types/api/APIMinesGame.js +2 -0
  24. package/dist/types/api/index.js +4 -4
  25. package/package.json +6 -4
  26. package/types/managers/base.d.ts +0 -3
  27. package/types/managers/index.d.ts +5 -1
  28. package/types/managers/logs/LogManager.d.ts +11 -0
  29. package/types/managers/minesgame/MinesGameManager.d.ts +17 -0
  30. package/types/managers/ticket/TicketManager.d.ts +1 -1
  31. package/types/managers/user/GuildUserManager.d.ts +2 -3
  32. package/types/managers/vipmember/VipMemberManager.d.ts +1 -2
  33. package/types/rest/REST.d.ts +10 -7
  34. package/types/structures/guild/Guild.d.ts +16 -32
  35. package/types/structures/index.d.ts +1 -0
  36. package/types/structures/match/GuildMatch.d.ts +4 -7
  37. package/types/structures/minesgame/MinesGame.d.ts +23 -0
  38. package/types/structures/ticket/Ticket.d.ts +3 -3
  39. package/types/structures/user/GuildUser.d.ts +3 -4
  40. package/types/types/api/APIGuild.d.ts +22 -38
  41. package/types/types/api/APIGuildGroupedChannel.d.ts +2 -5
  42. package/types/types/api/APIGuildMatch.d.ts +6 -0
  43. package/types/types/api/APIGuildUser.d.ts +7 -2
  44. package/types/types/api/APILogEntry.d.ts +9 -0
  45. package/types/types/api/APIMessage.d.ts +2 -1
  46. package/types/types/api/APIMinesGame.d.ts +13 -0
  47. package/types/types/api/index.d.ts +6 -15
@@ -1,2 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuildMatchMessagesType = exports.GuildMatchChannelsType = void 0;
4
+ var GuildMatchChannelsType;
5
+ (function (GuildMatchChannelsType) {
6
+ GuildMatchChannelsType["CreationChannel"] = "creation_channel";
7
+ })(GuildMatchChannelsType || (exports.GuildMatchChannelsType = GuildMatchChannelsType = {}));
8
+ var GuildMatchMessagesType;
9
+ (function (GuildMatchMessagesType) {
10
+ GuildMatchMessagesType["CreationMessage"] = "creation_message";
11
+ })(GuildMatchMessagesType || (exports.GuildMatchMessagesType = GuildMatchMessagesType = {}));
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -50,22 +50,22 @@ var STATES;
50
50
  __exportStar(require("./APIBaseChannel"), exports);
51
51
  __exportStar(require("./APIBetChannel"), exports);
52
52
  __exportStar(require("./APIBetMessage"), exports);
53
+ __exportStar(require("./APIGiveaway"), exports);
53
54
  __exportStar(require("./APIGuild"), exports);
54
55
  __exportStar(require("./APIGuildBet"), exports);
55
56
  __exportStar(require("./APIGuildBetUser"), exports);
56
57
  __exportStar(require("./APIGuildChannel"), exports);
57
- __exportStar(require("./APIGuildEmoji"), exports);
58
58
  __exportStar(require("./APIGuildGroupedChannel"), exports);
59
59
  __exportStar(require("./APIGuildMatch"), exports);
60
60
  __exportStar(require("./APIGuildMediator"), exports);
61
61
  __exportStar(require("./APIGuildPermissions"), exports);
62
- __exportStar(require("./APIGuildRole"), exports);
63
62
  __exportStar(require("./APIGuildShop"), exports);
64
63
  __exportStar(require("./APIGuildTicket"), exports);
65
64
  __exportStar(require("./APIGuildUser"), exports);
65
+ __exportStar(require("./APILogEntry"), exports);
66
+ __exportStar(require("./APILogMessage"), exports);
66
67
  __exportStar(require("./APIMessage"), exports);
68
+ __exportStar(require("./APIMinesGame"), exports);
67
69
  __exportStar(require("./APIPlayer"), exports);
68
70
  __exportStar(require("./APIProduct"), exports);
69
71
  __exportStar(require("./APIVipMember"), exports);
70
- __exportStar(require("./APIGiveaway"), exports);
71
- __exportStar(require("./APILogMessage"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duque.edits/sdk",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "main": "dist/index",
5
5
  "types": "./types/index.d.ts",
6
6
  "typings": "./types/index.d.ts",
@@ -17,10 +17,12 @@
17
17
  "dist",
18
18
  "types"
19
19
  ],
20
+
20
21
  "scripts": {
21
- "test": "ts-node tests/index.ts",
22
- "match": "ts-node tests/match.ts",
23
- "guild": "ts-node tests/guild.ts"
22
+ "test": "ts-node --transpile-only tests/index.ts",
23
+ "match": "ts-node --transpile-only tests/match.ts",
24
+ "guild": "ts-node --transpile-only tests/guild.ts",
25
+ "user": "ts-node --transpile-only tests/user.ts"
24
26
  },
25
27
  "author": "Duque Edits jedits077@gmail.com",
26
28
  "license": "ISC",
@@ -10,8 +10,5 @@ export declare class BaseManager<S> {
10
10
  guild: Guild;
11
11
  /** Cache */
12
12
  cache: Collection<string, S>;
13
- /** Internal data when manager is initialized */
14
- _data: unknown;
15
13
  constructor(guild: Guild, data?: unknown);
16
- get data(): unknown;
17
14
  }
@@ -1,7 +1,11 @@
1
1
  export * from "./buffer/BufferManager";
2
2
  export * from "./guild/GuildManager";
3
+ export * from "./logs/LogManager";
3
4
  export * from "./match/GuildMatchManager";
5
+ export * from "./message/MessagesManager";
4
6
  export * from "./permission/GuildPermissionManager";
7
+ export * from "./ticket/TicketManager";
5
8
  export * from "./user/GuildUserManager";
6
9
  export * from "./vipmember/VipMemberManager";
7
- export * from "./ticket/TicketManager";
10
+ export * from "./minesgame/MinesGameManager";
11
+ export * from "./base";
@@ -0,0 +1,11 @@
1
+ import { Collection, Guild } from "../../structures";
2
+ import { Optional } from "../../types";
3
+ import { APILogEntry } from "../../types/api/APILogEntry";
4
+ import { BaseManager } from "../base";
5
+ export declare class LogManager extends BaseManager<APILogEntry> {
6
+ constructor(guild: Guild);
7
+ fetch(): Promise<APILogEntry[]>;
8
+ create(data: Optional<APILogEntry>): Promise<APILogEntry>;
9
+ createMany(data: Optional<APILogEntry>[]): Promise<APILogEntry[]>;
10
+ set(data: APILogEntry | APILogEntry[]): APILogEntry | Collection<string, APILogEntry>;
11
+ }
@@ -0,0 +1,17 @@
1
+ import { REST } from "../../rest";
2
+ import { Collection, MinesGame } from "../../structures";
3
+ import { APIMinesGame, Optional } from "../../types";
4
+ interface FetchOptions {
5
+ cache?: boolean;
6
+ gameId?: string;
7
+ }
8
+ export declare class MinesGameManager {
9
+ cache: Collection<string, MinesGame>;
10
+ readonly rest: REST;
11
+ constructor(rest: REST);
12
+ create(data: Optional<APIMinesGame>): Promise<MinesGame>;
13
+ delete(gameId: string): Promise<unknown>;
14
+ fetch(options?: FetchOptions): Promise<MinesGame | Collection<string, MinesGame>>;
15
+ set(data: APIMinesGame | APIMinesGame[]): MinesGame | Collection<string, MinesGame>;
16
+ }
17
+ export {};
@@ -9,7 +9,7 @@ type FecthOptions = {
9
9
  type DeleteOptions = {
10
10
  ticketId?: string;
11
11
  };
12
- export declare class TicketManager {
12
+ export declare class GuildTicketManager {
13
13
  cache: Collection<string, GuildTicket>;
14
14
  readonly guild: Guild;
15
15
  readonly rest: REST;
@@ -1,7 +1,7 @@
1
1
  import { Collection } from "../../structures/Collection";
2
2
  import { Guild } from "../../structures/guild/Guild";
3
3
  import { GuildUser } from "../../structures/user/GuildUser";
4
- import { APIGuildUser } from "../../types";
4
+ import { APIGuildUser, Optional } from "../../types";
5
5
  import { BaseManager } from "../base";
6
6
  type FetchOptions = {
7
7
  userId?: string;
@@ -10,10 +10,9 @@ type FetchOptions = {
10
10
  export declare class GuildUserManager extends BaseManager<GuildUser> {
11
11
  constructor(guild: Guild);
12
12
  fetch(options?: FetchOptions): Promise<Collection<string, GuildUser> | GuildUser>;
13
- updateMany(users: APIGuildUser[] | GuildUser[]): Promise<Collection<string, GuildUser>>;
13
+ updateMany(...users: Optional<APIGuildUser>[]): Promise<Collection<string, GuildUser>>;
14
14
  deleteAll(): Promise<void>;
15
15
  resetAll(): Promise<Collection<string, GuildUser>>;
16
- _setUsers(data: (APIGuildUser | GuildUser) | (APIGuildUser[] | GuildUser[])): void;
17
16
  set(data: APIGuildUser | APIGuildUser[]): GuildUser | Collection<string, GuildUser>;
18
17
  }
19
18
  export {};
@@ -1,4 +1,3 @@
1
- import { REST } from "../../rest/REST";
2
1
  import { VipMember } from "../../structures/vipmember/VipMember";
3
2
  import { Collection } from "../../structures/Collection";
4
3
  import { Guild } from "../../structures/guild/Guild";
@@ -15,7 +14,7 @@ export declare class VipMemberManager extends BaseManager<VipMember> {
15
14
  * @param vipmembers An array of vipmembers
16
15
  * @param rest The rest client
17
16
  */
18
- constructor(guild: Guild, rest: REST);
17
+ constructor(guild: Guild);
19
18
  create(data: Optional<APIVipMember>): Promise<VipMember>;
20
19
  /**
21
20
  * Fetch a member
@@ -4,6 +4,11 @@ import { Collection } from "../structures/Collection";
4
4
  import { GuildMatch } from "../structures/match/GuildMatch";
5
5
  import { GuildUser } from "../structures/user/GuildUser";
6
6
  import { RestEvents, RequestOptions } from "../types/RestTypes";
7
+ import { MinesGameManager } from "../managers";
8
+ interface ClientOptions {
9
+ clientKey: string;
10
+ authKey: string;
11
+ }
7
12
  /**
8
13
  * The main class of this package
9
14
  */
@@ -11,21 +16,18 @@ export declare class REST extends EventEmitter {
11
16
  /**
12
17
  * The unique key for client
13
18
  */
14
- key: string;
19
+ clientKey: string;
20
+ authKey: string;
15
21
  /** The guild manager */
16
22
  guilds: GuildManager;
23
+ minesGames: MinesGameManager;
17
24
  users: Collection<string, GuildUser>;
18
25
  matches: Collection<string, GuildMatch>;
19
26
  /**
20
27
  *
21
28
  * @param key The unique key for he client
22
29
  */
23
- constructor(key?: string);
24
- /**
25
- * Set the api key
26
- * @param key The unique key of the client
27
- */
28
- setKey(key: string): void;
30
+ constructor(options: ClientOptions);
29
31
  /** Initialize the caching sistem */
30
32
  init(): Promise<this>;
31
33
  /**
@@ -42,3 +44,4 @@ export declare class REST extends EventEmitter {
42
44
  on<K extends keyof RestEvents>(event: K, listener: (...args: RestEvents[K]) => void): this;
43
45
  once<K extends keyof RestEvents>(event: K, listener: (...args: RestEvents[K]) => void): this;
44
46
  }
47
+ export {};
@@ -1,16 +1,7 @@
1
- import { GuildPermissionManager } from "../../managers/permission/GuildPermissionManager";
2
- import { BufferManager } from "../../managers/buffer/BufferManager";
3
- import { GuildMatchManager } from "../../managers/match/GuildMatchManager";
4
- import { VipMemberManager } from "../../managers/vipmember/VipMemberManager";
1
+ import { BufferManager, GuildMatchManager, GuildPermissionManager, GuildTicketManager, GuildUserManager, LogManager, VipMemberManager } from "../../managers";
5
2
  import { REST } from "../../rest/REST";
6
- import { Daily, GuildBlacklist, Optional } from "../../types/api";
7
- import { APIGuild, DailyCategories, GuildModes, GuildPrices, GuildScores, GuildStatus, GuildTicketConfiguration } from "../../types/api/APIGuild";
8
- import { APIGuildEmoji } from "../../types/api/APIGuildEmoji";
9
- import { APIGuildPermissions } from "../../types/api/APIGuildPermissions";
10
- import { APIGuildRole } from "../../types/api/APIGuildRole";
11
- import { GuildUserManager } from "../../managers/user/GuildUserManager";
12
- import { TicketManager } from "../../managers";
13
- /** The Guild */
3
+ import { APIGuildGroupedChannel, APIGuildPermissions, APIGuildShop, Daily, Optional } from "../../types/api";
4
+ import { APIGuild, DailyCategories, GuildChannelsType, GuildModes, GuildPrices, GuildScores, GuildStatus, GuildTicketConfiguration } from "../../types/api/APIGuild";
14
5
  export declare class Guild {
15
6
  /** The data of this guild */
16
7
  data: APIGuild;
@@ -20,53 +11,46 @@ export declare class Guild {
20
11
  id: string;
21
12
  modes: GuildModes;
22
13
  /** Guild's client key */
23
- clientKey: string;
14
+ client_key: string;
24
15
  /** Guild Permissions */
25
16
  permissions: APIGuildPermissions;
26
17
  /** Guild Ticket */
18
+ tickets: GuildTicketManager;
27
19
  /** Guild Ticket Configuration */
28
20
  tickets_configuration: GuildTicketConfiguration;
29
21
  /** Guild Daily Categories */
30
- dailyCategories: DailyCategories[];
22
+ daily_categories: DailyCategories[];
31
23
  /** Guild Scores */
32
24
  scores: GuildScores;
33
25
  /** Guild Status */
34
26
  status: GuildStatus;
35
- /** Guild Channel */
36
- /** Guild Categories */
37
- /** Guild Blacklist */
38
- blacklist: GuildBlacklist;
27
+ channels: APIGuildGroupedChannel[];
39
28
  /** Guild Prefix */
40
29
  prefix: string;
41
- /** Guild Prices */
42
- pricesAvailable: number[];
43
- /** Guild Prices Used */
44
- pricesOn: number[];
45
30
  /** Guild Creation Date */
46
31
  createdAt: Date;
47
32
  /** Guild Updated Date */
48
33
  updatedAt: Date;
49
- /** Guild Users */
50
- /** Guild Bet Users */
51
34
  /** Guild Matches */
52
35
  matches: GuildMatchManager;
53
- /** Guild Emojis */
54
- emojis: APIGuildEmoji[];
55
- /** Guild Roles */
56
- roles: APIGuildRole[];
57
36
  /** Guild Prices Used */
58
37
  prices: GuildPrices;
59
38
  permissionsManager: GuildPermissionManager;
60
39
  buffer: BufferManager;
61
40
  vipMembers: VipMemberManager;
62
41
  users: GuildUserManager;
63
- tickets: TicketManager;
42
+ logEntries: LogManager;
43
+ shop: APIGuildShop;
64
44
  /**
65
45
  * The guild structure
66
46
  * @param data The guild's data
67
47
  * @param rest The rest client
68
48
  */
69
49
  constructor(data: APIGuild, rest: REST);
50
+ getChannel(type: GuildChannelsType): Promise<APIGuildGroupedChannel>;
51
+ addIdToChannel(type: GuildChannelsType, id: string | string[]): Promise<this>;
52
+ removeIdInChannel(type: GuildChannelsType, id: string): Promise<this>;
53
+ _start(): Promise<this>;
70
54
  _updateInternals(data: Optional<APIGuild>): this;
71
55
  fetch(): Promise<Guild>;
72
56
  update(data: Optional<APIGuild>): Promise<Guild>;
@@ -74,9 +58,9 @@ export declare class Guild {
74
58
  addPrice(price: number): Promise<this>;
75
59
  removePrice(price: number): Promise<this>;
76
60
  setPrefix(prefix: string): Promise<this>;
77
- addDailyCategory(category: keyof Daily): Promise<this>;
78
- removeDailyCategory(category: keyof Daily): Promise<this>;
79
- setScore(name: AvailableScores, amount: number): Promise<this>;
61
+ toggleDailyCategory(category: keyof Omit<Daily, "date">): Promise<this>;
62
+ setScores(name: AvailableScores, amount: number): Promise<this>;
63
+ toggleMode(mode: "1v1" | "2v2" | "3v3" | "4v4" | "5v5" | "6v6"): Promise<this>;
80
64
  }
81
65
  type AvailableScores = "win" | "loss" | "mvp" | "creator" | "coin";
82
66
  export {};
@@ -3,4 +3,5 @@ export * from "./match/GuildMatch";
3
3
  export * from "./user/GuildUser";
4
4
  export * from "./vipmember/VipMember";
5
5
  export * from "./ticket/Ticket";
6
+ export * from "./minesgame/MinesGame";
6
7
  export * from "./Collection";
@@ -1,11 +1,7 @@
1
1
  import { REST } from "../../rest/REST";
2
+ import { APIBaseChannel, APIGuildMatch, APIMessage, APIPlayer, BaseMatchModes, BaseMatchStatus, Confirm, MatchSelection, Optional } from "../../types";
3
+ import { GuildMatchManager } from "../../managers";
2
4
  import { Guild } from "../guild/Guild";
3
- import { APIGuildMatch, MatchSelection } from "../../types/api/APIGuildMatch";
4
- import { APIPlayer } from "../../types/api/APIPlayer";
5
- import { BaseMatchModes, BaseMatchStatus, Confirm, Optional } from "../../types/api";
6
- import { GuildMatchManager } from "../../managers/match/GuildMatchManager";
7
- import { APIBaseChannel } from "../../types";
8
- import { MessagesManager } from "../../managers/message/MessagesManager";
9
5
  export declare class GuildMatch {
10
6
  _id: string;
11
7
  selections: MatchSelection[];
@@ -40,7 +36,7 @@ export declare class GuildMatch {
40
36
  createdAt: Date;
41
37
  /** Updated Date */
42
38
  updatedAt: Date;
43
- messages: MessagesManager<GuildMatch>;
39
+ messages: APIMessage[];
44
40
  /** Match's id */
45
41
  mvps: [];
46
42
  manager: GuildMatchManager;
@@ -72,4 +68,5 @@ export declare class GuildMatch {
72
68
  update(data: Optional<APIGuildMatch>): Promise<GuildMatch>;
73
69
  delete(): Promise<boolean>;
74
70
  toJSON(): Record<string, unknown>;
71
+ _updateInternals(data: Optional<APIGuildMatch>): this;
75
72
  }
@@ -0,0 +1,23 @@
1
+ import { MinesGameManager } from "../../managers/minesgame/MinesGameManager";
2
+ import { REST } from "../../rest";
3
+ import { APIMinesGame, Optional } from "../../types";
4
+ export declare class MinesGame {
5
+ guild_id: string;
6
+ _id: string;
7
+ creatorId: string;
8
+ maxMines: number;
9
+ bombs: number;
10
+ bombsPosition: number[];
11
+ bet: number;
12
+ multiplier: number;
13
+ status: "created" | "won" | "lost" | "expired";
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ readonly rest: REST;
17
+ readonly manager: MinesGameManager;
18
+ constructor(data: APIMinesGame, manager: MinesGameManager);
19
+ fetch(): Promise<this>;
20
+ delete(): Promise<this>;
21
+ update(data: Optional<APIMinesGame>): Promise<this>;
22
+ _updateInternals(data: Optional<APIMinesGame>): this;
23
+ }
@@ -1,7 +1,7 @@
1
- import { TicketManager } from "../../managers/ticket/TicketManager";
1
+ import { GuildTicketManager } from "../../managers";
2
2
  import { REST } from "../../rest";
3
3
  import { APIGuildTicket, APILogMessage, Optional } from "../../types";
4
- import { Guild } from "../guild/Guild";
4
+ import { Guild } from "../";
5
5
  export declare class GuildTicket implements APIGuildTicket {
6
6
  _id: string;
7
7
  guild_id: string;
@@ -17,7 +17,7 @@ export declare class GuildTicket implements APIGuildTicket {
17
17
  updatedAt: Date;
18
18
  readonly rest: REST;
19
19
  readonly guild: Guild;
20
- readonly manager: TicketManager;
20
+ readonly manager: GuildTicketManager;
21
21
  constructor(data: APIGuildTicket, manager: any);
22
22
  fetch(): Promise<GuildTicket>;
23
23
  setCustomerRating(rating: number): Promise<GuildTicket>;
@@ -1,13 +1,11 @@
1
1
  import { REST } from "../../rest/REST";
2
2
  import { Accessory, Daily, Items, Optional, OriginalChannels } from "../../types/api";
3
- import { APIGuildUser } from "../../types/api/APIGuildUser";
3
+ import { APIGuildUser, Profile } from "../../types/api/APIGuildUser";
4
4
  import { GuildUserManager } from "../../managers/user/GuildUserManager";
5
5
  export declare class GuildUser implements APIGuildUser {
6
6
  /** User's id */
7
7
  id: string;
8
8
  guild_id: string;
9
- /** User name */
10
- name: string;
11
9
  /** User's daily */
12
10
  daily: Omit<Daily, "credit">;
13
11
  /** User's points */
@@ -26,6 +24,7 @@ export declare class GuildUser implements APIGuildUser {
26
24
  accessories: Accessory[];
27
25
  /** User's original channels */
28
26
  original_channels: OriginalChannels;
27
+ profile: Profile;
29
28
  creations: number;
30
29
  /** User's items */
31
30
  items: Items;
@@ -75,7 +74,7 @@ export declare class GuildUser implements APIGuildUser {
75
74
  type?: "add" | "remove";
76
75
  }): Promise<this>;
77
76
  delete(): Promise<boolean>;
78
- toJSON(): Record<keyof GuildUser, unknown>;
77
+ toJSON(): Optional<APIGuildUser>;
79
78
  }
80
79
  export interface UserAddOptions extends APIGuildUser {
81
80
  coins: number;
@@ -1,16 +1,7 @@
1
- import { APITicketCategory, GuildBlacklist } from ".";
2
- import { APIGuildBet } from "./APIGuildBet";
3
- import { APIGuildBetUser } from "./APIGuildBetUser";
4
- import { APIGuildEmoji } from "./APIGuildEmoji";
1
+ import { APITicketCategory } from ".";
5
2
  import { APIGuildGroupedChannel } from "./APIGuildGroupedChannel";
6
- import { APIGuildMatch } from "./APIGuildMatch";
7
- import { APIGuildMediator } from "./APIGuildMediator";
8
3
  import { APIGuildPermissions } from "./APIGuildPermissions";
9
- import { APIGuildRole } from "./APIGuildRole";
10
4
  import { APIGuildShop } from "./APIGuildShop";
11
- import { APIGuildTicket } from "./APIGuildTicket";
12
- import { APIGuildUser } from "./APIGuildUser";
13
- import { APIMessage } from "./APIMessage";
14
5
  /** Ticket's configuration */
15
6
  export interface GuildTicketConfiguration {
16
7
  /** Guild's categories */
@@ -24,9 +15,12 @@ export interface GuildStatus {
24
15
  /** Daily Ranking status */
25
16
  daily_rank: "on" | "off";
26
17
  /** Voice Channels for a bet */
27
- createVoiceChannels: "on" | "off";
18
+ create_voice_channels: "on" | "off";
28
19
  two_mvps: "on" | "off";
29
20
  ranking_name: "on" | "off";
21
+ logs_queues: "on" | "off";
22
+ logs_users: "on" | "off";
23
+ logs_managing: "on" | "off";
30
24
  }
31
25
  export interface GuildModes {
32
26
  on: string[];
@@ -52,17 +46,15 @@ export interface GuildScores {
52
46
  export interface APIGuild {
53
47
  /** Guild's id */
54
48
  id: string;
55
- modes: GuildModes;
56
49
  /** Guild's client key */
57
- clientKey: string;
50
+ client_key: string;
51
+ modes: GuildModes;
58
52
  /** Guild Permissions */
59
53
  permissions: APIGuildPermissions;
60
- /** Guild Ticket */
61
- tickets: APIGuildTicket[];
62
54
  /** Guild Ticket Configuration */
63
55
  tickets_configuration: GuildTicketConfiguration;
64
56
  /** Guild Daily Categories */
65
- dailyCategories: DailyCategories[];
57
+ daily_categories: DailyCategories[];
66
58
  /** Guild Scores */
67
59
  scores: GuildScores;
68
60
  /** Guild Status */
@@ -71,36 +63,28 @@ export interface APIGuild {
71
63
  channels: APIGuildGroupedChannel[];
72
64
  /** Guild Categories */
73
65
  categories: APIGuildGroupedChannel[];
74
- /** Guild Blacklist */
75
- blacklist: GuildBlacklist;
76
66
  /** Guild Prefix */
77
67
  prefix: string;
78
- /** Guild Prices */
79
- pricesAvailable: number[];
80
- /** Guild Prices Used */
81
- pricesOn: number[];
82
68
  /** Guild Prices Used */
83
69
  prices: GuildPrices;
84
70
  /** Guild Creation Date */
85
71
  createdAt: Date;
86
72
  /** Guild Updated Date */
87
73
  updatedAt: Date;
88
- /** Guild Bets */
89
- bets: APIGuildBet[];
90
- /** Guild Users */
91
- users: APIGuildUser[];
92
- /** Guild Bet Users */
93
- betUsers: APIGuildBetUser[];
94
- /** Guild Matches */
95
- matches: APIGuildMatch[];
96
- /** Guild Mediators */
97
- mediators: APIGuildMediator[];
98
- /** Guild Messages */
99
- messages: APIMessage[];
100
- /** Guild Emojis */
101
- emojis: APIGuildEmoji[];
102
- /** Guild Roles */
103
- roles: APIGuildRole[];
104
74
  /** Guild Shop */
105
75
  shop: APIGuildShop;
106
76
  }
77
+ export declare enum GuildChannelsType {
78
+ DailyRank = "daily_rank",
79
+ Commands = "command",
80
+ Blacklist = "blacklist",
81
+ Queues = "queue",
82
+ VipMemebers = "vipmembers_category",
83
+ QueueLogs = "queue_logs",
84
+ UserLogs = "user_logs",
85
+ ManagingLogs = "managing_logs",
86
+ NormalQueue = "normal_queue",
87
+ ChallengeQueue = "challenge_queue",
88
+ MatchTextChannelParent = "match_text_channel_parent",
89
+ VoiceChannelMatchCreation = "voice_channel_match_creation"
90
+ }
@@ -1,10 +1,7 @@
1
+ import { GuildChannelsType } from "./APIGuild";
1
2
  export interface APIGuildGroupedChannel {
2
3
  /** Channel's type */
3
- type: string;
4
+ type: string & GuildChannelsType;
4
5
  /** Channel's ids */
5
6
  ids: string[];
6
- /** Creation Date */
7
- createdAt: Date;
8
- /** Updated Date */
9
- updatedAt: Date;
10
7
  }
@@ -46,3 +46,9 @@ export interface APIGuildMatch {
46
46
  _id: string;
47
47
  mvps: [];
48
48
  }
49
+ export declare enum GuildMatchChannelsType {
50
+ CreationChannel = "creation_channel"
51
+ }
52
+ export declare enum GuildMatchMessagesType {
53
+ CreationMessage = "creation_message"
54
+ }
@@ -1,12 +1,17 @@
1
1
  import { Accessory, Daily, Items, OriginalChannels } from ".";
2
+ export interface Profile {
3
+ bannerUrl?: string;
4
+ avatarUrl?: string;
5
+ bio?: string;
6
+ name?: string;
7
+ }
2
8
  export interface APIGuildUser {
3
9
  /** User's id */
4
10
  id: string;
5
11
  guild_id: string;
6
- /** User name */
7
- name: string;
8
12
  /** User's daily */
9
13
  daily: Omit<Daily, "credit">;
14
+ profile: Profile;
10
15
  /** User's points */
11
16
  points: number;
12
17
  creations: number;
@@ -0,0 +1,9 @@
1
+ export interface APILogEntry {
2
+ _id: string;
3
+ guild_id: string;
4
+ type: string;
5
+ user_id: string;
6
+ description: string;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ }
@@ -1,7 +1,8 @@
1
1
  export interface APIMessage {
2
2
  /** Message's content */
3
3
  content?: string | object;
4
- _id: string;
4
+ _id?: string;
5
+ id?: string;
5
6
  /** Message's type */
6
7
  type: string;
7
8
  /** Creation Date */
@@ -0,0 +1,13 @@
1
+ export interface APIMinesGame {
2
+ guild_id: string;
3
+ _id: string;
4
+ creatorId: string;
5
+ maxMines: number;
6
+ bombs: number;
7
+ bombsPosition: number[];
8
+ bet: number;
9
+ multiplier: number;
10
+ status: "created" | "won" | "lost" | "expired";
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ }