Skip to content

[Bug] DiscordGuildChannelConfig type missing autoThread field #35607

@ingyukoh

Description

@ingyukoh

Bug Description

The DiscordGuildChannelConfig type in types.discord.ts is missing the autoThread field, even though:

  1. The Zod schema (DiscordGuildChannelSchema) includes autoThread: z.boolean().optional() at line 358
  2. Runtime code actively uses it in threading.ts:370, message-handler.process.ts:257, and allow-list.ts:501
  3. The runtime code in allow-list.ts had to define its own local type with autoThread?: boolean (line 41) to work around the missing canonical type field

Impact

  • Type safety gap: the canonical type doesn't reflect a field that the schema validates and runtime reads
  • Code in allow-list.ts maintains a shadow type definition that could drift from the canonical type

Root Cause

Type/schema drift: autoThread was added to the Zod schema and runtime code but not to the canonical TypeScript type in types.discord.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions