Skip to content

Commit

Permalink
bring back town flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Jul 8, 2024
1 parent e9e3de6 commit c817674
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
16 changes: 9 additions & 7 deletions aurora/commands/town.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ export default {
if (!town) return m.edit({embeds: [new EmbedBuilder()
.setTitle("Invalid town name!")
.setDescription(opt + " doesn't seem to be a valid town name, please try again.")
.setTimestamp().setColor(Colors.Red)
.setColor(Colors.Red)
.setTimestamp()
]}).then(m => setTimeout(() => m.delete(), 10000)).catch(() => {})

towns = defaultSort(towns)
Expand Down Expand Up @@ -335,7 +336,7 @@ export default {
))
}
else townEmbed.addFields(embedField("Residents", townResidentsLength.toString()))
}
}
else townEmbed.addFields(embedField("Residents", "There are no residents in this town?"))

const townCouncillorsLen = town.councillors.length
Expand Down Expand Up @@ -373,13 +374,14 @@ export default {
// }
}

// const [green, red] = ["<:green_tick:1036290473708495028>", "<:red_tick:1036290475012915270>"]
// townEmbed.addFields(embedField("Flags", `
// ${town.flags.pvp ? green : red } PVP
// `))
const [green, red] = ["<:green_tick:1036290473708495028>", "<:red_tick:1036290475012915270>"]
townEmbed.addFields(embedField("Flags", `
${town.flags.pvp ? green : red } PVP
${town.flags.public ? green : red } Public
`))

// ${town.mobs ? green : red } Mobs
// ${town.public? green : red } Public
// ${town.public ? green : red } Public
// ${town.explosion ? green : red } Explosions
// ${town.fire ? green : red } Fire Spread

Expand Down
9 changes: 5 additions & 4 deletions aurora/slashcommands/town.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,11 @@ export default {
// //#endregion
}

// const [green, red] = ["<:green_tick:1036290473708495028>", "<:red_tick:1036290475012915270>"]
// townEmbed.addFields(embedField("Flags", `
// ${town.flags.pvp ? green : red } PVP
// `))
const [green, red] = ["<:green_tick:1036290473708495028>", "<:red_tick:1036290475012915270>"]
townEmbed.addFields(embedField("Flags", `
${town.flags.pvp ? green : red } PVP
${town.flags.public ? green : red } Public
`))

// ${town.flags.mobs ? green : red } Mobs
// ${town.flags.public ? green : red } Public
Expand Down
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"reinstall": "rimraf node_modules && bun install",
"start-js": "bun run compile && node ./dist/index.js",
"start": "tsx index.ts",
"stop": "pm2 stop EMCS",
"reload": "pm2 startOrGracefulReload --attach ecosystem.json",
"restart": "bun run reinstall && pm2 startOrRestart ecosystem.json",
"deploy": "pm2 deploy production"
Expand All @@ -18,7 +19,7 @@
"@isaacs/ttlcache": "^1.4.1",
"discord.js": "14.13.0",
"dotenv": "^16.4.5",
"earthmc": "9.6.0",
"earthmc": "9.7.0",
"firebase": "10.12.3",
"firebase-admin": "12.2.0",
"moment": "^2.29.4",
Expand Down

0 comments on commit c817674

Please sign in to comment.