GitSparTV / discordia-slash

Discordia application commands extension
MIT License
38 stars 13 forks source link

Didn't work for me #3

Closed AngryPlaayer closed 1 year ago

AngryPlaayer commented 3 years ago

Can a video tutorial be made about this? I'm super confused about how I should be doing this. I tried to use: client:slashCommand() using the example. It doesn't show up as an error anymore, but I'm not sure what's supposed to happen after. The slash command doesn't appear in Discord, and when I tried to test the example ban command, it came up with an error (yes, I changed "guildid" to the actual guild id). It just errors with "bad request," and I'm stumped on how to fix this. Slash commands for my bot aren't THAT important to me, but I'd like to have them.

GitSparTV commented 3 years ago

You need application.command OAuth permission

AngryPlaayer commented 3 years ago

It's just saying bad request. I've kicked and readded the bot, I enabled the "application.command" thing, added it again, I'm stumped.

AngryPlaayer commented 3 years ago

It did work for a bit, but it just stopped. The "params" table was empty even when I added arguments. I tried to add more commands but nothing worked, I tried doing `client:on("slashCommandsReady", function()

local myCommand = client:slashCommand({
    name = "test",
    description = "desc",
    options = {
        {
            name = "arg",
            description = "argdesc",
            type = slash.enums.optionType.string,
            required = true
        }
    },
    callback = function(ia, params, cmd)

    end
})

myCommand:publish()

end)` but it always returned nil, which it says it does if it encounters an error.