Skip to content

Commit 3ed3d9a

Browse files
authored
Fixed QOTW setting wrong permissions for submission channel (#302)
1 parent 4ec0691 commit 3ed3d9a

File tree

1 file changed

+2
-1
lines changed
  • src/main/java/net/javadiscord/javabot/systems/qotw

1 file changed

+2
-1
lines changed

src/main/java/net/javadiscord/javabot/systems/qotw/QOTWJob.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.sql.SQLException;
2323
import java.time.OffsetDateTime;
2424
import java.util.Collections;
25+
import java.util.Set;
2526

2627
/**
2728
* Job which posts a new question to the QOTW channel.
@@ -47,7 +48,7 @@ protected void execute(JobExecutionContext context, JDA jda) throws JobExecution
4748
QOTWConfig qotw = config.getQotw();
4849
qotw.getSubmissionChannel().getThreadChannels().forEach(thread -> thread.getManager().setLocked(true).setArchived(true).queue());
4950
qotw.getSubmissionChannel().getManager()
50-
.putRolePermissionOverride(guild.getIdLong(), Collections.singleton(Permission.MESSAGE_SEND_IN_THREADS), Collections.emptySet())
51+
.putRolePermissionOverride(guild.getIdLong(), Set.of(Permission.VIEW_CHANNEL, Permission.MESSAGE_SEND_IN_THREADS), Collections.emptySet())
5152
.queue();
5253
if (question.getQuestionNumber() == null) {
5354
question.setQuestionNumber(repo.getNextQuestionNumber());

0 commit comments

Comments
 (0)