Skip to content

Commit

Permalink
fix wrong event reward
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaktushose committed Dec 15, 2023
1 parent bb4490c commit f6a638d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import de.kaktushose.levelbot.database.services.LevelService;
import de.kaktushose.levelbot.database.services.UserService;
import de.kaktushose.levelbot.shop.data.ShopService;
import de.kaktushose.levelbot.shop.data.items.ItemCategory;
import de.kaktushose.levelbot.shop.data.items.ItemVariant;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.entities.User;
Expand Down Expand Up @@ -66,8 +68,8 @@ public void onGuildMessageReceived(@NotNull GuildMessageReceivedEvent event) {
.toMessageEmbed())
).queue();
} else if (eventPoints == 50) {
userService.addXp(userId, 50);

shopService.addItem(userId, ItemCategory.PREMIUM, ItemVariant.BASIC);
guild.addRoleToMember(userId, guild.getRoleById(386302591883018242L)).queue();
channel.sendMessage(author.getAsMention())
.and(channel.sendMessageEmbeds(embedCache.getEmbed("collectEventItemReward")
.injectValue("user", author.getName())
Expand Down

0 comments on commit f6a638d

Please sign in to comment.