saramaebee / mod-bot

A bot to handle tracking moderative actions in CodeSupport's Discord Server

Home Page:https://codesupport.dev/discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deleteMessageSeconds field is not assignable to parameter of type 'BanOptions'

saramaebee opened this issue · comments

commented
Argument of type '{ deleteMessageSeconds: number; }' is not assignable to parameter of type 'BanOptions'.
  Object literal may only specify known properties, but 'deleteMessageSeconds' does not exist in type 'BanOptions'. Did you mean to write 'deleteMessageDays'?

When trying to do banAction.user.ban({ deleteMessageSeconds: 6000 }); in ModService.handleAction, I get this error. This is a valid property according to the DJS docs, so I'll need to investigate this further before implementing.

commented

Was able to solve this by casting the type to BanOption interestingly