45 lines
1.0 KiB
Markdown
45 lines
1.0 KiB
Markdown
# Slash command
|
|
|
|
# Slash Command (no options)
|
|
|
|
### Demo
|
|
|
|

|
|
|
|
### Code
|
|
|
|
```js
|
|
await message.channel.sendSlash('botid', 'aiko')
|
|
```
|
|
|
|
# Slash Command + Sub option (group)
|
|
|
|
### Demo
|
|
|
|

|
|
|
|
### Code test
|
|
|
|
```js
|
|
await message.channel.sendSlash('450323683840491530', 'animal chat', 'bye')
|
|
```
|
|
|
|
# Slash Command with Attachment
|
|
|
|
### 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.channel.sendSlash('718642000898818048', 'sauce', a)
|
|
```
|
|
|
|
### Result
|
|
|
|

|