I got tired of decoding Discord permission numbers, so I built an offline CLI for it
说明与用途
dkit 是一个离线命令行工具,用于解码 Discord 的雪花 ID、权限和意图,简化机器人开发。
问题
Developers building Discord bots repeatedly need to decode permission numbers, snowflake timestamps, and intent values, often using web calculators or ad‑hoc scripts.
结果
dkit enables quick, offline decoding of Discord snowflakes, permissions, and intents, improving developer productivity and reducing errors.
工作流
- Install via pip:
pip install dkit-cli - Run
dkit snowflake <id>to get creation time and components - Run
dkit perms --names <perm1,perm2>to get bit mask and hex - Run
dkit intents <intent1,intent2>to see combined value and privileged intents - Use
dkit inviteto build OAuth2 URLs - Add
--jsonfor machine‑readable output
证据
I wanted one command for each of them, so I built dkit.
dkit never makes a network request and never asks for a bot token.
Standard library only, so installing it pulls in nothing else.
Permission values already go beyond 32 bits. dkit uses Python's arbitrary‑precision integers, and in JSON mode it emits permission values as strings, the same way the Discord API does.
- 记录日期: 2026-10-21T12:41:14.656Z