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

feat: Adjustable player count per game / lobby #3

Open
sudojunior opened this issue May 7, 2022 · 1 comment
Open

feat: Adjustable player count per game / lobby #3

sudojunior opened this issue May 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@sudojunior
Copy link
Member

Add a field to the game metadata to provide a dynamic player count setting.

{
type: ComponentType.BUTTON,
label: 'Join',
custom_id: 'join',
disabled: players.length >= 15,
style: ButtonStyle.PRIMARY,
emoji: {
name: '📥'
}
},

if (game.players.length >= 15) {
return reply('The game is full.');
}

@sudojunior sudojunior added the enhancement New feature or request label May 7, 2022
@sudojunior sudojunior changed the title Adjustable player count per game / lobby feat: Adjustable player count per game / lobby May 7, 2022
@sudojunior
Copy link
Member Author

Another reference in embed field building

if (index === 0) {
fields[0].name = `Roster (${players.length} / 15)`;
}

@sudojunior sudojunior assigned sudojunior and unassigned sudojunior May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant