Skip to content

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

Merged
BenHall-1 merged 2 commits into
masterfrom
RM-348
Oct 26, 2026
Merged

BenHall-1 merged 2 commits into
masterfrom
RM-348

Conversation

@biast12

@biast12 biast12 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

RM-348

Description

Colours are *int throughout: nil sends no colour (Discord's default bar), and 0 sends black.

  • Guild colours: GetColours, GetColourOrDefault, GetColourForGuild and Replyable.GetColour return *int, and a NULL custom colour means no colour. Default colour maps are copied instead of shared.
  • BuildEmbed / BuildEmbedRaw, welcome and tag embeds, form answers, /switchpanel, the close embed, /setup, help and the exit survey all send the colour through SetColorPtr.
  • Containers send the guild colour as accent_color, so no colour gives Discord's default bar instead of a black one.
  • Out-of-hours uses the stored colour as is (NULL = no colour, 0 = black). Panels without settings still use the guild Failure colour.
  • Removed the unused customisation.GetColour.

Needs:
TicketsBot-cloud/gdl#19
TicketsBot-cloud/database#49

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Improvement

Testing

  • Captured the real Discord payloads against Postgres: nil leaves out color / accent_color, and 0 sends "color":0.

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

Migrate custom colour handling and embed construction to pointer-based colour values, preserving nil colours and guild-specific defaults across commands, tickets, panels, and welcome messages. Enable local database and GDL module replacements for development.
@biast12
biast12 requested a review from a team as a code owner October 14, 2026 18:12
@github-actions github-actions Bot added needs:bump_db PR references database repo changes needs:gomod_comment go.mod has uncommented local replace directives labels Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Resolved

No blocking labels remain.

@BenHall-1

Copy link
Copy Markdown
Member

Ready for merge on db & gdl and bump :)

BenHall-1
BenHall-1 previously approved these changes Oct 22, 2026
@github-actions github-actions Bot removed needs:bump_db PR references database repo changes needs:gomod_comment go.mod has uncommented local replace directives labels Oct 22, 2026
@BenHall-1
BenHall-1 merged commit 1d6f2e6 into master Oct 26, 2026
1 check passed
@BenHall-1
BenHall-1 deleted the RM-348 branch October 26, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants