Repository navigation
feat(birthday): fiche d'anniversaire en Components V2 - #398
Merged
Merged
Conversation
AntoineJT
force-pushed
the
feat/birthday-own-sheet
branch
from
November 10, 2026 02:52
766c179 to
e840b3b
Compare
…sage Components V2 Un message mis en page avec des composants n'a pas de contenu, et ses fichiers ne s'affichent qu'à travers ses composants : sa citation affichait « Message sans texte » et son repost au starboard n'avait que l'en-tête. Les deux lisent désormais ses affichages de texte et ses galeries (#lib/message-content.ts), message transféré compris, ce qui vaut pour les réponses du bot comme pour les messages d'autres apps. Les spoilers posés sur un conteneur, un élément de galerie, une miniature ou un fichier sont conservés, et un fichier montré par une galerie n'apparaît qu'une fois au starboard.
/birthday set et /birthday show partagent une même fiche encadrée : date et salon d'annonce avec le bouton à côté, jumeaux, puis en petit les données conservées. /birthday upcoming répond aussi dans un conteneur, ce qui porte la limite de texte à 4 000 caractères.
AntoineJT
force-pushed
the
feat/birthday-own-sheet
branch
from
November 10, 2026 04:04
e840b3b to
47cc0df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🇫🇷 Français
🎯 Résumé
/birthday setet/birthday showrépondent par une même fiche encadrée à la couleur du module (Components V2). Elle contient la date et le salon d'annonce, avec le bouton d'annonce juste à côté, puis les jumeaux d'anniversaire et, en petit, ce qui est conservé./birthday upcomingpasse dans le même cadre.🤔 Motivation
Un membre a fait remarquer que ces réponses gagneraient à être mises en forme : c'étaient quatre lignes de texte brut, avec le bouton tout en bas. Une fiche se lit d'un coup d'œil, et le bouton se trouve à côté de ce qu'il change.
📦 Contenu
set(« Anniversaire enregistré ») etshow(« Votre anniversaire ») :/birthday stats», ou « Sera annoncé dès qu'un salon d'annonces sera défini ») ;/birthday upcomingest encadré, y compris quand aucun anniversaire n'approche. La limite passe de 2 000 à 4 000 caractères, donc environ deux fois plus d'anniversaires sont listés avant le « … et N autres ».sheetNotice(...textes)pour tout message encadré du module ;ACCENT_COLORdansrendering/theme.ts;COMPONENTS_TEXT_LIMITexporté par#lib/format.ts.fix(message-quote, starboard)), avant la fiche : un message Components V2 n'a ni contenu ni pièce jointe propre, donc sa citation affichait « Message sans texte » et son repost au starboard n'avait que l'en-tête. La réponse publique de/birthday upcomingen aurait souffert. Les deux modules lisent désormais le texte et les images de ses composants (#lib/message-content.ts), spoilers et messages transférés compris.messageTextdans#lib/testing.tslit le texte d'un message en Components V2.docs/functional.mddécrit la fiche, ses trois états d'annonce et le nouveau cadre d'upcoming.IsComponentsV2et l'absence decontentpourset,showetupcoming, ainsi que le titre conservé et le texte vidé par le bouton ;🧭 À noter
allowedMentionsvide. Vérifié sur Discord, le champmentionsdes messages de démo est vide.<t:…:R>) dansupcoming, pour que « dans 3 jours » reste juste quand le message est relu plus tard (suggestion d'un membre).🇬🇧 English
🎯 Summary
/birthday setand/birthday shownow answer with the same sheet, framed in the module colour (Components V2). It shows the date and the announcement channel, with the announce button right beside them, then the birthday twins and, in small print, what is stored./birthday upcomingmoves into the same frame.🤔 Motivation
A member pointed out that these replies deserved some layout: they were four lines of plain text with the button at the very bottom. A sheet reads at a glance, and the button sits next to what it changes.
📦 What's included
set("Birthday saved") andshow("Your birthday"):/birthday stats", or "Will be announced once an announcement channel is set");/birthday upcomingis framed, including when no birthday is coming up. The limit goes from 2,000 to 4,000 characters, so about twice as many birthdays are listed before the "… and N more".sheetNotice(...texts)for any framed message in the module;ACCENT_COLORinrendering/theme.ts;COMPONENTS_TEXT_LIMITexported from#lib/format.ts.fix(message-quote, starboard)commit), before the sheet: a Components V2 message has no content or attachments of its own, so its quote showed "Message without text" and its starboard repost only had the header. The public/birthday upcomingreply would have suffered from it. Both modules now read the text and images of its components (#lib/message-content.ts), spoilers and forwarded messages included.messageTextin#lib/testing.tsreads the text of a Components V2 message.docs/functional.mddescribes the sheet, its three announcement states and the newupcomingframe.IsComponentsV2flag and the absence ofcontentforset,showandupcoming, plus the title kept and the text cleared by the button;🧭 Notes
allowedMentions. Checked on Discord: thementionsfield of the demo messages is empty.<t:…:R>) inupcoming, so that "in 3 days" stays right when the message is read later (a member's suggestion).🖼️ Avant / après — Before / after
-# 🇫🇷 Exemples de rendus dessinés d'après les textes réels du module (thème sombre de Discord), pas des captures du client. / 🇬🇧 Example renders drawn from the module's real texts (Discord dark theme), not client screenshots.
/birthday set— avant / before/birthday show(non annoncé / not announced) — avant / before/birthday upcoming— avant / before📋 Checklist
setet une ficheshow/ 🇬🇧 After deploying, click the button on asetsheet and ashowsheetOpen in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.