Skip to content

fix: resend status card when the previous message was deleted#20

Merged
ItsAlexIK merged 1 commit into
mainfrom
Fix-system-stats-card-issues-after-deletion
Jul 1, 2026
Merged

fix: resend status card when the previous message was deleted#20
ItsAlexIK merged 1 commit into
mainfrom
Fix-system-stats-card-issues-after-deletion

Conversation

@Kf637

@Kf637 Kf637 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Fixes #18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses issue #18 by preventing repeated “Unknown Message” errors when the live system stats/status card message is deleted in Discord. It does so by detecting the Discord API “Unknown Message” error during edits and re-sending the status card to restore state.

Changes:

  • Added a small helper (sendStatusMessage) to centralize sending the status embed and updating statusMessage.
  • Wrapped statusMessage.edit(...) in a try/catch to detect error code 10008 (Unknown Message) and re-send the status card when the prior message was deleted.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ItsAlexIK ItsAlexIK added the bug Something isn't working label Jul 1, 2026
@ItsAlexIK ItsAlexIK merged commit 06b21a1 into main Jul 1, 2026
1 check passed
@Kf637 Kf637 deleted the Fix-system-stats-card-issues-after-deletion branch July 1, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live system stats card deletion causes “Unknown Message” error spam in console

3 participants