Remember and Remind functions
This commit is contained in:
1 parent
25863e7f7e
commit
8ae324bcf4
1 file changed
+27
-1
+27
-1
@@ -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];
|
||||
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user