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#

BADGES

BADGE_LIST

CHATTERBOX_LEVEL

FOUNDING_MEMBER_CUTOFF_ISO

Members confirmed on the roster before this instant (the launch date, UTC midnight) earn Founding Member.

PERFECT_MONTH_MIN_RAIDS

RAID_REGULAR_THRESHOLD

RAID_VETERAN_THRESHOLD

Classes#

BadgeAck

Body for POST /api/guilds/{id}/badges/ack: badges whose announcement has posted.

BadgeDefinition

One badge's fixed metadata. color is a Discord role color (0xRRGGBB).

BadgeRoleState

One member's current badge ids, for the bot's role sync (GET /api/guilds/{id}/badges/state).

BadgeSyncReport

GET /api/guilds/{id}/badges/sync: recomputes every member's badges, then reports the result.

EarnedBadge

One badge a member has earned, for the profile's badge case.

PendingBadgeAnnouncement

A newly earned badge not yet announced in Discord.

Module Contents#

class sidequest_common.schemas.badges.BadgeAck#

Bases: pydantic.BaseModel

Body 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.BaseModel

One badge’s fixed metadata. color is a Discord role color (0xRRGGBB).

color: int#
description: str#
icon: str#
id: str#
name: str#
class sidequest_common.schemas.badges.BadgeRoleState#

Bases: pydantic.BaseModel

One 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.BaseModel

GET /api/guilds/{id}/badges/sync: recomputes every member’s badges, then reports the result.

role_state is every linked member’s full current badge set (the bot diffs this against actual role membership). pending is newly earned badges not yet announced; the bot posts them, then calls POST /api/guilds/{id}/badges/ack to mark them announced.

pending: list[PendingBadgeAnnouncement]#
role_state: list[BadgeRoleState]#
class sidequest_common.schemas.badges.EarnedBadge#

Bases: pydantic.BaseModel

One 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.BaseModel

A 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#