Create SlashCommand.md
This commit is contained in:
parent
6b89f7c184
commit
4097ab9e70
56
Document/SlashCommand.md
Normal file
56
Document/SlashCommand.md
Normal file
@ -0,0 +1,56 @@
|
||||
# Slash Command (no options)
|
||||
|
||||
### Demo
|
||||
|
||||

|
||||
|
||||
`vietnamese .-.`
|
||||
|
||||
### Code test
|
||||
|
||||
```js
|
||||
await message.guild.searchInteraction({ query: 'aiko', botId: '.-.' })
|
||||
message.channel.sendSlash('.-.', 'aiko')
|
||||
```
|
||||
|
||||
### Result
|
||||
|
||||

|
||||
|
||||
# Slash Command + Sub option (group)
|
||||
|
||||
### Demo
|
||||
|
||||

|
||||
|
||||
### Code test
|
||||
|
||||
```js
|
||||
await message.guild.searchInteraction({ query: 'animal', botId: '450323683840491530' })
|
||||
message.channel.sendSlash('450323683840491530', 'animal', 'chat', 'bye')
|
||||
```
|
||||
|
||||
### 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')
|
||||
await message.guild.searchInteraction({ query: 'sauce', botId: '718642000898818048' })
|
||||
message.channel.sendSlash('718642000898818048', 'sauce', a)
|
||||
```
|
||||
|
||||
### Result
|
||||
|
||||

|
||||
|
Loading…
x
Reference in New Issue
Block a user