sidequest_common.schemas.signup_notices#

New-signup officer notice outbox, and bot-key roster confirmation by Discord id.

The bot polls GET /api/guilds/{guild_id}/signup-notices for members it hasn’t posted a notice embed for yet (pending), and for already-posted notices whose embed is stale because the member was confirmed on the site since (resolved: needs its message edited to say so). POST .../signup-notices/{member_id}/ack tells the API the bot’s message now accurately reflects the member’s state, for both cases.

Classes#

ConfirmByDiscordRequest

Bot -> API: a Discord user (identified by snowflake) is taking a roster-confirmation action.

SignupNoticeAck

Bot -> API: the notice message for this member now accurately reflects their current state.

SignupNoticeCandidate

One member who has never had a signup notice posted for them, oldest first.

SignupNoticeResolution

One posted notice whose message no longer reflects the member's state (confirmed since, e.g. on the site).

SignupNoticesPage

API -> bot: what the signup-notices poll should act on this tick.

Module Contents#

class sidequest_common.schemas.signup_notices.ConfirmByDiscordRequest#

Bases: pydantic.BaseModel

Bot -> API: a Discord user (identified by snowflake) is taking a roster-confirmation action.

actor_name is the clicking user’s live Discord display name, used as the officer_audit actor snapshot only if actor_discord_id has no Member row of its own (defensive fallback; the GM gate itself requires a Member row with a configured GM role, so this normally isn’t reached).

actor_discord_id: str#
actor_name: str#
class sidequest_common.schemas.signup_notices.SignupNoticeAck#

Bases: pydantic.BaseModel

Bot -> API: the notice message for this member now accurately reflects their current state.

channel_id: int#
message_id: int#
class sidequest_common.schemas.signup_notices.SignupNoticeCandidate#

Bases: pydantic.BaseModel

One member who has never had a signup notice posted for them, oldest first.

avatar_hash: str | None#
battletag: str | None#
created_at: datetime.datetime#
discord_id: str#
display_name: str#
member_id: int#
roster_confirmed: bool#
username: str#
class sidequest_common.schemas.signup_notices.SignupNoticeResolution#

Bases: pydantic.BaseModel

One posted notice whose message no longer reflects the member’s state (confirmed since, e.g. on the site).

channel_id: str#
confirmed_by: str | None#
discord_id: str#
display_name: str#
member_id: int#
message_id: str#
class sidequest_common.schemas.signup_notices.SignupNoticesPage#

Bases: pydantic.BaseModel

API -> bot: what the signup-notices poll should act on this tick.

pending: list[SignupNoticeCandidate]#
resolved: list[SignupNoticeResolution]#