Skip to content

fix: console.error() when the App and/or token isn't coordinate#177

Merged
ValDesign22 merged 2 commits intoDiscordAnalytics:masterfrom
thomasbnt:master
Jul 23, 2025
Merged

fix: console.error() when the App and/or token isn't coordinate#177
ValDesign22 merged 2 commits intoDiscordAnalytics:masterfrom
thomasbnt:master

Conversation

@thomasbnt
Copy link
Copy Markdown
Contributor

No description provided.

public async trackInteractions(interaction: any, interactionNameResolver?: (interaction: any) => string) {
if (this._debug) console.log("[DISCORDANALYTICS] trackInteractions() triggered")
if (!this._isReady) throw new Error(ErrorCodes.INSTANCE_NOT_INITIALIZED)
if (!this._isReady) console.error(ErrorCodes.INSTANCE_NOT_INITIALIZED)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, but to avoid sending stats when the error is sent a return must be used

if (!this._isReady) return console.error(ErrorCodes.INSTANCE_NOT_INITIALIZED)

Copy link
Copy Markdown
Member

@ValDesign22 ValDesign22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it's good

@ValDesign22 ValDesign22 merged commit ada1f55 into DiscordAnalytics:master Jul 23, 2025
7 checks passed
@ValDesign22
Copy link
Copy Markdown
Member

Merged, and applied it to the new monorepo

@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants