Skip to content

Commit

Permalink
Update resident.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Oct 13, 2024
1 parent be93161 commit ae0c1c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aurora/common/resident.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const buildSkinURL = (opts: SkinOpts) => {
return `${domain}${opts.view}/${opts.subject}.png${params}`
}

const defaultAbout = "/res set about [msg]"

class ResidentHelper extends BaseHelper {
dbResident: DBResident | Resident = null

Expand Down Expand Up @@ -65,6 +67,7 @@ class ResidentHelper extends BaseHelper {

let res: V3Player
try {
// This is currently necessary bc the return type from EMC-NPM is not accurate.
const arr = await OfficialAPI.V3.players(arg1) as unknown as V3Player[]
res = arr[0]
} catch (e) {
Expand Down Expand Up @@ -110,7 +113,7 @@ class ResidentHelper extends BaseHelper {

this.embed.setTitle(`Resident Info | \`${res.name}\``)

if (res.about) {
if (res.about && res.about != defaultAbout) {
this.embed.setDescription(`*${res.about}*`)
}

Expand Down

0 comments on commit ae0c1c1

Please sign in to comment.