gamerbot-module 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/classes/models.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConfigData } from "./ConfigData.js";
|
|
2
2
|
import { GuildData } from "./GuildData.js";
|
|
3
|
+
import { MinecraftData } from "./MinecraftData.js";
|
|
3
4
|
import { UserData } from "./UserData.js";
|
|
4
5
|
export declare class Models {
|
|
5
6
|
cachedUsersFrames: Map<string, UserFrameData>;
|
|
@@ -39,6 +40,10 @@ export declare class Models {
|
|
|
39
40
|
* Gets frame image
|
|
40
41
|
*/
|
|
41
42
|
getFrame(frameId: string): Promise<Buffer<ArrayBuffer>>;
|
|
43
|
+
/**
|
|
44
|
+
* Get all Minecraft users linked to Discord accounts
|
|
45
|
+
*/
|
|
46
|
+
getAllMinecraftUsers(): Promise<MinecraftData[]>;
|
|
42
47
|
private fetchData;
|
|
43
48
|
}
|
|
44
49
|
interface FrameConfigElement {
|
package/dist/classes/models.js
CHANGED
|
@@ -110,6 +110,13 @@ export class Models {
|
|
|
110
110
|
const data = (await this.fetchData(GamerBotAPI.API_URL + "/public_api/frame/" + frameId, "GET", null, false));
|
|
111
111
|
return Buffer.from(await data.arrayBuffer());
|
|
112
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Get all Minecraft users linked to Discord accounts
|
|
115
|
+
*/
|
|
116
|
+
async getAllMinecraftUsers() {
|
|
117
|
+
const data = await this.fetchData(GamerBotAPI.API_URL + "/api/user/minecraft/data/", "GET");
|
|
118
|
+
return data;
|
|
119
|
+
}
|
|
113
120
|
fetchData(url, method = "GET",
|
|
114
121
|
// eslint-disable-next-line
|
|
115
122
|
jsonData = null, convertToJson = true) {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED