Skip to content

RM-348: Add No colour option for embeds - #19

Merged
biast12 merged 1 commit into
masterfrom
RM-348
Oct 22, 2026
Merged

biast12 merged 1 commit into
masterfrom
RM-348

Conversation

@biast12

@biast12 biast12 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RM-348

Description

Discord treats a missing color as no colour and 0 as black. Embed.Color was an int with omitempty, so 0 was dropped and black could never be sent. It is now *int: nil leaves color out, and &0 sends black.

  • SetColor(int) always sets an explicit colour (0 is black).
  • New SetColorPtr(*int): nil clears the colour, otherwise the value is copied.

Breaking: code that sets Embed.Color directly needs updating.

For:
TicketsBot-cloud/worker#162
TicketsBot-cloud/dashboard#162
TicketsBot-cloud/subscriptions-app#6
TicketsBot-cloud/logarchiver#12

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Improvement

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Change Embed.Color to a pointer so an explicitly configured color value of 0 is serialized correctly. Add SetColorPtr to support nullable color values while retaining the existing SetColor builder.
@biast12
biast12 merged commit 9caa827 into master Oct 22, 2026
3 checks passed
@biast12
biast12 deleted the RM-348 branch October 22, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:breaking Breaking Change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants