Skip to content

Commit

Permalink
Hotfix #192
Browse files Browse the repository at this point in the history
  • Loading branch information
BastLast committed Sep 9, 2020
1 parent c8112b8 commit 9dd785c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commands/player/ShopCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ async function sellItem(message, reaction, language, entity, customer, selectedI
} else if (
selectedItem.name === shopTranslations.permanentItems.guildXp.name
) {
await giveGuildXp(message, language, entity, customer, selectedItem);
if (!await giveGuildXp(message, language, entity, customer, selectedItem))
return;//if no guild, no need to proceed
}
entity.Player.addMoney(-selectedItem.price); //Remove money
} else {
Expand Down Expand Up @@ -375,8 +376,10 @@ async function giveGuildXp(message, language, entity, customer, selectedItem) {
})
)
);
return true
} catch (err) {
sendErrorMessage(message.author, message.channel, language, JsonReader.commands.guild.getTranslation(language).noGuildException);
sendErrorMessage(customer, message.channel, language, JsonReader.commands.guild.getTranslation(language).noGuildException);
return false;
}
}

Expand Down

0 comments on commit 9dd785c

Please sign in to comment.