Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons not showing #24

Closed
hasib-rashid opened this issue Jul 12, 2021 · 13 comments
Closed

Buttons not showing #24

hasib-rashid opened this issue Jul 12, 2021 · 13 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@hasib-rashid
Copy link

The Buttons of Discord are not showing in Embed

Hey there. I was playing around with this package and this ashtonished me. But i have a problem which is that the buttons of the embed are not showing. Here is a quick screenshot

image

Expected behavior
The buttons are supposed to show here in the embed

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Package Version: 1.2.6
  • Node Version: 14

Additional context
Nothing else. Love the Package <3. Keep on the work

@hasib-rashid hasib-rashid added the bug Something isn't working label Jul 12, 2021
@Assassin-1234
Copy link
Member

make sure you have require(discord-buttons)(client) after your client declaration, should fix it :)

@Assassin-1234 Assassin-1234 added the good first issue Good for newcomers label Jul 12, 2021
@hasib-rashid
Copy link
Author

Oh my god what a fast reply. Im sorry I saw this way before but i am still stuck. Anyways

Can you please like give a code snippet example. I stills cant get around it ;(

@Assassin-1234
Copy link
Member

can you please show your index.js?

@Assassin-1234
Copy link
Member

Can you please like give a code snippet example. I stills cant get around it ;(

const client = new Discord.Client();
require('discord-buttons')(client)

@hasib-rashid
Copy link
Author

I dont know but i still dont see them :(

image

image

@Assassin-1234
Copy link
Member

are you using typescript?

@Assassin-1234
Copy link
Member

afaik discord-buttons' typings dont work check this out

@ChopChoP534
Copy link
Collaborator

ChopChoP534 commented Jul 12, 2021

const client = new Discord.Client();
require('discord-buttons')(client)

u need to add this in your main file(index.js, main.js, etc) and not in command file

@hasib-rashid
Copy link
Author

Thank you all the buttons are now Showing. <3 Keep on the work. I have another issue in them though. Will I open another issue? or can we discuss just here?

@Assassin-1234
Copy link
Member

we can just discuss it here :)

@hasib-rashid
Copy link
Author

When I click on any of those buttons it shows this?
image

Sorry If I am being dumb :P

@Assassin-1234
Copy link
Member

it doesn't, you have to handle the interactions by using

client.on('clickButton', button => {
	Nuggies.buttonclick(client, button);
});

@hasib-rashid
Copy link
Author

Oh my god thank you so much excellent response time and service. Keep on the work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants