discord.js-selfbot-v13/Document/SlashCommand.md
2022-10-30 19:25:32 +07:00

2.2 KiB

Slash command demo

  • Support Autocomplete feature (half)
  • Unused guild.searchInteraction() (Deleted)

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

All image demo : v2.3

Slash Command (no options)

Demo

image

vietnamese .-.

Code test

await message.channel.sendSlash('botid', 'aiko')

Result

image

Slash Command + Sub option (group)

Demo (v2.5)

image

Code test

   v2.5
- await message.channel.sendSlash('450323683840491530', 'animal', 'chat', 'bye')
   v2.6+
+ await message.channel.sendSlash('450323683840491530', 'animal chat', 'bye')

Result

image

Slash Command with Attachment (must use MessageAttachment)

Demo

image

Code test

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

image

Events