> For the complete documentation index, see [llms.txt](https://slashcommands.mxgnus.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://slashcommands.mxgnus.de/respond-example.md).

# Respond example

```javascript
bot.on('interactionCreate', async (interaction) => {
   if (interaction.isCommand()) { // check if interaction is a slashcommand
      if (interaction.commandName === 'test') { // check if command name is "test"
         interaction.reply('test'); // send a message back
      }
   }
});
```
