various changes to bot

This commit is contained in:
Ryan Cao 2022-10-18 17:42:04 +08:00
parent a55623fa68
commit 622cbab216
No known key found for this signature in database
5 changed files with 8 additions and 13 deletions

View file

@ -12,6 +12,7 @@ interface SimplifiedGHReleases {
// TODO: caching
export async function getLatestMinecraftVersion(): Promise<string> {
const f = await fetch(
/* CHANGEME */
'https://meta.polymc.org/v1/net.minecraft/package.json'
);
@ -21,6 +22,7 @@ export async function getLatestMinecraftVersion(): Promise<string> {
// TODO: caching
export async function getLatestPolyMCVersion(): Promise<string> {
/* CHANGEME */
const f = await fetch('https://api.github.com/repos/PolyMC/PolyMC/releases');
const versions = (await f.json()) as SimplifiedGHReleases[];