update JDA and jda Utilities version

fixed typos in the code
This commit is contained in:
Sheldan
2020-06-28 12:04:34 +02:00
parent c44eb80fc5
commit e8767429bf
40 changed files with 106 additions and 107 deletions

View File

@@ -31,7 +31,7 @@ import java.util.List;
@Slf4j
public class LeaderBoardCommand extends AbstractConditionableCommand {
public static final String LEADERBOARD_POST_EMBED_TEMPLATE = "leaderboard_post";
public static final String LEADER_BOARD_POST_EMBED_TEMPLATE = "leaderboard_post";
@Autowired
private AUserExperienceService userExperienceService;
@@ -57,7 +57,7 @@ public class LeaderBoardCommand extends AbstractConditionableCommand {
LeaderBoardEntry userRank = userExperienceService.getRankOfUserInServer(commandContext.getUserInitiatedContext().getAUserInAServer());
leaderBoardModel.setUserExecuting(converter.fromLeaderBoardEntry(userRank));
MessageToSend messageToSend = templateService.renderEmbedTemplate(LEADERBOARD_POST_EMBED_TEMPLATE, leaderBoardModel);
MessageToSend messageToSend = templateService.renderEmbedTemplate(LEADER_BOARD_POST_EMBED_TEMPLATE, leaderBoardModel);
channelService.sendMessageToSendToChannel(messageToSend, commandContext.getChannel());
return CommandResult.fromSuccess();

View File

@@ -21,7 +21,7 @@ public interface UserExperienceRepository extends JpaRepository<AUserExperience
/**
* Finds all {@link AUserExperience} of the given {@link AServer}
* @param server The {@link AServer} to retriev ethe {@link AUserExperience} for
* @param server The {@link AServer} to retrieve ethe {@link AUserExperience} for
* @return A complete list of {@link AUserExperience} of the given {@link AServer}
*/
@QueryHints(@QueryHint(name = org.hibernate.annotations.QueryHints.CACHEABLE, value = "true"))
@@ -30,7 +30,7 @@ public interface UserExperienceRepository extends JpaRepository<AUserExperience
/**
* Retrieves the {@link AUserExperience} ordered by experience, and applies the {@link Pageable} to only filter out certain pages.
* @param server The {@link AServer} to retrieve the {@link AUserExperience} information for
* @param pageable A {@link Pageable} object to indicate the pages which should be retrieved, pagesize is 10
* @param pageable A {@link Pageable} object to indicate the pages which should be retrieved, page size is 10
* @return A list of {@link AUserExperience} of the given {@link AServer} ordered by the experience of the users, paginated by the given
* configuration
*/

View File

@@ -302,10 +302,10 @@ public class AUserExperienceServiceBean implements AUserExperienceService {
}
/**
* Retrieves the leaderboard data for the given page of the given server
* @param server The {@link AServer} to retrieve the leaderboard for
* @param page The desired page on the leaderboard. The pagesize is 10
* @return The {@link LeaderBoard} containing all necessary information concerning the leaderboard
* Retrieves the leader board data for the given page of the given server
* @param server The {@link AServer} to retrieve the leader board for
* @param page The desired page on the leader board. The page size is 10
* @return The {@link LeaderBoard} containing all necessary information concerning the leader board
*/
@Override
public LeaderBoard findLeaderBoardData(AServer server, Integer page) {
@@ -326,7 +326,7 @@ public class AUserExperienceServiceBean implements AUserExperienceService {
/**
* Builds an {@link AUserExperience} and loads the appropriate rank of the passed {@link AUserInAServer}
* @param userInAServer The {@link AUserInAServer} to retrieve the {@link LeaderBoardEntry} for
* @return The {@link LeaderBoardEntry} representing one single row in the leaderboard
* @return The {@link LeaderBoardEntry} representing one single row in the leader board
*/
@Override
public LeaderBoardEntry getRankOfUserInServer(AUserInAServer userInAServer) {

View File

@@ -30,10 +30,10 @@ public class ExperienceRoleServiceBean implements ExperienceRoleService {
private AUserExperienceService userExperienceService;
/**
* Unsets the current configuration for the passed level, and sets the {@link ARole} to be used for this level
* UnSets the current configuration for the passed level, and sets the {@link ARole} to be used for this level
* in the given {@link AServer}
* @param role The {@link ARole} to set the level to
* @param level The level the {@link ARole} should be awareded at
* @param level The level the {@link ARole} should be awarded at
*/
@Override
public void setRoleToLevel(ARole role, Integer level, AChannel feedbackChannel) {

View File

@@ -58,7 +58,7 @@ public class UserExperienceManagementServiceBean implements UserExperienceManage
* Creates or updates the {@link AUserExperience} object. Does not change the level or the role.
* @param user The {@link AUserInAServer} to increase the experience for
* @param experience The experience amount to increase by
* @param messageCount The amount of messags to increase the count by
* @param messageCount The amount of messages to increase the count by
* @return The created/changed {@link AUserExperience} object
*/
@Override

View File

@@ -67,7 +67,7 @@ public class LeaderBoardCommandTest {
LeaderBoardEntryModel leaderBoardEntryModel = LeaderBoardEntryModel.builder().build();
when(converter.fromLeaderBoardEntry(executingUserRank)).thenReturn(leaderBoardEntryModel);
MessageToSend messageToSend = MessageToSend.builder().build();
when(templateService.renderEmbedTemplate(eq(LeaderBoardCommand.LEADERBOARD_POST_EMBED_TEMPLATE), any(LeaderBoardModel.class))).thenReturn(messageToSend);
when(templateService.renderEmbedTemplate(eq(LeaderBoardCommand.LEADER_BOARD_POST_EMBED_TEMPLATE), any(LeaderBoardModel.class))).thenReturn(messageToSend);
CommandResult result = testUnit.execute(context);
verify(channelService, times(1)).sendMessageToSendToChannel(messageToSend, context.getChannel());
CommandTestUtilities.checkSuccessfulCompletion(result);