Skip to content
This repository was archived by the owner on Jun 9, 2024. It is now read-only.

Commit 51c7618

Browse files
authored
Merge pull request #627 from mewna/feature/text-in-voice-channels
feature: Initial text-in-voice implementation
2 parents 24f0c05 + c62b052 commit 51c7618

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

src/main/java/com/mewna/catnip/entity/channel/VoiceChannel.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@
2828
package com.mewna.catnip.entity.channel;
2929

3030
import javax.annotation.CheckReturnValue;
31+
import javax.annotation.Nullable;
3132

3233
/**
3334
* A voice channel in a guild.
3435
*
3536
* @author natanbc
3637
* @since 9/12/18
3738
*/
38-
public interface VoiceChannel extends GuildChannel {
39+
public interface VoiceChannel extends TextChannel {
3940
/**
4041
* @return The bitrate of this channel. Will be from 8 to 96.
4142
*/
@@ -76,4 +77,27 @@ default boolean isVoice() {
7677
default boolean isCategory() {
7778
return false;
7879
}
80+
81+
/**
82+
* Voice channels will never have a topic.
83+
*
84+
* @return {@code null}
85+
*/
86+
@Nullable
87+
@Override
88+
default String topic() {
89+
return null;
90+
}
91+
92+
@Override
93+
default boolean nsfw() {
94+
// TODO: Wait for confirmation from maxg about this flag, currently TBD
95+
return false;
96+
}
97+
98+
@Override
99+
default int rateLimitPerUser() {
100+
// TODO: Wait for confirmation from maxg about this, currently TBD
101+
return 0;
102+
}
79103
}

src/main/java/com/mewna/catnip/entity/guild/GuildFeature.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ public enum GuildFeature {
146146
* Needs {@link PremiumTier TIER_3}
147147
*/
148148
ANIMATED_BANNER,
149+
MEMBER_PROFILES,
150+
TEXT_IN_VOICE_ENABLED,
151+
PREMIUM_TIER_3_OVERRIDE,
149152
/**
150153
* Needs {@link PremiumTier TIER_3}
151154
* See https://github.com/Discord-Datamining/Discord-Datamining/commit/4c6e7180e67fa439c0a550afe016d418c21146b9

0 commit comments

Comments
 (0)