Add `dkit audit-log`: look up Discord audit log event types
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
Research direction
Start by reading the existing CLI command implementations and data registration in src/dkit/core/data.py, then inspect the README and tests for similar offline lookups. Add the event dataset at src/dkit/data/audit_log_events.json from the documented Audit Log Events table and cover listing, lookups, search, JSON output, and invalid input. Done means the documented event fields and gaps are preserved, the dataset count is updated, and the stated tests, lint, formatting, README, and changelog requirements are met.
Written by the indexing model from the issue text.
Description
Problem
Discord audit log entries use numeric action_type values. Developers often need to identify an event from its value or find the value for an event name, but dkit has no offline lookup.
Proposed behaviour
Add dkit audit-log to list and look up the documented Audit Log Events.
$ dkit audit-log 22
MEMBER_BAN_ADD
$ dkit audit-log CHANNEL_CREATE
10
$ dkit --json audit-log --search MESSAGE
- Include the event name, numeric value, description, and documented “Object Changed” field when present.
- Support listing, numeric/name lookup, searching, and
--json. - Unknown values should exit with code 2 and a useful hint.
- Keep this as an offline reference only; do not query or modify a guild audit log.
- Preserve gaps in the documented numeric values.
Data
- Add
src/dkit/data/audit_log_events.jsonwithsource,source_rendered, andlast_verified. - Copy rows from “Audit Log Events” in
developers/resources/audit-log.mdx:
https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events. - The documented examples are
MEMBER_BAN_ADD=22andCHANNEL_CREATE=10. - 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 representative events with and without an “Object Changed” value, numeric/name lookups, search, JSON output, and invalid input.
- Tests fail if documented event names, values, descriptions, or object associations are changed incorrectly.
- 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 82/100
Maintainers usually reply within 1 day
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 65/100
EclipseFdn/open-vsx.org#15057 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
FinanceFlash/unvibecode#349 ·
-
Mission statement: why this is free, in the README, Why This Exists and the wiki HomePossibly taken @ChiefGyk3D claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
vllm-project/vime#508 ·
Maintainers usually reply within 4 days