sidequest_common.schemas.badges#
Hall of Heroes badge definitions and earned-badge schemas.
Badges are defined in code, not configured on the site: BADGES is the single source of truth for every badge’s
id, display name, description, icon, and the color its Discord role gets. The bot creates one Discord role per
badge (stored in GuildConfigSchema.badge_role_ids) and keeps membership in sync with MemberBadge rows the
API computes. Adjust thresholds here; nothing else needs to change.
Attributes#
Members confirmed on the roster before this instant (the launch date, UTC midnight) earn Founding Member. |
|
Classes#
Body for |
|
One badge's fixed metadata. |
|
One member's current badge ids, for the bot's role sync ( |
|
|
|
One badge a member has earned, for the profile's badge case. |
|
A newly earned badge not yet announced in Discord. |
Module Contents#
- class sidequest_common.schemas.badges.BadgeAck#
Bases:
pydantic.BaseModelBody for
POST /api/guilds/{id}/badges/ack: badges whose announcement has posted.- badge_id: str#
- discord_id: int#
- class sidequest_common.schemas.badges.BadgeDefinition#
Bases:
pydantic.BaseModelOne badge’s fixed metadata.
coloris a Discord role color (0xRRGGBB).- color: int#
- description: str#
- icon: str#
- id: str#
- name: str#
- class sidequest_common.schemas.badges.BadgeRoleState#
Bases:
pydantic.BaseModelOne member’s current badge ids, for the bot’s role sync (
GET /api/guilds/{id}/badges/state).- badge_ids: list[str]#
- discord_id: int#
- class sidequest_common.schemas.badges.BadgeSyncReport#
Bases:
pydantic.BaseModelGET /api/guilds/{id}/badges/sync: recomputes every member’s badges, then reports the result.role_stateis every linked member’s full current badge set (the bot diffs this against actual role membership).pendingis newly earned badges not yet announced; the bot posts them, then callsPOST /api/guilds/{id}/badges/ackto mark them announced.- pending: list[PendingBadgeAnnouncement]#
- role_state: list[BadgeRoleState]#
- class sidequest_common.schemas.badges.EarnedBadge#
Bases:
pydantic.BaseModelOne badge a member has earned, for the profile’s badge case.
- description: str#
- earned_at: datetime.datetime#
- icon: str#
- id: str#
- model_config#
- name: str#
- class sidequest_common.schemas.badges.PendingBadgeAnnouncement#
Bases:
pydantic.BaseModelA newly earned badge not yet announced in Discord.
- badge_id: str#
- description: str#
- discord_id: int#
- name: str#
- sidequest_common.schemas.badges.BADGES: dict[str, BadgeDefinition]#
- sidequest_common.schemas.badges.BADGE_LIST: tuple[BadgeDefinition, Ellipsis]#
- sidequest_common.schemas.badges.CHATTERBOX_LEVEL = 10#
- sidequest_common.schemas.badges.FOUNDING_MEMBER_CUTOFF_ISO = '2026-11-04T00:00:00+00:00'#
Members confirmed on the roster before this instant (the launch date, UTC midnight) earn Founding Member.
- sidequest_common.schemas.badges.PERFECT_MONTH_MIN_RAIDS = 4#
- sidequest_common.schemas.badges.RAID_REGULAR_THRESHOLD = 10#
- sidequest_common.schemas.badges.RAID_VETERAN_THRESHOLD = 25#