MCPcopy Create free account
hub / github.com/codebymitch/TitanBot / formatRatingStars

Function formatRatingStars

src/utils/logEmbeds.js:100–108  ·  view source on GitHub ↗
(rating)

Source from the content-addressed store, hash-verified

98}
99
100export function formatRatingStars(rating) {
101 const numeric = Number(rating);
102 if (!Number.isFinite(numeric) || numeric < 1) {
103 return null;
104 }
105
106 const clamped = Math.min(5, Math.max(1, Math.round(numeric)));
107 return `${'⭐'.repeat(clamped)} (${clamped}/5)`;
108}
109
110export async function resolveUserAuthor(client, userId) {
111 if (!userId) {

Callers 1

createTicketLogEmbedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected