Merge branch 'develop'
This commit is contained in:
commit
266801bc5d
@ -194,8 +194,8 @@ 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 (CacheTools.getJdaUser(stats.getUser()) != null) {
|
||||||
String avatar = MainBot.jda.getUserById(stats.getUser().getJdaId()).getEffectiveAvatarUrl();
|
String avatar = CacheTools.getJdaUser(stats.getUser()).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())) {
|
||||||
|
@ -168,7 +168,7 @@ public class GeneralWebView {
|
|||||||
model.addAttribute("stack", stack);
|
model.addAttribute("stack", stack);
|
||||||
try {
|
try {
|
||||||
UserEntity userE = userUtils.getUserWithApiToken(userRepository, token);
|
UserEntity userE = userUtils.getUserWithApiToken(userRepository, token);
|
||||||
User user = MainBot.jda.getUserById(userE.getJdaId());
|
User user = CacheTools.getJdaUser(userE);
|
||||||
addGuildAndRedirect(model, token, cookieGuildId, user);
|
addGuildAndRedirect(model, token, cookieGuildId, user);
|
||||||
} catch (UnknownTokenException e) {
|
} catch (UnknownTokenException e) {
|
||||||
throw new ForbiddenException();
|
throw new ForbiddenException();
|
||||||
|
Loading…
Reference in New Issue
Block a user