2022-06-16 01:31:18 +07:00
# Slash command demo
2022-08-04 19:03:02 +07:00
- Support Autocomplete feature (half)
2022-06-16 01:31:18 +07:00
- Unused `guild.searchInteraction()` (Use only if not working properly)
2022-08-15 19:51:01 +07:00
# <strong>BREAKING CHANGE: Using Slash Command (Sub Command / Sub Group Command) will not accept subCommand argument in args. That means Command Name needs to be changed same as Discord Client</strong>
# All image demo : v2.3
2022-06-13 18:48:43 +07:00
# Slash Command (no options)
### Demo

`vietnamese .-.`
### Code test
```js
2022-06-16 01:31:18 +07:00
await message.channel.sendSlash('botid', 'aiko')
2022-06-13 18:48:43 +07:00
```
### Result

# Slash Command + Sub option (group)
2022-08-15 19:51:01 +07:00
### Demo (v2.5)
2022-06-13 18:48:43 +07:00

### Code test
2022-08-15 19:51:01 +07:00
```diff
v2.5
- await message.channel.sendSlash('450323683840491530', 'animal', 'chat', 'bye')
v2.6+
+ await message.channel.sendSlash('450323683840491530', 'animal chat', 'bye')
2022-06-13 18:48:43 +07:00
```
### Result

# Slash Command with Attachment (must use MessageAttachment)
### Demo

### Code test
```js
const { MessageAttachment } = require('discord.js-selfbot-v13')
const fs = require('fs')
const a = new MessageAttachment(fs.readFileSync('./wallpaper.jpg') , 'test.jpg')
2022-06-16 01:31:18 +07:00
await message.channel.sendSlash('718642000898818048', 'sauce', a)
2022-06-13 18:48:43 +07:00
```
### Result

2022-06-16 12:34:03 +07:00
# Events
2022-06-16 01:31:18 +07:00
2022-06-16 12:34:03 +07:00
- [interactionCreate ](https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-interactionCreate )
- [interactionFailure ](https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-interactionFailure )
- [interactionSuccess ](https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-interactionSuccess )
2022-08-04 19:03:02 +07:00
- [interactionModalCreate ](https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=e-interactionModalCreate )