Skip to content

Commit

Permalink
update to NPM 9.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Jun 24, 2024
1 parent a574142 commit c3ad566
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bot/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
SharedNameAndDescription
} from "discord.js"

import { Map } from "earthmc"
import { Dynmap, Squaremap } from "earthmc"
import { Timestamp, WriteResult } from "firebase-admin/firestore"

export type BaseCommand = {
Expand Down Expand Up @@ -43,7 +43,7 @@ export type DJSEvent = {
}

export type MapInstance = {
emc: Map,
emc: Squaremap | Dynmap,
db: MapDB
}

Expand Down
8 changes: 4 additions & 4 deletions bot/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,10 +485,10 @@ async function updateFallenTowns(map: MapInstance) {
}

for (let i = 0; i < fallenTownsLen; i++) {
const town = fallenTowns[i],
residentBatch1 = [],
residentBatch2 = [],
mayor = town.mayor.replace(/_/g, "\\_")
const town = fallenTowns[i]
const residentBatch1 = []
const residentBatch2 = []
const mayor = town.mayor.replace(/_/g, "\\_")

const route = await Aurora.GPS.fastestRoute({ x: town.x, z: town.z })
const desc = `Type **/n spawn ${route.nation.name}** and head **${route.direction}** for **${route.distance}** blocks.`
Expand Down
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions common/resident.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import striptags from 'striptags'
import * as MC from '../bot/utils/minecraft.js'
import * as database from '../bot/utils/database.js'

import {
import {
OfficialAPI,
Nova, Aurora,
type OAPIResident,
Expand Down Expand Up @@ -73,14 +73,14 @@ class ResidentHelper extends BaseHelper {
if (!this.isNova) {
let res: OAPIResident
try {
res = await OfficialAPI.resident(arg1)
res = await OfficialAPI.V2.resident(arg1)
} catch (e) {
console.log(e)
return false
}

if (res.town) {
const resTown = await OfficialAPI.town(res.town.toLowerCase())
const resTown = await OfficialAPI.V2.town(res.town.toLowerCase())

let rank = resTown.mayor == res.name ? "Mayor" : "Resident"
if (rank == "Mayor" && resTown.status.isCapital)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"discord.js": "14.13.0",
"dotenv": "^16.4.5",
"earthmc": "^8.3.4",
"earthmc": "9.2.0",
"firebase": "latest",
"firebase-admin": "latest",
"koyeb.js": "^4.2.3",
Expand Down

0 comments on commit c3ad566

Please sign in to comment.