Skip to content

Commit

Permalink
Follow dmk suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
vLuckyyy committed Oct 25, 2023
1 parent ad1ea4b commit a76a3bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ private void givePoints(MessageReceivedEvent event) {
double points = (double) message.length / this.experienceConfig.messageExperience.howManyWords * basePoints;
long userId = event.getAuthor().getIdLong();

long idLong = event.getChannel().getIdLong();
this.experienceService.modifyPoints(userId, points, true, idLong).whenComplete((experience, throwable) -> {
long channelId = event.getChannel().getIdLong();
this.experienceService.modifyPoints(userId, points, true, channelId).whenComplete((experience, throwable) -> {
if (throwable != null) {
throwable.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public void onMessageReceived(MessageReceivedEvent event) {
return;
}

long idLong = event.getChannel().getIdLong();
long channelId = event.getChannel().getIdLong();

if (idLong != this.codeGameConfiguration.channelId) {
if (channelId != this.codeGameConfiguration.channelId) {
return;
}

Expand Down Expand Up @@ -68,7 +68,7 @@ public void onMessageReceived(MessageReceivedEvent event) {
.setDescription(formatter.format(this.codeGameConfiguration.embedSettings.description))
.setFooter(this.codeGameConfiguration.embedSettings.footer);

this.experienceService.modifyPoints(event.getAuthor().getIdLong(), points, true, idLong)
this.experienceService.modifyPoints(event.getAuthor().getIdLong(), points, true, channelId)
.whenComplete((experience, throwable) -> {
if (throwable != null) {
throwable.printStackTrace();
Expand Down

0 comments on commit a76a3bd

Please sign in to comment.