Skip to content

Resolve BotConfig interface naming conflict between discord.ts and BotsStore.ts #65

@coderabbitai

Description

@coderabbitai

Issue Description

There is a naming conflict between two interfaces that serve different purposes:

  1. src/types/discord.ts - Contains for environment configuration (DISCORD_BOT_TOKEN, CLIENT_ID, POSTGRES_URL, etc.)
  2. src/sdk/bots-brain/BotsStore.ts - Contains for bot configuration storage (key, value, expiresAt)

Impact

This creates import confusion and potential naming collisions when both interfaces are used in the same file.

Suggested Solution

Rename the BotsStore interface from BotConfig to ConfigEntry (or similar) while keeping the method names unchanged (setBotConfig, getBotConfig, deleteBotConfig).

Code Change Required

// In src/sdk/bots-brain/BotsStore.ts
export interface ConfigEntry {
    key: string;
    value: unknown;
    expiresAt?: string;
}

References

Metadata

Metadata

Assignees

Labels

apiAPI integration and external services (Issues/PRs)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions