Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/commands/commands/events.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1208,8 +1208,8 @@ export class EventsCommand extends AdminCommand {
`- ${commandMention("events", "winners")} lists current winners; ${commandMention("events", "clear-winners")} revokes early.\n` +
"- With multiple occurrences scheduled, the **earliest** one to open revokes the role.\n\n" +
"**Auto-pull subs at room start:**\n" +
"- `auto_pull_subs_at_room_start_toggle` (default `false`) — at each room's start, lock paired sub and pull subs into the room. Forces room lock at exact `start_time` (ignores `lock_offset`).\n" +
"- `shuffle_subs_before_auto_pull_toggle` (default `false`) — shuffle the sub queue before the pull.\n" +
"- `auto_pull_subs_room_start_toggle` (default `false`) — at each room's start, lock paired sub and pull subs into the room. Forces room lock at exact `start_time` (ignores `lock_offset`).\n" +
"- `shuffle_subs_before_pull_toggle` (default `false`) — shuffle the sub queue before the pull.\n" +
"- `sub_auto_pull_mode` (default `drain`) — `drain`: standard `/pull` side effects fire. `promote`: move into room queue (bypasses room lock), no sub-side pull effects.\n\n" +
"**Extra per-room channels:**\n" +
`- ${commandMention("events", "add-room-channel")} adds an extra per-room channel like \`room-code-{N}\`, with optional slowmode.\n` +
Expand Down
4 changes: 4 additions & 0 deletions src/options/base-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export abstract class BaseOption<BuilderType extends ApplicationCommandOptionBas
const minValue = this.config?.minValue ?? this.minValue;
const required = this.config?.required ?? this.required;

if (id.length > 32) {
throw new Error(`Error creating option ${id}. name length must be <= 32 (attempted: ${id.length})`);
}

optionBuilder.setName(id).setDescription(this.buildDescription());

if (required) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EVENT_TABLE } from "../../db/schema.ts";
import { BooleanOption } from "../base-option.ts";

export class AutoPullSubsAtRoomStartToggleOption extends BooleanOption {
static readonly ID = "auto_pull_subs_at_room_start_toggle";
static readonly ID = "auto_pull_subs_room_start_toggle";
id = AutoPullSubsAtRoomStartToggleOption.ID;
defaultValue = EVENT_TABLE.autoPullSubsAtRoomStartToggle.default;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EVENT_TABLE } from "../../db/schema.ts";
import { BooleanOption } from "../base-option.ts";

export class ShuffleSubsBeforeAutoPullToggleOption extends BooleanOption {
static readonly ID = "shuffle_subs_before_auto_pull_toggle";
static readonly ID = "shuffle_subs_before_pull_toggle";
id = ShuffleSubsBeforeAutoPullToggleOption.ID;
defaultValue = EVENT_TABLE.shuffleSubsBeforeAutoPullToggle.default;
}