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

Disable Idle Buttons #354

Closed
CyberJack10000 opened this issue Oct 15, 2022 · 44 comments
Closed

Disable Idle Buttons #354

CyberJack10000 opened this issue Oct 15, 2022 · 44 comments
Assignees
Labels
type: enhancement Features and feature requests.
Milestone

Comments

@CyberJack10000
Copy link

When a game ends with the buttons disabled option set to true, the idle/secondary buttons which havent been used throughout the game arent disabled. I hope u add this functionality, I can also provide a sample code which disables all buttons in a message if you wish.

@CyberJack10000 CyberJack10000 added the type: enhancement Features and feature requests. label Oct 15, 2022
@CyberJack10000
Copy link
Author

Also by ephemeral mesages i meant that when u or anyother peron clicks a button, it sends the appropriate reply in an ephemeral message

@utarwyn
Copy link
Owner

utarwyn commented Oct 16, 2022

Hello, I did not actually think about this scenario... I'll work on it! Thanks for the feedback 👍

@utarwyn utarwyn self-assigned this Oct 17, 2022
@utarwyn utarwyn added this to the 3.x milestone Oct 17, 2022
@CyberJack10000
Copy link
Author

Thank you!

@CyberJack10000
Copy link
Author

Btw can u make it available for v13 too?

@CyberJack10000
Copy link
Author

Nvm it is v13

@CyberJack10000
Copy link
Author

CyberJack10000 commented Oct 18, 2022

Btw @utarwyn how do i enable ephemeral replies?

@utarwyn
Copy link
Owner

utarwyn commented Oct 18, 2022

Yes both versions v13 and v14 of discord.js are supported for now! What do you mean by ephemeral replies?

@CyberJack10000
Copy link
Author

The hidden messages only you can see

@CyberJack10000
Copy link
Author

@utarwyn

@utarwyn
Copy link
Owner

utarwyn commented Oct 18, 2022

Yes but to do what? Playing a private game?

@CyberJack10000
Copy link
Author

No lemme show

@CyberJack10000
Copy link
Author

@utarwyn

@utarwyn
Copy link
Owner

utarwyn commented Oct 18, 2022

Oh I see, you want to have an option to send all statuses inside ephemeral messages?

@CyberJack10000
Copy link
Author

yes

@CyberJack10000
Copy link
Author

@utarwyn can u pls inform me when it is done and which version it is?

@utarwyn
Copy link
Owner

utarwyn commented Oct 21, 2022

Buttons will be disabled when a game is over, from v3.2.0 (also v4.1.0)
Yes I have to work on ephemeral messages, but it will take more time to code. I'll keep you informed in this issue.

@CyberJack10000
Copy link
Author

Tysm!

@CyberJack10000
Copy link
Author

CyberJack10000 commented Oct 28, 2022

Btw i also forgot to add that when the game ends because of someone going idle the buttons will still be there but disabled when the withdisabled option is set to true also the same thing for the askmessage

@CyberJack10000
Copy link
Author

@utarwyn

@utarwyn
Copy link
Owner

utarwyn commented Nov 1, 2022

Yes I have to handle all use cases to disable buttons when not needed anymore 👍

@CyberJack10000
Copy link
Author

tyty

@CyberJack773
Copy link

are u done yet?(im just asking to see if ur still alive)

@Sophan-Developer
Copy link

Sophan-Developer commented Nov 25, 2022

image
Djs v14 doesn't work, When a game ends the buttons don't disable and I suggest using an Embed to make look cool.

@CyberJack10000
Copy link
Author

@utarwyn

@CyberJack10000
Copy link
Author

@Sophan-Developer i agree on the embed thing but making it an option will be better since many dont want it

@CyberJack10000
Copy link
Author

Also did u do withButtonsDisabled: true in the config?

@CyberJack773
Copy link

@utarwyn are you done yet?

@CyberJack10000
Copy link
Author

@utarwyn?

@CyberJack10000
Copy link
Author

Sorry if im being a bit impatient

@CyberJack773
Copy link

@utarwyn?

@utarwyn
Copy link
Owner

utarwyn commented Dec 24, 2022

Sorry for being inactive on that issue since a long time. I have worked recently on the module to add a level of difficulty of the AI. Disabled buttons will be available in the same version, it's the next thing I have to work onto 😉

@CyberJack10000
Copy link
Author

Ok tysm

@CyberJack10000
Copy link
Author

Btw dont forget to send statuses in ephemeral replies

@CyberJack10000
Copy link
Author

If by any chance you forgot, read the previous messages

@CyberJack773
Copy link

CyberJack773 commented Jan 14, 2023

@utarwyn i forgot to tell u to add an option for custom idle button emojis

@utarwyn
Copy link
Owner

utarwyn commented Jan 14, 2023

Idle button emoji?

@CyberJack10000
Copy link
Author

Yes like the dashemoji

@CyberJack10000
Copy link
Author

@CyberJack773
Copy link

@utarwyn (sorry for ping)

@CyberJack773
Copy link

that isn't to hard, is it?

@utarwyn
Copy link
Owner

utarwyn commented Jan 15, 2023

Ugh yes it's not hard I think

@utarwyn
Copy link
Owner

utarwyn commented Jan 19, 2023

These features are now available in both versions 3.2.0 (discord.js v13) and 4.1.0 (discord.js v14).

  • Use configuration key gameBoardDisableButtons to disable buttons when needed.
  • Use configuration key gameBoardEmbed to enable embed also for the game board.

npm project page: https://www.npmjs.com/package/discord-tictactoe
Releases page: https://github.com/utarwyn/discord-tictactoe/releases

@utarwyn utarwyn closed this as completed Jan 19, 2023
@CyberJack773
Copy link

tysmmmmmmmmmm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Features and feature requests.
Projects
None yet
Development

No branches or pull requests

4 participants