windsor-bot 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bot.js +4 -1
  2. package/package.json +1 -1
package/dist/bot.js CHANGED
@@ -94,7 +94,10 @@ async function removeReactionSafe(message, emoji) {
94
94
  }
95
95
  async function reactSafe(message, emoji, clearThinking = true) {
96
96
  try {
97
- await message.react(emoji);
97
+ // Retries can encounter the same pending reaction repeatedly while offline.
98
+ if (!message.reactions.cache.get(emoji)?.me) {
99
+ await message.react(emoji);
100
+ }
98
101
  if (emoji !== Reaction.thinking && clearThinking) {
99
102
  await removeReactionSafe(message, Reaction.thinking);
100
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windsor-bot",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Self-hosted Discord bot automation for household list and todo printing",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",