This page will cover the configuration part of the interaction library.
For the library to work with the Botrino framework, you just need to make sure that your bot module
requires botrino.interaction, and that the
interaction entry is present in your
config.json. The entry has the following structure:
|The ID of the guild in which commands will be deployed. Specifying
null or completely omitting the field will deploy them globally.
|How interactions should be acknowledged by default. Possible values (case insensitive):
|The time in seconds after which
InteractionContext::awaitComponentInteraction automatically times out.
If you don't use the framework, the configuration is done via the
InteractionConfig object, which is used to construct
The methods available in
InteractionConfig::builder are the same as the ones in the JSON described previously.
Once you have the
InteractionService instance, you can register your commands and subscribe to its
None of this is necessary when using the Botrino framework. Creation of
InteractionService, registration of commands and execution of the
run() method are all done automatically.