Fix some bugs
This commit is contained in:
parent
2627cc24b1
commit
d6eac632e8
@ -204,7 +204,7 @@ const functions = {
|
|||||||
|
|
||||||
// Determine if this tree is the guild's tree
|
// Determine if this tree is the guild's tree
|
||||||
if (leaderboardEntry.hasPin) {
|
if (leaderboardEntry.hasPin) {
|
||||||
comparisonReplyString += `#{leaderboardEntry.treeRank} - This is your tree`;
|
comparisonReplyString += `#${leaderboardEntry.treeRank} - This is your tree`;
|
||||||
} else { // If it's another guild's tree
|
} else { // If it's another guild's tree
|
||||||
// Calculate the current height difference
|
// Calculate the current height difference
|
||||||
const currentHeightDifference = guildInfo.treeHeight - leaderboardEntry.treeHeight;
|
const currentHeightDifference = guildInfo.treeHeight - leaderboardEntry.treeHeight;
|
||||||
@ -214,10 +214,10 @@ const functions = {
|
|||||||
} else {
|
} else {
|
||||||
comparisonReplyString += `#${leaderboardEntry.treeRank} - ${Math.abs(currentHeightDifference).toFixed(1)}ft shorter`;
|
comparisonReplyString += `#${leaderboardEntry.treeRank} - ${Math.abs(currentHeightDifference).toFixed(1)}ft shorter`;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Build a string using the current leaderboard entry and the historic entry from 24 hours ago
|
// Build a string using the current leaderboard entry and the historic entry from 24 hours ago
|
||||||
comparisonReplyString += ` ${statusIndicator}\n`;
|
comparisonReplyString += ` ${statusIndicator}\n`;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return comparisonReplyString;
|
return comparisonReplyString;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
Loading…
Reference in New Issue
Block a user