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

Fix type signature for length parameter field in ModService.banLengthToSeconds()

saramaebee opened this issue · comments

commented

mod-bot/src/api/mod.ts

Lines 48 to 49 in 3c3f469

static banLengthToSeconds(length: "1h" | "6h" | "12h" | "24h" | "3d" | "7d" | "none" | string): number | undefined {
const seconds = {

Currently the type of the field is a string, we should cast it to a type "1h" | "6h" | "12h" | "24h" | "3d" | "7d" | "none" in order to better represent the data type