Skip to content

Commit

Permalink
add tiny crown (v important)
Browse files Browse the repository at this point in the history
  • Loading branch information
drcatdoctor committed Jan 4, 2021
1 parent 36a9f89 commit 58ec672
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/bot/GuildWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,15 @@ export class GuildWorker {
strings = strings.concat(rankedPlayers.map(ranking => {
const pl = ranking.item;
const rank = ranking.rank;
var playerNameString = pl.user.displayName;
if (pl.previousYearWinner) {
playerNameString = playerNameString + "👑";
}
if (pl.publisher == null) {
return `.. No publisher defined (${pl.user.displayName}) - n/a points`;
return `.. No publisher defined (${playerNameString}) - n/a points`;
}
else {
return `**${rank}. ${pl.publisher.publisherName}** (${pl.publisher.playerName}) - ` +
return `**${rank}. ${pl.publisher.publisherName}** (${playerNameString}) - ` +
`**${Math.round(pl.totalFantasyPoints * 100) / 100} points**`;
}
}));
Expand Down
7 changes: 6 additions & 1 deletion src/fc/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export interface PublisherGame extends Game {
}

export interface Publisher {
autoDraft: boolean,
averageCriticScore?: number,
publisherName: string,
playerName: string,
games: PublisherGame[],
Expand All @@ -80,8 +82,10 @@ export interface Publisher {
leagueName: string,
nextToDraft: boolean,
oustandingInvite: boolean,
publicLeague: boolean,
publisherID: string,
totalProjectedPoints: number
year: number
// missing some
}

Expand Down Expand Up @@ -133,7 +137,8 @@ export interface Player {
totalFantasyPoints: number,
simpleProjectedFantasyPoints: number,
advancedProjectedFantasyPoints: number,
user: User
user: User,
previousYearWinner: boolean
}

export interface User {
Expand Down

0 comments on commit 58ec672

Please sign in to comment.