Skip to content

Commit

Permalink
update falgames package (#132)
Browse files Browse the repository at this point in the history
* feat: update falgames package

* feat: increase roll limit

* feat: add snake option scoreText in the right place

* fix: add missing result message and fix score message
  • Loading branch information
falcao-g authored Jan 15, 2024
1 parent 3a4b715 commit 41e8af2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"discord.js": "^14.9.0",
"dotenv": "^16.0.1",
"falgames": "^1.0.1",
"falgames": "^1.0.2",
"mongoose": "^6.8.0",
"simply-blackjack": "^1.0.3"
},
Expand Down
18 changes: 9 additions & 9 deletions src/commands/fun/games.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module.exports = {
.setRequired(true)
)
),
execute: async ({ interaction, instance, subcommand }) => {
execute: async ({ interaction, instance, subcommand, member }) => {
try {
try {
var type = interaction.options.getSubcommand();
Expand All @@ -145,7 +145,7 @@ module.exports = {
embed: {
title: ':brain: Connect4',
statusTitle: 'Status',
color: '#6E0070',
color: member.displayColor,
},
emojis: {
board: '⚪',
Expand All @@ -167,7 +167,7 @@ module.exports = {
isSlashGame: true,
embed: {
title: instance.getMessage(interaction, 'FIND_EMOJI'),
color: '#6E0070',
color: member.displayColor,
description: instance.getMessage(interaction, 'REMEMBER_THE_EMOJIS'),
findDescription: instance.getMessage(interaction, 'FIND_EMOJI_DESCRIPTION'),
},
Expand All @@ -186,7 +186,7 @@ module.exports = {
isSlashGame: true,
embed: {
title: instance.getMessage(interaction, 'FLOOD_GAME'),
color: '#6E0070',
color: member.displayColor,
},
difficulty: 13,
timeoutTime: 60000,
Expand All @@ -202,7 +202,7 @@ module.exports = {
isSlashGame: true,
embed: {
title: instance.getMessage(interaction, 'MATCH_PAIRS'),
color: '#6E0070',
color: member.displayColor,
description: instance.getMessage(interaction, 'MATCH_PAIRS_DESCRIPTION'),
},
timeoutTime: 60000,
Expand All @@ -217,7 +217,7 @@ module.exports = {
isSlashGame: true,
embed: {
title: instance.getMessage(interaction, 'MINESWEEPER'),
color: '#6E0070',
color: member.displayColor,
description: instance.getMessage(interaction, 'MINESWEEPER_DESCRIPTION'),
},
emojis: { flag: '🚩', mine: '💣' },
Expand All @@ -234,7 +234,8 @@ module.exports = {
embed: {
title: instance.getMessage(interaction, 'SNAKE_GAME'),
overTitle: instance.getMessage(interaction, 'GAME_OVER'),
color: '#6E0070',
scoreText: instance.getMessage(interaction, 'SCORE'),
color: member.displayColor,
},
emojis: {
board: '⬛',
Expand All @@ -248,7 +249,6 @@ module.exports = {
stopButton: instance.getMessage(interaction, 'STOP'),
timeoutTime: 60000,
playerOnlyMessage: instance.getMessage(interaction, 'PLAYER_ONLY'),
scoreText: instance.getMessage(interaction, 'SCORE'),
});
} else if (type === 'tictactoe') {
var Game = new TicTacToe({
Expand All @@ -257,7 +257,7 @@ module.exports = {
opponent: interaction.options.getUser('opponent'),
embed: {
title: instance.getMessage(interaction, 'TICTACTOE'),
color: '#6E0070',
color: member.displayColor,
statusTitle: 'Status',
overTitle: instance.getMessage(interaction, 'GAME_OVER'),
},
Expand Down
2 changes: 1 addition & 1 deletion src/commands/fun/roll.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
new Roll({
message: interaction,
rollLimitMessage: instance.getMessage(interaction, 'ROLL_LIMIT'),
rolledStringLimit: 300, // this argument and the one above and below don't exist yet, but they will
rolledStringLimit: 1024,
notValidRollMessage: instance.getMessage(interaction, 'BAD_VALUE'),
isSlashGame: true,
embed: {
Expand Down
11 changes: 8 additions & 3 deletions src/utils/json/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@
"es-ES": "¡Listo!"
},
"SCORE": {
"pt-BR": "Pontuação",
"en-US": "Score",
"es-ES": "Puntuación"
"pt-BR": "**Pontuação:**",
"en-US": "**Score:**",
"es-ES": "**Puntuación:**"
},
"FALGAMES_MOVE": {
"pt-BR": "{emoji} | É a vez do jogador **{player}**.",
Expand Down Expand Up @@ -1806,6 +1806,11 @@
"en-US": "You lost the Game! Beaware of the mines next time.",
"es-ES": "¡Perdiste el juego! Ten cuidado con las minas la próxima vez."
},
"RESULT": {
"pt-BR": "Resultado",
"en-US": "Result",
"es-ES": "Resultado"
},
"1": {
"pt-BR": ":potato: Plebeu",
"en-US": ":potato: Peasent",
Expand Down

0 comments on commit 41e8af2

Please sign in to comment.