Skip to content

Commit

Permalink
switch to a different api
Browse files Browse the repository at this point in the history
  • Loading branch information
TsFreddie committed Jan 18, 2025
1 parent 733246c commit 21c9f90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/server/bots/handlers/maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ export const handleMaps: Handler = async ({ reply, user, args }) => {
if (user && user.data?.name) {
const playerName = user.data.name;
const response = await fetch(
`https://ddnet.org/players/?json=${encodeURIComponent(playerName)}`
`https://info.ddnet.org/info?name=${encodeURIComponent(playerName)}`
);
if (response.ok) {
try {
const maps = (await response.json()) as string[];
for (const map of maps) {
const maps = (await response.json()) as { maps: string[] };
for (const map of maps.maps) {
finishedList.add(map);
}
usingName = true;
Expand Down

0 comments on commit 21c9f90

Please sign in to comment.