From cfe06d92e6280027175e24422fe1392e76effc4c Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 12 Jan 2022 16:57:00 +0200 Subject: [PATCH] resolver method --- src/structure/client/Resolver.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/structure/client/Resolver.js b/src/structure/client/Resolver.js index d600c3b..a45bdeb 100644 --- a/src/structure/client/Resolver.js +++ b/src/structure/client/Resolver.js @@ -1,3 +1,5 @@ +const timestring = require('timestring'); + class Resolver { constructor(client) { @@ -18,6 +20,16 @@ class Resolver { } + resolveTime(string) { + let time = null; + try { + time = timestring(string); + } catch (err) { + return null; + } + return time; + } + } module.exports = Resolver;