-
-
Notifications
You must be signed in to change notification settings - Fork 91
Dynamically create and delete voice channels based on activity #1114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
51f997f
to
2f14b7d
Compare
I haven't looked at the code yet but I have some suggestions for the functionality.
Importantly, the existing channels should be protected from the changes that get implemented here. This is just an IMO - we should wait for further feedback first. |
6b9a125
to
ed46d62
Compare
I love @tj-wazei suggestions, we shouldnt delete channels immediately and one more thing to add. We also wanna cap channel count to a certain limit. For example we can't have more than say 3 channels per category for now. We can put this limit in configuration so it's easily tweaked without making changes to code by maintainers. |
ed46d62
to
6c50157
Compare
application/src/main/java/org/togetherjava/tjbot/features/dynamicvc/DynamicVoiceListener.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/dynamicvc/DynamicVoiceListener.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/dynamicvc/DynamicVoiceListener.java
Outdated
Show resolved
Hide resolved
6c50157
to
4bca50e
Compare
Going to help work on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(partial review. still have to checkout the actual logic of the feature)
/** | ||
* @param joinChannel the join channel | ||
* @param leftChannel the leave channel | ||
* @return the join channel if not null, otherwise the leave channel, otherwise an empty | ||
* optional | ||
*/ | ||
private Optional<Channel> calculateSubscribeTarget(@Nullable AudioChannelUnion joinChannel, | ||
@Nullable AudioChannelUnion leftChannel) { | ||
if (joinChannel != null) { | ||
return Optional.of(joinChannel); | ||
} | ||
|
||
return Optional.ofNullable(leftChannel); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im not sure i follow what this does. who is join channel and who is left channel?
@@ -151,6 +152,9 @@ public static Collection<Feature> createFeatures(JDA jda, Database database, Con | |||
features.add(new SlashCommandEducator()); | |||
features.add(new PinnedNotificationRemover(config)); | |||
|
|||
// Voice receivers | |||
features.add(new DynamicVoiceListener(config)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id rename the feature to DynamicVoiceChannelListener
, i.e. add Channel
to signal that it deals with managing channels, not voice itself
Closes #1113.
Media
Configuration changes
dynamicVoiceChannelPatterns