Remember and Remind functions

This commit is contained in:
Luis Fernando Molina committed 2018-06-24 21:10:52 +02:00
1 parent 25863e7f7e
commit 8ae324bcf4
1 file changed
+27 -1
+27 -1
View File
@@ -22,7 +22,9 @@
getProfits: getProfits,
getMarketRate: getMarketRate,
getTicker: getTicker,
sendMessage: sendMessage
sendMessage: sendMessage,
rememberThis: rememberThis,
remindMeOf: remindMeOf
};
let utilities = UTILITIES.newCloudUtilities(bot, logger);
@@ -1236,4 +1238,28 @@
context.newHistoryRecord.messageBody = pBody;
}
function rememberThis(pKey, pValue) {
if (context.executionContext.remember === undefined) {
context.executionContext.remember = {};
}
context.executionContext.remember[pKey] = pValue;
}
function remindMeOf(pKey) {
if (context.executionContext.remember === undefined) {
context.executionContext.remember = {};
}
return context.executionContext.remember[pKey];
}
};