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

Fix quotation marks in !mute and !unmute arguments

This commit is contained in:
Dragory 2019-04-05 20:05:37 +03:00
parent 6e1ef12bce
commit 8e2808d42c
2 changed files with 30 additions and 29 deletions

View file

@ -74,6 +74,8 @@ import { AutoReactionsPlugin } from "./plugins/AutoReactionsPlugin";
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");
@ -155,6 +157,17 @@ connect().then(async conn => {
size: 30,
threshold: 200,
},
customArgumentTypes: {
delay(value) {
const result = convertDelayStringToMS(value);
if (result == null) {
throw new CommandValueTypeError(`Could not convert ${value} to a delay`);
}
return result;
},
},
},
});