Skip to content

Commit 6bbb58d

Browse files
committed
chore: update channel used in ThisIsScamCommand to modmail instead of mod-audit-logs
1 parent 9161868 commit 6bbb58d

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

application/src/main/java/org/togetherjava/tjbot/features/moderation/ThisIsScamCommand.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public final class ThisIsScamCommand extends BotCommandAdapter implements Messag
6666

6767
private final Config config;
6868
private final ModerationActionsStore actionsStore;
69-
private final Predicate<String> isModAuditLogChannel;
69+
private final Predicate<String> isModMailChannel;
7070

7171
private final Cache<Long, Instant> reportedMessageToTimestamp =
7272
Caffeine.newBuilder().maximumSize(10_000).expireAfterWrite(Duration.ofDays(1)).build();
@@ -86,8 +86,7 @@ public ThisIsScamCommand(Config config, ModerationActionsStore actionsStore) {
8686

8787
this.config = Objects.requireNonNull(config);
8888
this.actionsStore = Objects.requireNonNull(actionsStore);
89-
isModAuditLogChannel =
90-
Pattern.compile(config.getModAuditLogChannelPattern()).asMatchPredicate();
89+
isModMailChannel = Pattern.compile(config.getModMailChannelPattern()).asMatchPredicate();
9190
}
9291

9392
@Override
@@ -152,8 +151,7 @@ private boolean handleWasAlreadyReportedMessage(MessageContextInteractionEvent e
152151

153152
private Optional<TextChannel> findModAuditLogChannel(MessageContextInteractionEvent event) {
154153
Guild guild = Objects.requireNonNull(event.getGuild());
155-
Optional<TextChannel> modAuditLogChannel =
156-
Guilds.findTextChannel(guild, isModAuditLogChannel);
154+
Optional<TextChannel> modAuditLogChannel = Guilds.findTextChannel(guild, isModMailChannel);
157155
if (modAuditLogChannel.isEmpty()) {
158156
logger.warn(
159157
"Cannot find the designated mod audit log channel in guild '{}' with the pattern '{}'",

0 commit comments

Comments
 (0)