mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 06:18:03 +03:00
feat: announce target achievements
This commit is contained in:
@@ -12,6 +12,7 @@ import type {
|
||||
integer,
|
||||
PBScoreDocument,
|
||||
Playtype,
|
||||
QuestDocument,
|
||||
SongDocument,
|
||||
UserDocument,
|
||||
} from "tachi-common";
|
||||
@@ -54,6 +55,19 @@ export async function GetGoalWithID(goalID: string, game: Game, playtype: Playty
|
||||
return res.body;
|
||||
}
|
||||
|
||||
export async function GetQuestWithID(questID: string, game: Game, playtype: Playtype) {
|
||||
const res = await TachiServerV1Get<QuestDocument>(
|
||||
`/games/${game}/${playtype}/targets/quests/${questID}`,
|
||||
null
|
||||
);
|
||||
|
||||
if (!res.success) {
|
||||
throw new Error(`Failed to fetch goal with ID ${questID}. '${res.description}'.`);
|
||||
}
|
||||
|
||||
return res.body;
|
||||
}
|
||||
|
||||
export async function GetChartInfoForUser(
|
||||
userID: integer | string,
|
||||
chartID: string,
|
||||
|
||||
Reference in New Issue
Block a user