@duque.edits/sdk 0.0.4 → 0.0.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.
Files changed (155) hide show
  1. package/{v1/index.ts → dist/index.d.ts} +27 -30
  2. package/dist/index.js +43 -0
  3. package/dist/managers/bet/GuildBetManager.d.ts +32 -0
  4. package/dist/managers/bet/GuildBetManager.js +107 -0
  5. package/dist/managers/betuser/GuildBetUserManager.d.ts +30 -0
  6. package/dist/managers/betuser/GuildBetUserManager.js +94 -0
  7. package/dist/managers/channel/ChannelManager.d.ts +39 -0
  8. package/dist/managers/channel/ChannelManager.js +147 -0
  9. package/dist/managers/groupedchannel/GroupedChannelManager.d.ts +34 -0
  10. package/dist/managers/groupedchannel/GroupedChannelManager.js +92 -0
  11. package/dist/managers/guild/GuildManager.d.ts +24 -0
  12. package/dist/managers/guild/GuildManager.js +75 -0
  13. package/dist/managers/match/GuildMatchManager.d.ts +32 -0
  14. package/dist/managers/match/GuildMatchManager.js +103 -0
  15. package/dist/managers/mediator/GuildMediatorManager.d.ts +32 -0
  16. package/dist/managers/mediator/GuildMediatorManager.js +97 -0
  17. package/dist/managers/messages/MessagesManager.d.ts +32 -0
  18. package/dist/managers/messages/MessagesManager.js +82 -0
  19. package/dist/managers/permission/GuildPermissionManager.d.ts +26 -0
  20. package/dist/managers/permission/GuildPermissionManager.js +70 -0
  21. package/dist/managers/product/GuildProductManager.d.ts +32 -0
  22. package/dist/managers/product/GuildProductManager.js +102 -0
  23. package/dist/managers/ticket/GuildTicketManager.d.ts +32 -0
  24. package/dist/managers/ticket/GuildTicketManager.js +99 -0
  25. package/dist/managers/user/GuildUserManager.d.ts +32 -0
  26. package/dist/managers/user/GuildUserManager.js +106 -0
  27. package/dist/rest/APIEndpoints.d.ts +11 -0
  28. package/dist/rest/APIEndpoints.js +12 -0
  29. package/dist/rest/REST.d.ts +51 -0
  30. package/dist/rest/REST.js +96 -0
  31. package/dist/rest/Routes.d.ts +84 -0
  32. package/dist/rest/Routes.js +89 -0
  33. package/dist/structures/Collection.d.ts +17 -0
  34. package/dist/structures/Collection.js +87 -0
  35. package/dist/structures/bet/GuildBet.d.ts +86 -0
  36. package/dist/structures/bet/GuildBet.js +276 -0
  37. package/dist/structures/betuser/GuildBetUser.d.ts +82 -0
  38. package/dist/structures/betuser/GuildBetUser.js +194 -0
  39. package/dist/structures/channel/Channel.d.ts +31 -0
  40. package/dist/structures/channel/Channel.js +57 -0
  41. package/dist/structures/groupedchannel/GroupedChannel.d.ts +34 -0
  42. package/dist/structures/groupedchannel/GroupedChannel.js +121 -0
  43. package/dist/structures/guild/Guild.d.ts +89 -0
  44. package/dist/structures/guild/Guild.js +223 -0
  45. package/dist/structures/match/GuildMatch.d.ts +84 -0
  46. package/dist/structures/match/GuildMatch.js +327 -0
  47. package/dist/structures/mediator/GuildMediator.d.ts +41 -0
  48. package/dist/structures/mediator/GuildMediator.js +131 -0
  49. package/dist/structures/product/GuildProduct.d.ts +52 -0
  50. package/dist/structures/product/GuildProduct.js +175 -0
  51. package/dist/structures/shop/GuildShop.d.ts +34 -0
  52. package/dist/structures/shop/GuildShop.js +80 -0
  53. package/dist/structures/ticket/GuildTicket.d.ts +51 -0
  54. package/dist/structures/ticket/GuildTicket.js +170 -0
  55. package/dist/structures/user/GuildUser.d.ts +82 -0
  56. package/dist/structures/user/GuildUser.js +209 -0
  57. package/dist/types/api/APIBaseChannel.d.ts +10 -0
  58. package/dist/types/api/APIBaseChannel.js +2 -0
  59. package/dist/types/api/APIBetChannel.d.ts +10 -0
  60. package/dist/types/api/APIBetChannel.js +2 -0
  61. package/dist/types/api/APIBetMessage.d.ts +10 -0
  62. package/dist/types/api/APIBetMessage.js +2 -0
  63. package/dist/types/api/APIGuild.d.ts +92 -0
  64. package/dist/types/api/APIGuild.js +2 -0
  65. package/dist/types/api/APIGuildBet.d.ts +48 -0
  66. package/dist/types/api/APIGuildBet.js +2 -0
  67. package/dist/types/api/APIGuildBetUser.d.ts +32 -0
  68. package/dist/types/api/APIGuildBetUser.js +2 -0
  69. package/dist/types/api/APIGuildChannel.d.ts +10 -0
  70. package/dist/types/api/APIGuildChannel.js +2 -0
  71. package/dist/types/api/APIGuildEmoji.d.ts +12 -0
  72. package/dist/types/api/APIGuildEmoji.js +2 -0
  73. package/dist/types/api/APIGuildGroupedChannel.d.ts +10 -0
  74. package/dist/types/api/APIGuildGroupedChannel.js +2 -0
  75. package/dist/types/api/APIGuildMatch.d.ts +46 -0
  76. package/dist/types/api/APIGuildMatch.js +2 -0
  77. package/dist/types/api/APIGuildMediator.d.ts +13 -0
  78. package/dist/types/api/APIGuildMediator.js +3 -0
  79. package/dist/types/api/APIGuildMessage.d.ts +10 -0
  80. package/dist/types/api/APIGuildMessage.js +2 -0
  81. package/dist/types/api/APIGuildPermissions.d.ts +6 -0
  82. package/dist/types/api/APIGuildPermissions.js +2 -0
  83. package/dist/types/api/APIGuildRole.d.ts +10 -0
  84. package/dist/types/api/APIGuildRole.js +2 -0
  85. package/dist/types/api/APIGuildShop.d.ts +11 -0
  86. package/dist/types/api/APIGuildShop.js +2 -0
  87. package/dist/types/api/APIGuildTicket.d.ts +25 -0
  88. package/dist/types/api/APIGuildTicket.js +3 -0
  89. package/dist/types/api/APIGuildUser.d.ts +31 -0
  90. package/dist/types/api/APIGuildUser.js +2 -0
  91. package/dist/types/api/APIMessage.d.ts +12 -0
  92. package/dist/types/api/APIMessage.js +2 -0
  93. package/dist/types/api/APIPlayer.d.ts +10 -0
  94. package/dist/types/api/APIPlayer.js +2 -0
  95. package/dist/types/api/APIProduct.d.ts +19 -0
  96. package/dist/types/api/APIProduct.js +3 -0
  97. package/dist/types/api/index.d.ts +130 -0
  98. package/dist/types/api/index.js +35 -0
  99. package/{v1/types/index.ts → dist/types/index.d.ts} +21 -24
  100. package/dist/types/index.js +37 -0
  101. package/dist/utils/Assertion.d.ts +32 -0
  102. package/dist/utils/Assertion.js +60 -0
  103. package/package.json +5 -1
  104. package/.gitattributes +0 -2
  105. package/tests/index.ts +0 -86
  106. package/tsconfig.json +0 -15
  107. package/v1/managers/bet/GuildBetManager.ts +0 -117
  108. package/v1/managers/betuser/GuildBetUserManager.ts +0 -103
  109. package/v1/managers/channel/ChannelManager.ts +0 -168
  110. package/v1/managers/groupedchannel/GroupedChannelManager.ts +0 -117
  111. package/v1/managers/guild/GuildManager.ts +0 -84
  112. package/v1/managers/match/GuildMatchManager.ts +0 -115
  113. package/v1/managers/mediator/GuildMediatorManager.ts +0 -111
  114. package/v1/managers/messages/MessagesManager.ts +0 -95
  115. package/v1/managers/permission/GuildPermissionManager.ts +0 -88
  116. package/v1/managers/product/GuildProductManager.ts +0 -115
  117. package/v1/managers/ticket/GuildTicketManager.ts +0 -112
  118. package/v1/managers/user/GuildUserManager.ts +0 -116
  119. package/v1/rest/APIEndpoints.ts +0 -11
  120. package/v1/rest/REST.ts +0 -126
  121. package/v1/rest/Routes.ts +0 -143
  122. package/v1/structures/Collection.ts +0 -85
  123. package/v1/structures/bet/GuildBet.ts +0 -332
  124. package/v1/structures/betuser/GuildBetUser.ts +0 -247
  125. package/v1/structures/channel/Channel.ts +0 -78
  126. package/v1/structures/groupedchannel/GroupedChannel.ts +0 -165
  127. package/v1/structures/guild/Guild.ts +0 -302
  128. package/v1/structures/match/GuildMatch.ts +0 -385
  129. package/v1/structures/mediator/GuildMediator.ts +0 -175
  130. package/v1/structures/product/GuildProduct.ts +0 -217
  131. package/v1/structures/shop/GuildShop.ts +0 -98
  132. package/v1/structures/ticket/GuildTicket.ts +0 -227
  133. package/v1/structures/user/GuildUser.ts +0 -248
  134. package/v1/types/api/APIBaseChannel.ts +0 -13
  135. package/v1/types/api/APIBetChannel.ts +0 -13
  136. package/v1/types/api/APIBetMessage.ts +0 -13
  137. package/v1/types/api/APIGuild.ts +0 -123
  138. package/v1/types/api/APIGuildBet.ts +0 -69
  139. package/v1/types/api/APIGuildBetUser.ts +0 -46
  140. package/v1/types/api/APIGuildChannel.ts +0 -13
  141. package/v1/types/api/APIGuildEmoji.ts +0 -16
  142. package/v1/types/api/APIGuildGroupedChannel.ts +0 -13
  143. package/v1/types/api/APIGuildMatch.ts +0 -67
  144. package/v1/types/api/APIGuildMediator.ts +0 -18
  145. package/v1/types/api/APIGuildMessage.ts +0 -13
  146. package/v1/types/api/APIGuildPermissions.ts +0 -7
  147. package/v1/types/api/APIGuildRole.ts +0 -13
  148. package/v1/types/api/APIGuildShop.ts +0 -15
  149. package/v1/types/api/APIGuildTicket.ts +0 -36
  150. package/v1/types/api/APIGuildUser.ts +0 -45
  151. package/v1/types/api/APIMessage.ts +0 -16
  152. package/v1/types/api/APIPlayer.ts +0 -13
  153. package/v1/types/api/APIProduct.ts +0 -27
  154. package/v1/types/api/index.ts +0 -180
  155. package/v1/utils/Assertion.ts +0 -56
