From 1ec9c93bda23e6b7ca1e64b681774d7c7d5364b8 Mon Sep 17 00:00:00 2001 From: Izwzyzx <184772711+Izwzyzx@users.noreply.github.com> Date: Sat, 19 Oct 2024 17:43:47 -0500 Subject: [PATCH] Added support for MOTDs matching only the date --- CHANGELOG.md | 1 + Onequestionmark.hx | 4 ++++ motd-db.json | 3 +++ 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17a4c23..3e83aa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Release Version 1.2 +- Added support for MOTDs matching only the date - General purpose functions have been split off into IzzComLib - Improved fallbacks for file-reading commands - Data files for the official instance have been split into a separate repo diff --git a/Onequestionmark.hx b/Onequestionmark.hx index a421a01..e375a06 100644 --- a/Onequestionmark.hx +++ b/Onequestionmark.hx @@ -408,6 +408,10 @@ class Onequestionmark { else if (motdDB.exists('${printDay().substr(0,3)}${printDate()}')) { day = motdDB.get('${printDay().substr(0,3)}${printDate()}'); } + // Else, check for just the date + else if (motdDB.exists('${printDate()}')) { + day = motdDB.get('${printDate()}'); + } // Otherwise, post daily meme else if (motdDB.exists(printDay().substr(0,3))) { day = motdDB.get(printDay().substr(0,3)); diff --git a/motd-db.json b/motd-db.json index 114c8f5..eaf8183 100644 --- a/motd-db.json +++ b/motd-db.json @@ -21,6 +21,9 @@ "Sat": [ "Saturday Event" ], + "01": [ + "Example event to be triggered on the 1st of any month." + ], "Mon01": [ "Example event to be triggered on any Monday that is also the 1st." ],