You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

manual.md 1.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. uid: FAQ.Interactions.Manual
  3. title: Manual handling
  4. ---
  5. # Manually handing interactions.
  6. This section talks about the manual building and responding to interactions.
  7. If you are using the interaction framework (highly recommended) this section does not apply to you.
  8. ## Bad form Exception when I try to create my commands, why do I get this?
  9. Bad form exceptions are thrown if the slash, user or message command builder has invalid values.
  10. The following options could resolve your error.
  11. #### Is your command name lowercase?
  12. If your command name is not lowercase, it is not seen as a valid command entry.
  13. `Avatar` is invalid; `avatar` is valid.
  14. #### Are your values below or above the required amount? (This also applies to message components)
  15. Discord expects all values to be below maximum allowed.
  16. Going over this maximum amount of characters causes an exception.
  17. > [!NOTE]
  18. > All maximum and minimum value requirements can be found in the [Discord Developer Docs].
  19. > For components, structure documentation is found [here].
  20. [Discord Developer Docs]: https://discord.com/developers/docs/interactions/application-commands#application-commands
  21. [here]: https://discord.com/developers/docs/interactions/message-components#message-components
  22. #### Is your subcommand branching correct?
  23. Branching structure is covered properly here: xref:Guides.SlashCommands.SubCommand
  24. ![Scope check](images/scope.png)
  25. ## There are many options for creating commands, which do I use?
  26. [!code-csharp[Register examples](samples/registerint.cs)]
  27. > [!NOTE]
  28. > You can use bulkoverwrite even if there are no commands in guild, nor globally.
  29. > The bulkoverwrite method disposes the old set of commands and replaces it with the new.