From b7821cbd318871791d8f1c238de8b17ee322954b Mon Sep 17 00:00:00 2001 From: Madpeter Date: Thu, 7 May 2020 12:49:02 +0100 Subject: [PATCH] new command: UnixTimeNow --- Core/Commands/Info/UnixTimeNow.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Core/Commands/Info/UnixTimeNow.cs diff --git a/Core/Commands/Info/UnixTimeNow.cs b/Core/Commands/Info/UnixTimeNow.cs new file mode 100644 index 0000000..799ac16 --- /dev/null +++ b/Core/Commands/Info/UnixTimeNow.cs @@ -0,0 +1,17 @@ +using BetterSecondBotShared.Static; + +namespace BSB.Commands.Info +{ + public class UnixTimeNow : CoreCommand_SmartReply_1arg + { + public override string Helpfile { get { return "Requests the current unixtime at the bot and sends that via the smart reply target"; } } + public override bool CallFunction(string[] args) + { + if (base.CallFunction(args) == true) + { + return bot.GetCommandsInterface.SmartCommandReply(args[0], helpers.UnixTimeNow().ToString(), CommandName); + } + return false; + } + } +}