As a developer, I want to properly type Discord interactions so that we don’t rely on @ts-ignore and can catch type errors at compile time.
🧠 Context
Currently, we are using @ts-ignore in multiple places when accessing properties from Discord interactions. This is a temporary workaround to avoid TypeScript errors, but it bypasses static type checking and can lead to runtime issues.
Examples of this can be found in:
src/infrastructure/discord/commands/unassignedIssues.ts
src/infrastructure/discord/commands/myIssues.ts
For instance:

🛠️ Implementation Plan
-
Identify All @ts-ignore Usages
- Scan the codebase for all usages of
@ts-ignore related to Discord interaction data access
- Focus on the two known files, but check others for consistency
-
Correctly Type Interactions
- Use the correct types from
discord.js (e.g., ChatInputCommandInteraction)
- Narrow interaction types using type guards where necessary (e.g., checking
.isChatInputCommand() before accessing .options)
Example:
if (interaction.isChatInputCommand()) {
const username = interaction.options.getString("username");
// Use with confidence now
}
-
Remove All @ts-ignore Statements
- After correcting the types, remove the corresponding
@ts-ignore comments
-
Add Type-Safe Wrappers or Helpers (Optional)
- If access patterns repeat frequently, consider writing typed utility functions for common operations like
.options.getString(...)
-
Verify with Lint + Type Check
- Run
tsc and your linter to ensure no errors remain
✅ Acceptance Criteria
As a developer, I want to properly type Discord interactions so that we don’t rely on
@ts-ignoreand can catch type errors at compile time.🧠 Context
Currently, we are using
@ts-ignorein multiple places when accessing properties from Discord interactions. This is a temporary workaround to avoid TypeScript errors, but it bypasses static type checking and can lead to runtime issues.Examples of this can be found in:
src/infrastructure/discord/commands/unassignedIssues.tssrc/infrastructure/discord/commands/myIssues.tsFor instance:
🛠️ Implementation Plan
Identify All
@ts-ignoreUsages@ts-ignorerelated to Discordinteractiondata accessCorrectly Type Interactions
discord.js(e.g.,ChatInputCommandInteraction).isChatInputCommand()before accessing.options)Example:
Remove All
@ts-ignoreStatements@ts-ignorecommentsAdd Type-Safe Wrappers or Helpers (Optional)
.options.getString(...)Verify with Lint + Type Check
tscand your linter to ensure no errors remain✅ Acceptance Criteria
@ts-ignorestatements related to Discord interactions are removed from the codebaseinteractionobjects are correctly typed usingdiscord.jstypesunassignedIssues.tsandmyIssues.tsaccess interaction data safely without type suppression