diff --git a/actions/store_message_info_MOD.js b/actions/store_message_info_MOD.js index 063c9f26..7779d25d 100644 --- a/actions/store_message_info_MOD.js +++ b/actions/store_message_info_MOD.js @@ -48,6 +48,7 @@ module.exports = { 'Replied-to Message Channel ID', 'Replied-to Message Guild ID', 'Is Reply to Message?', + 'Message Stickers Count', // Added option for sticker count ]; return `${presets.getMessageText(data.message, data.varName)} - ${info[parseInt(data.info, 10)]}`; }, @@ -137,6 +138,9 @@ module.exports = { case 27: dataType = 'Boolean'; break; + case 28: // Added case for storing sticker count + dataType = 'Number'; + break; default: break; } @@ -153,7 +157,13 @@ module.exports = { // This will make it so the patch version (0.0.X) is not checked. // --------------------------------------------------------------------- - meta: { version: '2.1.7', preciseCheck: true, author: null, authorUrl: null, downloadUrl: null }, + meta: { + version: '2.1.7', + preciseCheck: true, + author: null, + authorUrl: null, + downloadUrl: null, + }, // --------------------------------------------------------------------- // Action Fields @@ -181,35 +191,36 @@ module.exports = {


- Source Info
- + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - + +

@@ -235,7 +246,11 @@ module.exports = { // --------------------------------------------------------------------- async action(cache) { const data = cache.actions[cache.index]; - const msg = await this.getMessageFromData(data.message, data.varName, cache); + const msg = await this.getMessageFromData( + data.message, + data.varName, + cache, + ); if (!msg) { this.callNextAction(cache); @@ -324,14 +339,19 @@ module.exports = { case 27: result = msg.type === 'REPLY' && msg.reference?.messageId !== undefined; break; + case 28: // Added case for storing sticker count + result = msg.stickers ? msg.stickers.size : 0; + break; default: break; } + if (result !== undefined) { const storage = parseInt(data.storage, 10); const varName2 = this.evalMessage(data.varName2, cache); this.storeValue(result, storage, varName2, cache); } + this.callNextAction(cache); }, @@ -344,4 +364,4 @@ module.exports = { // functions you wish to overwrite. // --------------------------------------------------------------------- mod() {}, -}; +}; \ No newline at end of file