Add /bot setfaction command to record bot faction standing - #274
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
/bot setfactionsubcommand that records a bot's current EverQuest faction standing.name(autocompleted from the bot list, like/bot bind) andfaction(autocomplete from a fixed list:Scowling, Threatening, Dubious, Indifferent, Amiable, Kindly, Warmly, Ally, Unknown).Amiable (08/29) - Pumped.CoV Factioncolumn in the Google sheet and persisted to the bot Prisma row through the existingupdateBotRowDetailspath, and loaded from the sheet on refresh like the other bot fields.Changes
prisma/schema.prisma: newfaction String @default("")on thebotmodel, plus migration20260830000000_add_bot_faction.BOT_SPREADSHEET_COLUMNS: newFaction = "CoV Faction"entry (uses the existing sheet column).bot-prisma.ts:init()loadsfactionfrom the sheet on refresh;updateBotRowDetails()persists the column to the Prisma row (it already fans out to the sheet service).setfaction-subcommand.ts; registered on the/botcommand. The setter name comes from the guild member'sdisplayName.This is separate from the existing
factionedboolean (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 '')./bot setfactionwrites theCoV Factioncell and survives a refresh after deploy.🤖 Generated with Claude Code