mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-26 12:35:20 +01:00
Fix using wrong field in MinecraftToDiscordChatModule
This commit is contained in:
parent
26aac4d4e2
commit
bab1d4a765
@ -61,6 +61,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class MinecraftToDiscordChatModule extends AbstractGameMessageModule<MinecraftToDiscordChatConfig, GameChatMessageReceiveEvent> {
|
||||
|
||||
// TODO: allow disabling these
|
||||
private final Map<Long, Map<Long, CachedMention>> memberMentions = new ConcurrentHashMap<>();
|
||||
private final Map<Long, Map<Long, CachedMention>> roleMentions = new ConcurrentHashMap<>();
|
||||
private final Map<Long, Map<Long, CachedMention>> channelMentions = new ConcurrentHashMap<>();
|
||||
@ -219,7 +220,7 @@ public class MinecraftToDiscordChatModule extends AbstractGameMessageModule<Mine
|
||||
}
|
||||
|
||||
private Map<Long, CachedMention> getMemberMentions(Guild guild) {
|
||||
return channelMentions.computeIfAbsent(guild.getIdLong(), key -> {
|
||||
return memberMentions.computeIfAbsent(guild.getIdLong(), key -> {
|
||||
Map<Long, CachedMention> mentions = new LinkedHashMap<>();
|
||||
for (Member member : guild.getMembers()) {
|
||||
mentions.put(member.getIdLong(), convertMember(member));
|
||||
@ -259,7 +260,7 @@ public class MinecraftToDiscordChatModule extends AbstractGameMessageModule<Mine
|
||||
}
|
||||
|
||||
private Map<Long, CachedMention> getChannelMentions(Guild guild) {
|
||||
return memberMentions.computeIfAbsent(guild.getIdLong(), key -> {
|
||||
return channelMentions.computeIfAbsent(guild.getIdLong(), key -> {
|
||||
Map<Long, CachedMention> mentions = new LinkedHashMap<>();
|
||||
for (GuildChannel channel : guild.getChannels()) {
|
||||
mentions.put(channel.getIdLong(), convertChannel(channel));
|
||||
|
Loading…
Reference in New Issue
Block a user