@@ -0,0 +1,82 @@
1
+ import { REST } from "../../rest/REST";
2
+ import { Accessory, Daily, Items, Optional, OriginalChannels } from "../../types/api";
3
+ import { APIGuildUser } from "../../types/api/APIGuildUser";
4
+ import { GuildUserManager } from "../../managers/user/GuildUserManager";
5
+ export declare class GuildUser implements APIGuildUser {
6
+ /** User's id */
7
+ id: string;
8
+ /** User name */
9
+ name: string;
10
+ /** User's daily */
11
+ daily: Omit<Daily, "credit">;
12
+ /** User's points */
13
+ points: number;
14
+ /** User's wins */
15
+ wins: number;
16
+ /** User's mvps */
17
+ mvps: number;
18
+ /** User's losses */
19
+ losses: number;
20
+ /** User's games */
21
+ games: number;
22
+ /** If user is blacklisted */
23
+ blacklist: boolean;
24
+ /** User's accessories such as double point */
25
+ accessories: Accessory[];
26
+ /** User's original channels */
27
+ originalChannels: OriginalChannels;
28
+ /** User's items */
29
+ items: Items;
30
+ /** Creation Date */
31
+ createdAt: Date;
32
+ /** Updated Date */
33
+ updatedAt: Date;
34
+ /** The given manager */
35
+ readonly manager: GuildUserManager;
36
+ /** The rest client */
37
+ readonly rest: REST;
38
+ /**
39
+ * Bet user
40
+ * @param data The user's data
41
+ * @param manager The manager
42
+ * @param rest The rest client
43
+ */
44
+ constructor(data: APIGuildUser, manager: GuildUserManager, rest: REST);
45
+ /** String representation of this user */
46
+ toString(): string;
47
+ /**
48
+ * Fetches the user
49
+ * @returns New Instance of the user
50
+ */
51
+ fetch(): Promise<GuildUser>;
52
+ /**
53
+ * Add a propery
54
+ * @param key The desired key
55
+ * @param value The desired value
56
+ * @returns GuildUser
57
+ */
58
+ add<K extends keyof UserAddOptions, V extends UserAddOptions[K]>(key: K, value: V): Promise<this>;
59
+ /**
60
+ * Set the user blacklist
61
+ * @param value Value to set to
62
+ * @returns GuildUser
63
+ */
64
+ setBlacklist(value: boolean): Promise<this>;
65
+ /**
66
+ * Update certain property
67
+ * @param data The new data to update with
68
+ * @returns
69
+ */
70
+ update(data: Omit<Optional<APIGuildUser>, "daily"> & {
71
+ type?: "add" | "remove";
72
+ }): Promise<this>;
73
+ delete(): Promise<boolean>;
74
+ toJSON(): Record<keyof GuildUser, unknown>;
75
+ }
76
+ export interface UserAddOptions extends APIGuildUser {
77
+ coins: number;
78
+ points: number;
79
+ wins: number;
80
+ losses: number;
81
+ mvps: number;
82
+ }
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuildUser = void 0;
4
+ const Routes_1 = require("../../rest/Routes");
5
+ class GuildUser {
6
+ /** User's id */
7
+ id;
8
+ /** User name */
9
+ name;
10
+ /** User's daily */
11
+ daily;
12
+ /** User's points */
13
+ points;
14
+ /** User's wins */
15
+ wins;
16
+ /** User's mvps */
17
+ mvps;
18
+ /** User's losses */
19
+ losses;
20
+ /** User's games */
21
+ games;
22
+ /** If user is blacklisted */
23
+ blacklist;
24
+ /** User's accessories such as double point */
25
+ accessories;
26
+ /** User's original channels */
27
+ originalChannels;
28
+ /** User's items */
29
+ items;
30
+ /** Creation Date */
31
+ createdAt;
32
+ /** Updated Date */
33
+ updatedAt;
34
+ /** The given manager */
35
+ manager;
36
+ /** The rest client */
37
+ rest;
38
+ /**
39
+ * Bet user
40
+ * @param data The user's data
41
+ * @param manager The manager
42
+ * @param rest The rest client
43
+ */
44
+ constructor(data, manager, rest) {
45
+ this.name = data.name;
46
+ this.id = data.id;
47
+ this.wins = data.wins;
48
+ this.mvps = data.mvps;
49
+ this.losses = data.losses;
50
+ this.blacklist = data.blacklist;
51
+ this.items = data.items;
52
+ this.points = data.points;
53
+ this.mvps = data.mvps;
54
+ this.losses = data.losses;
55
+ this.originalChannels = data.originalChannels;
56
+ this.games = data.games;
57
+ this.accessories = data.accessories;
58
+ this.items = data.items;
59
+ this.daily = data?.daily;
60
+ this.createdAt = data?.createdAt ? new Date(data?.createdAt) : new Date();
61
+ this.updatedAt = data?.updatedAt ? new Date(data?.updatedAt) : new Date();
62
+ this.manager = manager;
63
+ this.rest = rest;
64
+ }
65
+ /** String representation of this user */
66
+ toString() {
67
+ return `<@${this.id}>`;
68
+ }
69
+ /**
70
+ * Fetches the user
71
+ * @returns New Instance of the user
72
+ */
73
+ async fetch() {
74
+ const route = Routes_1.Routes.guilds.users.get(this.manager.guild.id, this.id);
75
+ const response = await this.rest.request({
76
+ method: "get",
77
+ url: route,
78
+ });
79
+ const user = new GuildUser(response, this.manager, this.rest);
80
+ this.manager.cache.set(user.id, user);
81
+ this.rest.users.set(user.id, user);
82
+ return user;
83
+ }
84
+ /**
85
+ * Add a propery
86
+ * @param key The desired key
87
+ * @param value The desired value
88
+ * @returns GuildUser
89
+ */
90
+ async add(key, value) {
91
+ const route = Routes_1.Routes.guilds.users.resource(this.manager.guild.id, this.id, key);
92
+ const payload = { [key]: value, name: this.name };
93
+ const resp = await this.rest.request({
94
+ method: "patch",
95
+ url: route,
96
+ payload,
97
+ });
98
+ this[key] = resp[key];
99
+ this.manager.cache.set(this.id, this);
100
+ this.rest.users.set(this.id, this);
101
+ return this;
102
+ }
103
+ /**
104
+ * Set the user blacklist
105
+ * @param value Value to set to
106
+ * @returns GuildUser
107
+ */
108
+ async setBlacklist(value) {
109
+ const route = Routes_1.Routes.guilds.users.resource(this.manager.guild.id, this.id, "blacklist");
110
+ const payload = { value, name: this.name };
111
+ await this.rest.request({
112
+ method: "patch",
113
+ url: route,
114
+ payload,
115
+ });
116
+ this.blacklist = value;
117
+ this.manager.cache.set(this.id, this);
118
+ this.rest.users.set(this.id, this);
119
+ return this;
120
+ }
121
+ /**
122
+ * Update certain property
123
+ * @param data The new data to update with
124
+ * @returns
125
+ */
126
+ async update(data) {
127
+ if (!data.type)
128
+ data.type = 'add';
129
+ const route = Routes_1.Routes.guilds.users.get(this.manager.guild.id, this.id);
130
+ const payload = {};
131
+ const numericFields = ["coins", "wins", "points", "losses", "mvps", "games"];
132
+ const arrayFields = ["items", "originalChannels"];
133
+ if (data.type === "add" || data.type === "remove") {
134
+ for (const key in data) {
135
+ if (key === "type")
136
+ continue;
137
+ console.log({ wdwdqwdqwdwqdwd: false });
138
+ const value = data[key];
139
+ if (numericFields.includes(key)) {
140
+ const current = this[key];
141
+ const num = value;
142
+ payload[key] = Math.max(0, data.type === "add" ? current + num : num - current);
143
+ }
144
+ else if (key === "blacklist") {
145
+ payload["blacklist"] = value;
146
+ }
147
+ else if (arrayFields.includes(key)) {
148
+ if (key === "originalChannels") {
149
+ const current = this.originalChannels;
150
+ const fromData = data["originalChannels"];
151
+ let channels = [];
152
+ if (data.type === "add") {
153
+ const existingIds = new Set(current.map((ch) => ch.matchId));
154
+ channels = [...current, ...fromData.filter((ch) => !existingIds.has(ch.matchId))];
155
+ }
156
+ else if (data.type === "remove") {
157
+ const idsToRemove = new Set(fromData.map((ch) => ch.matchId));
158
+ channels = current.filter((ch) => !idsToRemove.has(ch.matchId));
159
+ }
160
+ payload["originalChannels"] = channels;
161
+ continue;
162
+ }
163
+ const current = this[key];
164
+ const incoming = value;
165
+ payload[key] =
166
+ data.type === "add"
167
+ ? [...new Set([...current, ...incoming])]
168
+ : current.filter((x) => !incoming.includes(x));
169
+ }
170
+ }
171
+ }
172
+ const response = await this.rest.request({
173
+ method: "patch",
174
+ url: route,
175
+ payload,
176
+ });
177
+ for (const k in response) {
178
+ if (k === "id")
179
+ continue;
180
+ if (Object.hasOwn(this, k)) {
181
+ this[k] = response[k];
182
+ }
183
+ }
184
+ this.rest.users.set(this.id, this);
185
+ this.manager.cache.set(this.id, this);
186
+ return this;
187
+ }
188
+ async delete() {
189
+ const route = Routes_1.Routes.guilds.users.delete(this.manager.guild.id, this.id);
190
+ const response = await this.rest.request({
191
+ method: "DELETE",
192
+ url: route,
193
+ });
194
+ this.rest.emit("betUserDelete", this);
195
+ this.manager.cache.delete(this.id);
196
+ this.rest.users.set(this.id, this);
197
+ return response;
198
+ }
199
+ toJSON() {
200
+ let json;
201
+ for (const [key, value] of Object.entries(this)) {
202
+ if (typeof value !== "function") {
203
+ json[key] = value;
204
+ }
205
+ }
206
+ return json;
207
+ }
208
+ }
209
+ exports.GuildUser = GuildUser;
@@ -0,0 +1,10 @@
1
+ export interface APIBaseChannel {
2
+ /** Channel's type */
3
+ type: string;
4
+ /** Channel's id */
5
+ id: string;
6
+ /** Creation Date */
7
+ createdAt?: Date;
8
+ /** Updated Date */
9
+ updatedAt?: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export interface APIBetChannel {
2
+ /** Channel's type */
3
+ type: string;
4
+ /** Channel's id */
5
+ id: string;
6
+ /** Creation Date */
7
+ createdAt: Date;
8
+ /** Updated Date */
9
+ updatedAt: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export interface APIBetMessage {
2
+ /** Message's type */
3
+ type: string;
4
+ /** Message's id */
5
+ id: string[];
6
+ /** Creation Date */
7
+ createdAt: Date;
8
+ /** Updated Date */
9
+ updatedAt: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,92 @@
1
+ import { APITicketCategory, GuildBlacklist } from ".";
2
+ import { APIGuildBet } from "./APIGuildBet";
3
+ import { APIGuildBetUser } from "./APIGuildBetUser";
4
+ import { APIGuildEmoji } from "./APIGuildEmoji";
5
+ import { APIGuildGroupedChannel } from "./APIGuildGroupedChannel";
6
+ import { APIGuildMatch } from "./APIGuildMatch";
7
+ import { APIGuildMediator } from "./APIGuildMediator";
8
+ import { APIGuildPermissions } from "./APIGuildPermissions";
9
+ import { APIGuildRole } from "./APIGuildRole";
10
+ import { APIGuildShop } from "./APIGuildShop";
11
+ import { APIGuildTicket } from "./APIGuildTicket";
12
+ import { APIGuildUser } from "./APIGuildUser";
13
+ import { APIMessage } from "./APIMessage";
14
+ /** Ticket's configuration */
15
+ export interface GuildTicketConfiguration {
16
+ /** Guild's categories */
17
+ categories: APITicketCategory;
18
+ }
19
+ export interface GuildStatus {
20
+ /** Matches status */
21
+ matches: "on" | "off";
22
+ /** Bets status */
23
+ bets: "on" | "off";
24
+ /** Daily Ranking status */
25
+ dailyRank: "on" | "off";
26
+ /** Voice Channels for a bet */
27
+ createVoiceChannels: "on" | "off";
28
+ }
29
+ export interface GuildScores {
30
+ /** Win */
31
+ win: number;
32
+ /** Loss */
33
+ loss: number;
34
+ /** Mvp */
35
+ mvp: number;
36
+ /** Coin */
37
+ coin: number;
38
+ /** Creator */
39
+ creator: number;
40
+ }
41
+ export interface APIGuild {
42
+ /** Guild's id */
43
+ id: string;
44
+ /** Guild's client key */
45
+ clientKey: string;
46
+ /** Guild Permissions */
47
+ permissions: APIGuildPermissions;
48
+ /** Guild Ticket */
49
+ tickets: APIGuildTicket[];
50
+ /** Guild Ticket Configuration */
51
+ ticketsConfiguration: GuildTicketConfiguration;
52
+ /** Guild Daily Categories */
53
+ dailyCategories: ["coins", "credit"];
54
+ /** Guild Scores */
55
+ scores: GuildScores;
56
+ /** Guild Status */
57
+ status: GuildStatus;
58
+ /** Guild Channel */
59
+ channels: APIGuildGroupedChannel[];
60
+ /** Guild Categories */
61
+ categories: APIGuildGroupedChannel[];
62
+ /** Guild Blacklist */
63
+ blacklist: GuildBlacklist;
64
+ /** Guild Prefix */
65
+ prefix: string;
66
+ /** Guild Prices */
67
+ pricesAvailable: number[];
68
+ /** Guild Prices Used */
69
+ pricesOn: number[];
70
+ /** Guild Creation Date */
71
+ createdAt: Date;
72
+ /** Guild Updated Date */
73
+ updatedAt: Date;
74
+ /** Guild Bets */
75
+ bets: APIGuildBet[];
76
+ /** Guild Users */
77
+ users: APIGuildUser[];
78
+ /** Guild Bet Users */
79
+ betUsers: APIGuildBetUser[];
80
+ /** Guild Matches */
81
+ matches: APIGuildMatch[];
82
+ /** Guild Mediators */
83
+ mediators: APIGuildMediator[];
84
+ /** Guild Messages */
85
+ messages: APIMessage[];
86
+ /** Guild Emojis */
87
+ emojis: APIGuildEmoji[];
88
+ /** Guild Roles */
89
+ roles: APIGuildRole[];
90
+ /** Guild Shop */
91
+ shop: APIGuildShop;
92
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,48 @@
1
+ import { BaseMatchModes, Confirm, Logs } from ".";
2
+ import { APIBetChannel } from "./APIBetChannel";
3
+ import { APIMessage } from "./APIMessage";
4
+ import { APIPlayer } from "./APIPlayer";
5
+ export interface APIGuildBet {
6
+ /** The bet's type */
7
+ type: Omit<BaseMatchModes, "5x5" | "6x6" | "5v5" | "6v6">;
8
+ /** The bet's mode */
9
+ mode: "misto" | "emu" | "mob" | "MISTO" | "EMU" | "MOB";
10
+ /** The bet's status */
11
+ status: "off" | "created" | "on" | "shutted" | "waiting";
12
+ /** The bet's maximum size */
13
+ maximumSize: number;
14
+ /** The bet's price */
15
+ price: number;
16
+ /** Who has payed the bet */
17
+ payedBy: APIPlayer[];
18
+ /** The bet's players */
19
+ players: APIPlayer[];
20
+ /** An array of team a */
21
+ teamA: APIPlayer[];
22
+ /** An array of team b */
23
+ teamB: APIPlayer[];
24
+ /** The bet's channel */
25
+ channels: APIBetChannel[];
26
+ /** The bet's messages */
27
+ messages: APIMessage[];
28
+ /** The id of the winner */
29
+ winner: string;
30
+ /** The id of the loser */
31
+ loser: string;
32
+ /** The bet's creator id */
33
+ creatorId: string;
34
+ /** The bet's mediator */
35
+ mediatorId: string;
36
+ /** The bet's confirmers */
37
+ confirmed: Confirm[];
38
+ /** The bet's embed id */
39
+ embedMessageId: string;
40
+ /** The bet's logs */
41
+ logs: Logs;
42
+ /** Creation Date */
43
+ createdAt: Date;
44
+ /** Updated Date */
45
+ updatedAt: Date;
46
+ /** Bet's id */
47
+ _id: string;
48
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { Daily, Items, ProfileCard } from ".";
2
+ /** Bet user */
3
+ export interface APIGuildBetUser {
4
+ /** User daily */
5
+ daily: Omit<Daily, "points">;
6
+ /** User's name */
7
+ name: string;
8
+ /** User's name */
9
+ id: string;
10
+ /** User's credit */
11
+ credit: number;
12
+ /** User's wins */
13
+ wins: number;
14
+ /** User's mvps */
15
+ mvps: number;
16
+ /** User's losses */
17
+ losses: number;
18
+ /** User's bets played */
19
+ betsPlayed: string[];
20
+ /** User's blacklist */
21
+ blacklist: boolean;
22
+ /** User's coins */
23
+ coins: number;
24
+ /** User's items */
25
+ items: Items;
26
+ /** User's profile card */
27
+ profileCard: ProfileCard;
28
+ /** Creation Date */
29
+ createdAt: Date;
30
+ /** Updated Date */
31
+ updatedAt: Date;
32
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export interface APIGuildChannel {
2
+ /** Channel's type */
3
+ type: string;
4
+ /** Channel's ids */
5
+ ids: string[];
6
+ /** Creation Date */
7
+ createdAt: Date;
8
+ /** Updated Date */
9
+ updatedAt: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export interface APIGuildEmoji {
2
+ /** Emoji's id */
3
+ id: string;
4
+ /** Emoji's type */
5
+ type: string;
6
+ /** Animated */
7
+ animated: boolean;
8
+ /** Creation Date */
9
+ createdAt: Date;
10
+ /** Updated Date */
11
+ updatedAt: Date;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export interface APIGuildGroupedChannel {
2
+ /** Channel's type */
3
+ type: string;
4
+ /** Channel's ids */
5
+ ids: string[];
6
+ /** Creation Date */
7
+ createdAt: Date;
8
+ /** Updated Date */
9
+ updatedAt: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,46 @@
1
+ import { BaseMatchModes, BaseMatchStatus, Confirm } from ".";
2
+ import { APIBaseChannel } from "./APIBaseChannel";
3
+ import { APIMessage } from "./APIMessage";
4
+ import { APIPlayer } from "./APIPlayer";
5
+ export interface APIGuildMatch {
6
+ /** Match's type */
7
+ type: BaseMatchModes;
8
+ /** Match's status */
9
+ status: BaseMatchStatus;
10
+ /** Match's challenge */
11
+ challenge: boolean;
12
+ /** Match's players */
13
+ players: APIPlayer[];
14
+ /** Match's winners */
15
+ winners: APIPlayer[];
16
+ /** Match's losers */
17
+ losers: APIPlayer[];
18
+ /** Match;s messages */
19
+ messages: APIMessage[];
20
+ /** Matches channels */
21
+ channels: APIBaseChannel[];
22
+ /** Match's maximum size */
23
+ maximumSize: number;
24
+ /** Match's kicked out */
25
+ kickedOut: APIPlayer[];
26
+ /** Match's team a */
27
+ teamA: APIPlayer[];
28
+ /** Match's team b */
29
+ teamB: APIPlayer[];
30
+ /** Match's confirmed */
31
+ confirmed: Confirm[];
32
+ /** Match's leaders */
33
+ leaders: APIPlayer[];
34
+ /** Match's mvp */
35
+ mvpId: string;
36
+ /** Match's creator id */
37
+ creatorId: string;
38
+ /** Match's room creator id */
39
+ roomCreatorId: string;
40
+ /** Creation Date */
41
+ createdAt: Date;
42
+ /** Updated Date */
43
+ updatedAt: Date;
44
+ /** Match's id */
45
+ _id: string;
46
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { APIPlayer } from "./APIPlayer";
2
+ export interface APIGuildMediator extends APIPlayer {
3
+ /** Mediator's id */
4
+ id: string;
5
+ /** Mediator's name */
6
+ name: string;
7
+ /** Mediator's links */
8
+ paymentLinks: string[];
9
+ /** Creation Date */
10
+ createdAt: Date;
11
+ /** Updated Date */
12
+ updatedAt: Date;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -0,0 +1,10 @@
1
+ export interface APIGuildMessage {
2
+ /** Message's type */
3
+ type: string;
4
+ /** Message's ids */
5
+ ids: string[];
6
+ /** Creation Date */
7
+ createdAt: Date;
8
+ /** Updated Date */
9
+ updatedAt: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface APIGuildPermissions {
2
+ manage_bot: string[];
3
+ manage_rooms: string[];
4
+ manage_scores: string[];
5
+ manage_bets: string[];
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });