Update SlashCommand.md
This commit is contained in:
parent
007f0ef3b1
commit
3bd4966d53
@ -1,3 +1,7 @@
|
|||||||
|
# Slash command demo
|
||||||
|
- Unsupport Autocomplete feature (maybe)
|
||||||
|
- Unused `guild.searchInteraction()` (Use only if not working properly)
|
||||||
|
|
||||||
# Slash Command (no options)
|
# Slash Command (no options)
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
@ -9,8 +13,8 @@
|
|||||||
### Code test
|
### Code test
|
||||||
|
|
||||||
```js
|
```js
|
||||||
await message.guild.searchInteraction({ query: 'aiko', botId: '.-.' })
|
await message.channel.sendSlash('botid', 'aiko')
|
||||||
message.channel.sendSlash('.-.', 'aiko')
|
// Return nonce (view document)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Result
|
### Result
|
||||||
@ -26,8 +30,8 @@ message.channel.sendSlash('.-.', 'aiko')
|
|||||||
### Code test
|
### Code test
|
||||||
|
|
||||||
```js
|
```js
|
||||||
await message.guild.searchInteraction({ query: 'animal', botId: '450323683840491530' })
|
await message.channel.sendSlash('450323683840491530', 'animal', 'chat', 'bye')
|
||||||
message.channel.sendSlash('450323683840491530', 'animal', 'chat', 'bye')
|
// Return nonce (view document)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Result
|
### Result
|
||||||
@ -46,11 +50,13 @@ message.channel.sendSlash('450323683840491530', 'animal', 'chat', 'bye')
|
|||||||
const { MessageAttachment } = require('discord.js-selfbot-v13')
|
const { MessageAttachment } = require('discord.js-selfbot-v13')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const a = new MessageAttachment(fs.readFileSync('./wallpaper.jpg') , 'test.jpg')
|
const a = new MessageAttachment(fs.readFileSync('./wallpaper.jpg') , 'test.jpg')
|
||||||
await message.guild.searchInteraction({ query: 'sauce', botId: '718642000898818048' })
|
await message.channel.sendSlash('718642000898818048', 'sauce', a)
|
||||||
message.channel.sendSlash('718642000898818048', 'sauce', a)
|
// Return nonce (view document)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Result
|
### Result
|
||||||
|
|
||||||
![image](https://user-images.githubusercontent.com/71698422/173347075-5c8a1347-3845-489e-956b-63975911b6e0.png)
|
![image](https://user-images.githubusercontent.com/71698422/173347075-5c8a1347-3845-489e-956b-63975911b6e0.png)
|
||||||
|
|
||||||
|
# Events (Update soon)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user