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