Skip to content

Commit

Permalink
potion that came into the inventory cannot be sold
Browse files Browse the repository at this point in the history
  • Loading branch information
BastLast committed Aug 24, 2020
1 parent 9e40c8b commit a0a7615
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/Tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ global.giveRandomItem = async (discordUser, channel, language, entity) => {
entity.Player.Inventory.save(),
]);
await channel.send(embed);
if (item instanceof Potions) {
return; // potion are not sold (because of exploits and because of logic)
}
item = oldItem;
}
}
Expand Down Expand Up @@ -385,7 +388,7 @@ global.resetIsNow = function () {
* Allow to get the validation information of a guild
* @param {module:"discord.js".Guild} guild - The guild that has to be checked
*/
global.getValidationInfos = function(guild) {
global.getValidationInfos = function (guild) {
let humans = guild.members.cache.filter(member => !member.user.bot).size;
let bots = guild.members.cache.filter(member => member.user.bot).size;
let ratio = Math.round((bots / humans) * 100);
Expand Down

0 comments on commit a0a7615

Please sign in to comment.