Update Lavaplayer (Fix music bug) and JDA

This commit is contained in:
Sebastien 2019-06-04 23:06:17 +02:00
parent da11c93e0a
commit e9b42f6938
3 changed files with 9 additions and 7 deletions

View File

@ -56,8 +56,8 @@ dependencies {
compile("org.springframework.boot:spring-boot-starter-log4j2") compile("org.springframework.boot:spring-boot-starter-log4j2")
compile("com.sedmelluq:lavaplayer:1.3.10") compile("com.sedmelluq:lavaplayer:1.3.17")
compile 'net.dv8tion:JDA:3.8.1_437' compile 'net.dv8tion:JDA:3.8.3_463'
compile group: 'org.json', name: 'json', version: '20160810' compile group: 'org.json', name: 'json', version: '20160810'
compile 'org.springframework.security:spring-security-web:5.0.1.RELEASE' compile 'org.springframework.security:spring-security-web:5.0.1.RELEASE'
// JPA Data (We are going to use Repositories, Entities, Hibernate, etc...) // JPA Data (We are going to use Repositories, Entities, Hibernate, etc...)

View File

@ -194,17 +194,18 @@ public class UserStatsUtils {
List<UserStats> allStats = userStatsRepository.findByGuildId(guildId); List<UserStats> allStats = userStatsRepository.findByGuildId(guildId);
List<GuildStats> ranked = new ArrayList<>(); List<GuildStats> ranked = new ArrayList<>();
for(UserStats stats : allStats){ for(UserStats stats : allStats){
if(MainBot.jda.getUserById(stats.getUser().getJdaId()) != null){ if(MainBot.jda.getUserById(stats.getUser().getJdaId()) != null) {
String avatar = MainBot.jda.getUserById(stats.getUser().getJdaId()).getEffectiveAvatarUrl(); String avatar = MainBot.jda.getUserById(stats.getUser().getJdaId()).getEffectiveAvatarUrl();
GuildStats temp = new GuildStats(stats.getUser().getName(), 0, avatar, stats.getVocalTime(), stats.getMessageCount(), stats.getApiCommandCount()); GuildStats temp = new GuildStats(stats.getUser().getName(), 0, avatar, stats.getVocalTime(), stats.getMessageCount(), stats.getApiCommandCount());
if(stats.getUser().getId().equals(userEntity.getId())){ if (stats.getUser().getId().equals(userEntity.getId())) {
selfGuildStats = temp; selfGuildStats = temp;
} }
ranked.add(temp); ranked.add(temp);
} }
} }
ranked.sort((guildStats, t1) -> (int) (t1.total - guildStats.total)); ranked.sort((guildStats, t1) -> (int) (t1.total - guildStats.total));

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"> <html xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
@ -47,7 +47,8 @@
</div> </div>
</div> </div>
<div class="section no-pad-bot container main" id="index-banner"><div th:if="${isLogged} == false"> <div class="section no-pad-bot container main" id="index-banner">
<div th:if="${isLogged} == false">
<div class="row valign-wrapper"> <div class="row valign-wrapper">
<div class="col m6 offset-s2 s8 center"> <div class="col m6 offset-s2 s8 center">
<img src="/favicon.png" class="responsive-img"/> <img src="/favicon.png" class="responsive-img"/>