Skip to content

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

Open
biast12 wants to merge 1 commit into
masterfrom
RM-348
Open

biast12 wants to merge 1 commit 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

Copy link
Copy Markdown

This PR is blocked

  • needs:bump_db - PR references a database PR but go.mod is not yet bumped
  • needs:gomod_comment - go.mod has uncommented local replace directives

Remove the label(s) above once the underlying dependency bump or comment has landed, and this check will re-run on the next push.

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

Labels

needs:bump_db PR references database repo changes needs:gomod_comment go.mod has uncommented local replace directives

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant