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

Player Emoji #436

Closed
CyberJack773 opened this issue Feb 11, 2023 · 5 comments · Fixed by #537
Closed

Player Emoji #436

CyberJack773 opened this issue Feb 11, 2023 · 5 comments · Fixed by #537
Labels
status: open to PR Low priority enhancements that anyone is welcome to contribute. type: enhancement Features and feature requests.

Comments

@CyberJack773
Copy link

Display player emoji too with the status of the game like {emoji} | Its now @user turn!

@CyberJack773 CyberJack773 added the type: enhancement Features and feature requests. label Feb 11, 2023
@CyberJack773
Copy link
Author

CyberJack773 commented Feb 11, 2023

and also add an option to not remove buttons on game exipiry and change duelrequest filter to this

const filter = (interaction) => {
            if (interaction.user.id === this.invited.id) return true;
            return interaction.reply({
                content: `Only <@${this.invited.id}> can use these buttons!`,
                ephemeral: true,
            });
        };

@CyberJack773
Copy link
Author

CyberJack773 commented Feb 11, 2023

and gameboard filter to

const filter = (interaction) => {
            if (interaction.user.id !== currentEntity && (interaction.user.id === this.entities[0].id || interaction.user.id === this.entities[1].id)) return interaction.reply({
                content: `Wait for opponent... (<@${currentEntity}>)`,
                ephemeral: true,
            });
              else if (interaction.user.id !== currentEntity && (interaction.user.id !== this.entities[0].id && interaction.user.id !== this.entities[1].id)) return interaction.reply({
                content: `You cannot use these buttons!`,
                ephemeral: true,
            });
  else if (!this.game.isMoveValid(GameBoard.buttonIdentifierToMove(interaction.customId)) && (interaction.user.id === this.entities[0].id || interaction.user.id === this.entities[1].id)) return interaction.reply({
                content: `You cannot place there!`,
                ephemeral: true,
            });
  else return true;
        };

@CyberJack773
Copy link
Author

@utarwyn those two codes add ephemeral msgs instead of just showing this interaction failed

@utarwyn utarwyn added the status: open to PR Low priority enhancements that anyone is welcome to contribute. label Feb 11, 2023
@CyberJack773
Copy link
Author

sorry i had done a mistake i fixed it should work now

@CyberJack100000
Copy link

@utarwyn read my entire message except the codeblocks please since i have suggested a few more things other than ephemeral messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: open to PR Low priority enhancements that anyone is welcome to contribute. type: enhancement Features and feature requests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants