Added support for MOTDs matching only the date

This commit is contained in:
Izwzyzx 2024-10-19 17:43:47 -05:00
parent 7be7970194
commit 1ec9c93bda
3 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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));

View File

@ -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."
],