devto 2026-10-01 원문 보기 ↗
Discord limits an app to 100 global slash commands. Subcommands and subcommand groups do not count toward it. My bot, Akiko, sits at exactly 100.
I learned where the wall is the hard way. I added a /settings command, the total became 101, and a test failed with expected 101 to be less than or equal to 100. In production the same mistake shows up as Discord error code 30032 when you deploy your commands.
There is a test that builds the real list of commands that would be deployed globally and asserts the count is at most 100. Without it you find out at deploy time, on the live bot. The test's own docstring also lists the escape routes in order, and says to never loosen the bound.
/report_setup became /report setup.The scope rules are simple: global means visible, not prefix-only and not developer-only.
Discord ignores default_permissions on subcommands. Permissions are set on the top-level command. So when I folded /report_setup (admin only) into /report (used by ordinary members to file reports), I could not require Manage Server on the setup subcommand alone. Putting the stricter permission on the whole command would have locked ordinary members out of /report user.
The check for that one subcommand has to live in the command body.
I build Akiko, a Discord bot with AI chat that remembers you, plus economy, music, moderation and a web dashboard. Free to add: https://i.hep.gg/akiko