Add `dkit components`: look up Discord message component types
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Problem
Discord's component type table includes interactive elements and layout/content components, but dkit has no offline lookup for their numeric type values or documented usage.
Proposed behaviour
Add dkit components to list and look up entries from the official Component Types table.
$ dkit components 2
Button
$ dkit components Container
17
$ dkit --json components --list
- Support lookup by numeric type or case-insensitive name, listing all documented types, and searching names/descriptions.
- Include the documented name, description, style, and usage for each entry.
- Unknown values should exit with code 2 and a useful hint.
- Support
--jsonwith stable fields and provenance. - Include only rows in the official Component Types table; preserve gaps in the documented numeric values. Do not add component limits or message flags.
Data
- Add
src/dkit/data/component_types.jsonwithsource,source_rendered, andlast_verified. - Copy the component type rows from
developers/components/reference.mdx, “Component Types”:https://discord.com/developers/docs/components/reference#component-types. - Examples above are documented: type
2isButton; type17isContainer. - Register the dataset in
src/dkit/core/data.pyand increase the exact JSON-file count in.github/workflows/ci.ymlby one from the current base branch count.
Acceptance criteria
- Tests cover numeric/name lookups, documented gaps, listing, search, JSON output, and invalid input.
- Tests fail if component names, values, or documented metadata are mismatched.
- 100% line and branch coverage;
ruff checkandruff format --checkpass. - Update the README and add one bullet to the existing
### Addedblock under[Unreleased]inCHANGELOG.md; do not remove existing changelog lines. - Please comment on this issue before starting, as required by CONTRIBUTING.md. AI-assisted contributions are welcome; disclose AI use in the PR description.
- Dominant language
- Python
- Stars
- 1
- Forks
- 7
- Avg merge
- 11h 50m
- Merged PRs (30d)
- 35
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Bytewave1/dkit
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
enhancement good first issue new command
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
enhancement good first issue new command
Difficulty 3/5 1-2 days Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
enhancement new command
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vllm-project/vllm#64845 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
dekobon/big-code-analysis#1729 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pydantic/pydantic-ai#12091 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100