Skip to content

History command fails if user has strikes #8

@pfist

Description

@pfist

Was this issue already reported?

  • I have searched the existing issues

On which platform did you encounter this issue?

Desktop app

What happened

If the user has strikes in their moderation history, Quinn fails to respond and logs this error:

TypeError: Cannot read properties of null (reading 'isActive')
    at file:///home/pfist/bots/quinn/src/commands/moderation/history.js:43:68
    at Array.filter (<anonymous>)
    at History.run (file:///home/pfist/bots/quinn/src/commands/moderation/history.js:43:37)
    at async CommandHandler.handleSlashCommand (file:///home/pfist/bots/quinn/node_modules/hiei.js/src/commands/CommandHandler.js:110:7)

It seems Quinn is failing to read the Strike table from the database.

What you expected

If a user has moderation history, this command should always return it and should log no errors.

Steps to reproduce

  1. Go to any text channel
  2. Type /history and choose a user with strikes in their history
  3. Quinn will return "The application failed to respond" and the above error will show in the logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions