Skip to content

Add /bot setfaction command to record bot faction standing - #274

Merged
ebm5025 merged 2 commits into
mainfrom
claude/eqnotify-castle-bot-integration-5c7l4s
Aug 30, 2026
Merged

Add /bot setfaction command to record bot faction standing#274
ebm5025 merged 2 commits into
mainfrom
claude/eqnotify-castle-bot-integration-5c7l4s

Conversation

@ebm5025

@ebm5025 ebm5025 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a /bot setfaction subcommand that records a bot's current EverQuest faction standing.

  • Access: restricted to members with the Raider role.
  • Options: name (autocompleted from the bot list, like /bot bind) and faction (autocomplete from a fixed list: Scowling, Threatening, Dubious, Indifferent, Amiable, Kindly, Warmly, Ally, Unknown).
  • Stored value includes the date it was set and the setter's server display name (guild nickname), e.g. Amiable (08/29) - Pumped.
  • Written to the existing CoV Faction column in the Google sheet and persisted to the bot Prisma row through the existing updateBotRowDetails path, and loaded from the sheet on refresh like the other bot fields.

Changes

  • prisma/schema.prisma: new faction String @default("") on the bot model, plus migration 20260830000000_add_bot_faction.
  • BOT_SPREADSHEET_COLUMNS: new Faction = "CoV Faction" entry (uses the existing sheet column).
  • bot-prisma.ts: init() loads faction from the sheet on refresh; updateBotRowDetails() persists the column to the Prisma row (it already fans out to the sheet service).
  • New setfaction-subcommand.ts; registered on the /bot command. The setter name comes from the guild member's displayName.

This is separate from the existing factioned boolean (the checkout warning flag), which is unchanged.

Testing

  • yarn tsc — clean.
  • yarn test:ci — 84 tests pass.
  • prisma validate — schema valid; migration column matches the generated definition ("faction" TEXT NOT NULL DEFAULT '').
  • Note: not exercised against a live sheet/DB from the sandbox — worth confirming /bot setfaction writes the CoV Faction cell and survives a refresh after deploy.

🤖 Generated with Claude Code

claude added 2 commits August 30, 2026 02:38
Adds a `/bot setfaction` subcommand that takes a bot name (autocompleted from
the bot list) and a faction standing chosen from a fixed autocomplete list
(Scowling, Threatening, Dubious, Indifferent, Amiable, Kindly, Warmly, Ally,
Unknown). It records the value with the date it was set, e.g. "Amiable (08/29)".

- New `faction` column on the bot Prisma model (+ migration), defaulting to "".
- Loaded from the new "Faction" sheet column on refresh, like the other bot
  fields, and written back to both the Prisma row and the Google sheet through
  the existing updateBotRowDetails path.

Note: the public bot sheet needs a "Faction" column header for the value to
persist to the sheet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
- Store the standing in the existing "CoV Faction" sheet column instead of a
  new "Faction" column.
- Append the setter's server display name (guild nickname) to the value, e.g.
  "Amiable (08/29) - Pumped".
- Restrict /bot setfaction to members with the Raider role.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
@ebm5025
ebm5025 merged commit 1a35a6f into main Aug 30, 2026
1 check passed
@ebm5025
ebm5025 deleted the claude/eqnotify-castle-bot-integration-5c7l4s branch August 30, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants