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

add discord-buttons Community Resources #3146

Closed
wants to merge 1 commit into from
Closed

add discord-buttons Community Resources #3146

wants to merge 1 commit into from

Conversation

AngeloCore
Copy link

Add discord-buttons on Community Resources interactions.
discord-buttons is a package for the button interactions, addon for discord.js

@almostSouji
Copy link

Discord.js natively implements buttons in the next major release (with API-true naming).
If you are using discord.js and want to preview version 13 you can install npm i discord.js@dev (see the discord server https://discord.gg/djs) for instructions, features, and support.

(note that @dev is the current state of the development branch and might break at any time)

@castdrian
Copy link

This package is bad in a variety of ways. Use djs' native interaction methods instead.

@AngeloCore
Copy link
Author

Discord.js natively implements buttons in the next major release (with API-true naming).
If you are using discord.js and want to preview version 13 you can install npm i discord.js@dev (see the discord server https://discord.gg/djs) for instructions, features, and support.

(note that @dev is the current state of the development branch and might break at any time)

Yes, discord.js's dev version is not stable, also with our package is easier to use

@AngeloCore
Copy link
Author

This package is bad in a variety of ways. Use djs' native interaction methods instead.

Discord.js stable don't support interactions...

@EhsanFox
Copy link

This package is bad in a variety of ways. Use djs' native interaction methods instead.

I don't see what do u mean by "bad" because basically we are covering everything that is being added to discord-api-docs and still we are working on some more features,
our package is even kinda the same as the one on the dev(v13) branch, so I don't see what do u mean by that!

@castdrian
Copy link

You're grasping straws. The djs dev branch is stable enough, it's close to a release after all. Your package is applying hacky solutions to v12 which is just bad. Very much not easier to use and inaccurate to the Discord API.

@EhsanFox
Copy link

You're grasping straws. The djs dev branch is stable enough, it's close to a release after all. Your package is applying hacky solutions to v12 which is just bad. Very much not easier to use and inaccurate to the Discord API.

ok so basically, by "hacky" you mean because we are getting/sending data to throw WebSocket? or because we change some stuff on Send function? cause I really don't get it, if we added anything or changed anything about Djs, we covered them on our readme/docs.....

@AngeloCore
Copy link
Author

You're grasping straws. The djs dev branch is stable enough, it's close to a release after all. Your package is applying hacky solutions to v12 which is just bad. Very much not easier to use and inaccurate to the Discord API.

Bro, what do you mean with "hacky"?
We use only the discord rest api!

also
image

@iCrawl
Copy link
Contributor

iCrawl commented Jun 20, 2021

To clarify some things:

  • Adding a package that is not officially endorsed by a library (and is extending it), has the same issues as using the @dev branch when it comes to stability. Because if we decide to break how you do something, you need to update your code reactively based on user feedback.
  • The remark about the @dev branch is, as always, a reminder that we take liberty in breaking the interface whenever we see fit, not that it is horribly unstable and should not be used at all.

Edit:
Just in case this pops up again, here are the official implementations (of discord.js) for Buttons, Selects and Threads:
discordjs/discord.js#5674
discordjs/discord.js#5692
discordjs/discord.js#5570

Additionally: #2874 (comment)

@castdrian
Copy link

Again grasping straws and not providing any proper argument. This package is inaccurate to the Discord API. And there's no reason to use it, as djs provides perfectly fine native interaction support.

@AngeloCore
Copy link
Author

Hello crawl,
You're right, every time you change your code and we have to do it, but we have no problem with that.
Regarding #2874 (comment), we are not a temporary solution,
we are making it easier for people to use the buttons.
Also as far as I understand, you don't accept someone making your package easier to use

@advaith1
Copy link
Contributor

advaith1 commented Jun 20, 2021

of course it is a temporary solution?? users should download v13 and use built-in button support. Discord has already made it clear that they won't add these "extension" libraries unless the base library devs agree with it, so I don't really see why you made this PR in the first place as it obviously won't get merged.

there is no good reason for anyone to use your package instead of d.js v13.

@@ -67,6 +67,7 @@ Many of these libraries are represented in the [unofficial, community-driven Dis
- [discord-interactions-js](https://github.com/discord/discord-interactions-js)
- [discord-slash-commands](https://github.com/MeguminSama/discord-slash-commands) and its [Deno fork](https://deno.land/x/discord_slash_commands)
- [slash-create](https://github.com/Snazzah/slash-create)
- [discord-buttons](https://github.com/AngeloCore/discord-buttons)
Copy link

@thehairy thehairy Jun 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

Suggested change
- [discord-buttons](https://github.com/AngeloCore/discord-buttons)

@Snowflake04
Copy link

Well for those saying that djs13 native button support is better!
I rather user:
msg.createButtonCollector()
For creating a simple button collector using the discord-buttons resources
Rather than :
msg.createMessageComponentInteractionCollector()
Using native djs way!

@thehairy
Copy link

There still is absolutely no reason to use discord-buttons anyway.
If you are unhappy with the long method name, just rename it.

@Assassin-1234
Copy link

I support this pull request. discord-buttons is easier to use and not temporary. I tried using the main branch too to give it a fair chance and from my personal opinion discord-buttons is better.

Also message#createMessageComponentInteractionCollector is waaaaayyyyy too long to type, who even thought of that?? Message#createButtonCollector is much easier.

also replying to @iCrawl

you need to update your code reactively based on user feedback.

I agree with you, but if the owner of the package is willing to commit himself to the work, you cannot possibly stop the PR, This shouldnt be a problem and from my POV, you dont want to have discord-buttons on community resources based on personal hate.

@GoldenAngel2
Copy link
Contributor

The package being easier to use has nothing to do with this imo, if you don't like the name you can customize it yourself or just use the package. There is no reason for it to be listed when the main library supports it in the next version.

Can @typpo or @night handle this. 👌

@Assassin-1234
Copy link

The package being easier to use has nothing to do with this imo, if you don't like the name you can customize it yourself or just use the package. There is no reason for it to be listed when the main library supports it in the next version.

It does. All the community resources are made to enhance the user experience and to make it easier for the user. Without that, the resources dont make any sense

@discord discord deleted a comment Jun 21, 2021
@Evo-F
Copy link

Evo-F commented Jun 21, 2021

It does. All the community resources are made to enhance the user experience and to make it easier for the user. Without that, the resources dont make any sense

The Community Resources exists as a central repository of libraries which the Discord team has vetted and sanctioned for use. Additionally, it is comprised of libraries which are - for lack of a better word - comprehensive. There is no reason for your extension to be on that list, and there is especially no reason for it when the core library (which IS on the list) will have support for the feature in the near future.

This pull request and subsequent discussion are not in good faith, and the devs should close it at their earliest opportunity.

EDIT: Wow, this pull request is just flagrant self-advertising and I didn't even realize. I've put the above statement in bold for emphasis.

@AngeloCore
Copy link
Author

Chill please, I don't want to be a cause of conflicts

@Assassin-1234
Copy link

Wow, this pull request is just flagrant self-advertising and I didn't even realize. I've put the above statement in bold for emphasis.
@Evo-F

#3101 #3049 and many other community resources PR's were made by the owners of the library, its a clear sign of leadership, to take steps before anyone else. advertising has nothing to do with it. Currently 50k people are using the discord-buttons and imo many of them would support this PR. And to everyone who comments on this discussion after this message. Please dont comment if you havent used discord-buttons itself and dont know what it is.

@iCrawl
Copy link
Contributor

iCrawl commented Jun 21, 2021

All right, one last time:

we are making it easier for people to use the buttons.
Also as far as I understand, you don't accept someone making your package easier to use

While partially true, easy is very subjective. Your library does a lot more (which breaks our interface for even something as simple as sending messages/interactions).

This is how you send messages with components using discord.js:
https://discord.js.org/#/docs/main/master/class/TextChannel?scrollTo=send

.send({ content: 'something', components: [row] });
.send({ content: 'something', components: [] });
.send({ content: 'something', components: [[btn1, btn2], [btn3, btn4]] });

This is how you send messages with components using your module:

.send('something', row);
.send('something', null);
.send('something', { buttons: [btn1, btn2] });

Now what happens when select menus release? Users will come to us with:

"Why does this not work"

.send('something', { buttons: [btn1, btn2], components: [[select1, select2]] });

Or are you going to add components X (name it whatever) to discord-buttons too? That seems like an unfortunate package name then.

We already get a huge influx of users asking us for support because something broke with how you normally use our library but breaks when they install discord-buttons because they primarily use the library not for buttons but use buttons as an addition. So why all those breaking interface modifications that are not backwards compatible with how you use discord.js normally?

This leads to all kinds of problems further down the line, the more components get released.

Also message#createMessageComponentInteractionCollector is waaaaayyyyy too long to type, who even thought of that?? Message#createButtonCollector is much easier.

If this is a serious debate point for you, have you considered bringing it up on our issue tracker or somewhere where we can give feedback on this?

The method is named like this for generic reasons, as it does not only collect button "clicks" but also select values and any future components that are supposed to be able to collect values from.

#3101 #3049 and many other community resources PR's were made by the owners of the library, it's a clear sign of leadership, to take steps before anyone else. advertising has nothing to do with it.

None of the ones you find on here are non-endorsed breaking modifications of a library that's listed here.

Currently 50k people are using the discord-buttons and imo many of them would support this PR.

Let's not kid anyone, 50k non-unique downloads on NPM are done in a matter of no time, whether that by constantly installing the package to test it or indexers, heck you could even spawn a few clusters and just hit the download endpoint on NPM. Not to diminish your success or numbers, it simply doesn't reflect usage statistics.

Personal opinion:
I do not think any heavy modifications (that is also breaking the general interface of a library) should be listed on the docs, despite the library itself implementing it properly. It is increasingly difficult for a big library to give support as it is already:

image

This is based over the last 28 days of activity. I am fair to say that we want to avoid any non-endorsed packages being used and users coming to us asking countless questions about why their bot is throwing weird errors relating to this module. As of today, we get multiple users daily coming to us asking why their buttons don't work and I don't see it stopping anytime soon. The only thing we can do is tell them we don't support discord-buttons and cannot offer any help regarding it. I do not want to imagine what happens when more components release and the case I described above will be put in effect.

@AngeloCore
Copy link
Author

AngeloCore commented Jun 21, 2021

Hello Crawl,

"While partially true, easy is very subjective."

You may be right, but doesn't < discord.js v13 use this type of messaging?
We try to make sure that users who use our package feel almost no difference between the discord.js v12 and discord-buttons methods

"Now what happens when select menus release? Users will come to us with:
Why does this not work"

Sorry but you are wrong here, with our add-on you can send components with many options:
component: MessageButton/MessageActionRow/null or empty array to remove buttons
components: array of rows/null or empty array to remove buttons
buttons: MessageButton/array of button/null or empty array to remove buttons
button: MessageButton/array of buttons/null or empty array to remove buttons
Also
.send('content', button)
.send('content', row)
.send('content', null) - remove all components
About the select menus, I can't tell you anything related to future updates

"We already get a huge influx of users asking us for support because something broke with how you normally use our library but breaks when they install discord-buttons because they primarily use the library not for buttons but use buttons as an addition. So why all those breaking interface modifications that are not backwards compatible with how you use discord.js normally?"

We're trying to try to deal with all the bugs.
But keep in mind that making an add-on is very different than just making a library

I personally don't see any problem with people who want to use our package doing so and those who don't not doing so

  • With big respect, Angelo

@iCrawl
Copy link
Contributor

iCrawl commented Jun 21, 2021

Hello,
I would like to ask what does discord-interactions-js, discord-slash-commands and slash-create do in the discord documentation when this is also implemented in djs v13?

They use JavaScript/TypeScript but do not extend/modify discord.js.
I don't see how this is relevant. I already covered that in my post above.

@xhyrom
Copy link

xhyrom commented Jun 21, 2021

They use JavaScript/TypeScript but do not extend/modify discord.js.
I don't see how this is relevant. I already covered that in my post above.

okay


obrázok
discord-interactions-js does not exist

@Assassin-1234
Copy link

They use JavaScript/TypeScript but do not extend/modify discord.js.
I don't see how this is relevant. I already covered that in my post above.

okay

obrázok
discord-interactions-js does not exist

https://www.npmjs.com/package/discord-interactions

@typpo
Copy link
Contributor

typpo commented Jun 21, 2021

Thanks for the PR, but moving forward we are no longer listing extensions to library interfaces in this documentation because of issues like this. If the library is useful as standalone tool, that's ok. Otherwise, library maintainers can choose to list extensions on their own sites/readmes.

@typpo typpo closed this Jun 21, 2021
@Townsy45
Copy link

Townsy45 commented Jul 8, 2021

gg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.