Skip to content

How do you send a slash command? #69

Answered by Notmoodo9
Notmoodo9 asked this question in Q&A
Discussion options

You must be logged in to vote

I fixed it kinda i changed how the commands are fetched, changed code. you can interact with it by doing this:

const guildId = await api.getConfig().guildId;
const channelId = await api.getConfig().channelId; 
const cmd = "command_name"
const command = await api.searchAllSlashCommand(guildId, cmd)

await api.sendSlashCommand(guildId, channelId, command, (options) or nothing)   

note that every time searchAllSlashCommand is called it has to parse all the commands on the server so it is more efficient to store the command if you want to use it multiple times.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Notmoodo9
Comment options

@Daxer1937
Comment options

@Daxer1937
Comment options

@Notmoodo9
Comment options

@Daxer1937
Comment options

Answer selected by Notmoodo9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants