Skip to content

Commit

Permalink
user: Display count of observations with annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
synrg committed Jun 21, 2024
1 parent c31e079 commit e086b78
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions inatcog/embeds/inat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,15 @@ async def make_user_embed(self, ctx, member, user):
ids = user.identifications_count
url = f"[{ids:,}]({WWW_BASE_URL}/identifications?user_id={user.id})"
embed.add_field(name="Ids", value=url, inline=True)
try:
annotations = user.annotated_observations_count
except AttributeError:
annotations = 0
url = (
f"[{annotations:,}]({WWW_BASE_URL}/observations"
f"?annotation_user_id={user.id}&place_id=any&verifiable=any)"
)
embed.add_field(name="Annotations", value=url, inline=True)
return embed

async def make_stats_embed(self, member, user, project):
Expand Down

0 comments on commit e086b78

Please sign in to comment.