Skip to content

Commit

Permalink
fix: invalid hero msg, and rm apostrophe in nature's prophet
Browse files Browse the repository at this point in the history
  • Loading branch information
Geczy committed Oct 9, 2023
1 parent f6e2375 commit 61dbf86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/dota/src/dota/lib/heroes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const heroes = {
},
npc_dota_hero_furion: {
id: 53,
localized_name: "Nature's Prophet",
localized_name: 'Natures Prophet',
alias: ['np', 'natures prophet', 'furion'],
},
npc_dota_hero_life_stealer: {
Expand Down
4 changes: 2 additions & 2 deletions packages/dota/src/twitch/lib/getPlayerFromArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function getPlayerFromArgs({
.join(' · ')

if (!args.length) {
if (heroIdsInMatch.length > 1) {
if (heroIdsInMatch.filter(Boolean).length > 1) {
throw new CustomError(t('invalidHero', { command, heroList, lng: locale }))
}

Expand Down Expand Up @@ -53,7 +53,7 @@ export async function getPlayerFromArgs({
}

if (playerIdx < 0 || playerIdx > 9) {
if (heroIdsInMatch.length > 1) {
if (heroIdsInMatch.filter(Boolean).length > 1) {
throw new CustomError(t('invalidHero', { command, heroList, lng: locale }))
}

Expand Down

0 comments on commit 61dbf86

Please sign in to comment.