diff --git a/changelog.d/114.added.md b/changelog.d/114.added.md index 349507fc..cf1ef1c5 100644 --- a/changelog.d/114.added.md +++ b/changelog.d/114.added.md @@ -1 +1 @@ -Users will ocassionally be invited to join the Discord server \ No newline at end of file +Users will be invited to join the Discord server after 10 usages \ No newline at end of file diff --git a/package.json b/package.json index 4afe9f6b..c59cda5f 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "mirrord.promptDiscord": { "type": "boolean", "default": true, - "description": "Occasionally show a notification inviting to the Discord server." + "description": "Show a notification inviting the user to the Discord server." }, "mirrord.promptAgentVersionMismatch": { "type": "boolean", diff --git a/src/api.ts b/src/api.ts index e1db6745..c8d1be8b 100644 --- a/src/api.ts +++ b/src/api.ts @@ -557,7 +557,7 @@ function tickFeedbackCounter() { /** * Updates the global Discord counter. -* After each `DISCORD_COUNTER_PROMPT_AFTER` mirrord runs, displays a message asking the user to join the discord. +* After `DISCORD_COUNTER_PROMPT_AFTER` mirrord runs, displays a message asking the user to join the discord. */ function tickDiscordCounter() { const previousRuns = parseInt(globalContext.globalState.get(DISCORD_COUNTER) ?? '0'); @@ -565,7 +565,7 @@ function tickDiscordCounter() { globalContext.globalState.update(DISCORD_COUNTER, currentRuns); - if ((currentRuns % DISCORD_COUNTER_PROMPT_AFTER) === 0) { + if ((currentRuns - DISCORD_COUNTER_PROMPT_AFTER) === 0) { new NotificationBuilder() .withMessage(`Need any help with mirrord? Come chat with our team on Discord!`) .withGenericAction("Join us!", async () => {