Skip to content

Commit

Permalink
feature/match history check compare (#383)
Browse files Browse the repository at this point in the history
* fix: config

* feature: check if player has matches
  • Loading branch information
JustDams authored Oct 13, 2023
1 parent e4f345e commit fc31bba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions commands/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ const sendCardWithInfo = async (interaction, player1Param, player2Param, type =
let maxMatchLimit
let limits

[player1, player2].filter(p => !p.playerHistory.length).map(p => {
throw getTranslation('error.user.noMatches', interaction.locale, {
playerName: p.playerDatas.nickname,
})
})

if (map) {
[player1, player2].map(p => {
mapStats = p.playerStats.segments.filter(segment => segment.label === map && segment.mode === '5v5')
Expand Down

0 comments on commit fc31bba

Please sign in to comment.