AlexzanderFlores / WOKCommands

130 stars 61 forks source link

Discord buttons don’t work with slash commands #107

Closed cainthebest closed 2 years ago

cainthebest commented 3 years ago

I cannot go into much detail due to the fact i am unable to find the cause of the issue but if you return a embed or text with a button it throws a error

pazzazzo commented 3 years ago

https://github.com/AlexzanderFlores/WOKCommands/pull/108

cainthebest commented 3 years ago

@pazzazzo #108 what do you mean by interaction not being a slash command as the bug that i get is that when trying to send a button with a embed on the slash return it errors out. But if the button is removed from the embed const the slash command works fine

pazzazzo commented 3 years ago

@cainthebest Sorry, I did not understand. I do not speak English

cainthebest commented 3 years ago

what language?

pazzazzo commented 3 years ago

French

cainthebest commented 3 years ago

@pazzazzo Ce que je disais, c’est que l’interaction échoue si vous envoyez une incorporation avec un bouton en tant que commande de barre oblique

Est-ce que tu comprends? aussi s’il vous plaît utiliser pas de mots raccourcis afin que je puisse comprendre votre réponse

pazzazzo commented 3 years ago

On ne peut pas envoyer de button dans un reply d'interaction, discord lui même ne le permet pas @cainthebest

cainthebest commented 3 years ago

Je peux montrer que certains bots peuvent le faire. Je pensais que c’était possible de le faire, mais je vais y jeter un coup d’œil plus. la seule raison pour laquelle je ne peux pas lire ceci est parce que je n’ai pas longtemps commencé ts et je sais surtout js

pazzazzo commented 3 years ago

Peut-tu m'écrire en anglais car certains mots sont mal traduits donc je ne comprends pas

cainthebest commented 3 years ago

sorry bing translate lol but what i said was I can show that some bots can do this. I thought it was possible to do it, but I'll take a look at it more. the only reason I can't read this is because I didn't start ts long ago and I know mostly js

pazzazzo commented 3 years ago

Ho, Okay

cainthebest commented 3 years ago

Heres a example https://user-images.githubusercontent.com/75994858/120243139-b7b8fb80-c25e-11eb-887d-8eb4b0a2b325.MOV

pazzazzo commented 3 years ago

Can you send a error please?

cainthebest commented 3 years ago

i cant send a error now as i deleted my version of that vid but yeah its all explained here https://discord.com/developers/docs/interactions/message-components#what-are-components

wrsjr04 commented 3 years ago

Please look at #109

cferreras commented 3 years ago
C:\Users\User\Desktop\discord-bot\node_modules\wokcommands\dist\SlashCommands.js:63
                    command = name.toLowerCase();
                                   ^

TypeError: Cannot read property 'toLowerCase' of undefined

Why?

cferreras commented 3 years ago
C:\Users\User\Desktop\discord-bot\node_modules\wokcommands\dist\SlashCommands.js:63
                    command = name.toLowerCase();
                                   ^

TypeError: Cannot read property 'toLowerCase' of undefined

Why?

If I remove the .toLowerCase() method, it works correctly 😂

cainthebest commented 3 years ago

@cferreras Isn't this a different issue?