3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix type error

This commit is contained in:
Dragory 2019-04-05 20:06:29 +03:00
parent 8e2808d42c
commit 18e321f5bb

View file

@ -4,7 +4,7 @@ import yaml from "js-yaml";
import fs from "fs";
const fsp = fs.promises;
import { Knub, logger, PluginError } from "knub";
import { Knub, logger, PluginError, CommandArgumentTypeError } from "knub";
import { SimpleError } from "./SimpleError";
require("dotenv").config();
@ -75,7 +75,6 @@ import { PingableRolesPlugin } from "./plugins/PingableRolesPlugin";
import { SelfGrantableRolesPlugin } from "./plugins/SelfGrantableRolesPlugin";
import { RemindersPlugin } from "./plugins/Reminders";
import { convertDelayStringToMS } from "./utils";
import { CommandValueTypeError } from "knub/dist/commandUtils";
// Run latest database migrations
logger.info("Running database migrations");
@ -162,7 +161,7 @@ connect().then(async conn => {
delay(value) {
const result = convertDelayStringToMS(value);
if (result == null) {
throw new CommandValueTypeError(`Could not convert ${value} to a delay`);
throw new CommandArgumentTypeError(`Could not convert ${value} to a delay`);
}
return result;