Skip to content

Commit d58418c

Browse files
committed
Last docs
1 parent 35b7cf2 commit d58418c

File tree

4 files changed

+82
-1
lines changed

4 files changed

+82
-1
lines changed

src/main/java/net/dv8tion/jda/api/entities/channel/VoiceChannelEffect.java

+52
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
import javax.annotation.Nonnull;
1010
import javax.annotation.Nullable;
1111

12+
/**
13+
* Represents an emoji effect or a soundboard sound effect.
14+
*/
1215
public class VoiceChannelEffect
1316
{
1417
private final VoiceChannel channel;
@@ -26,36 +29,64 @@ public VoiceChannelEffect(VoiceChannel channel, User user, EmojiUnion emoji, Ani
2629
this.soundboardSound = soundboardSound;
2730
}
2831

32+
/**
33+
* The voice channel this effect was sent to.
34+
*
35+
* @return The voice channel this effect was sent to.
36+
*/
2937
@Nonnull
3038
public VoiceChannel getChannel()
3139
{
3240
return channel;
3341
}
3442

43+
/**
44+
* The user which sent this effect.
45+
*
46+
* @return The user which sent this effect.
47+
*/
3548
@Nonnull
3649
public User getUser()
3750
{
3851
return user;
3952
}
4053

54+
/**
55+
* The emoji sent with the effect, this is only present for emoji effects.
56+
*
57+
* @return The emoji sent with the effect, or {@code null}
58+
*/
4159
@Nullable
4260
public EmojiUnion getEmoji()
4361
{
4462
return emoji;
4563
}
4664

65+
/**
66+
* The animation of the emoji, this is only present for emoji effects.
67+
*
68+
* @return The animation of the emoji, or {@code null}
69+
*/
4770
@Nullable
4871
public Animation getAnimation()
4972
{
5073
return animation;
5174
}
5275

76+
/**
77+
* The soundboard sound sent with the effect, this is only present for soundboard sound effects.
78+
*
79+
* @return The soundboard sound sent with the effect, or {@code null}
80+
*/
5381
@Nullable
5482
public SoundboardSound getSoundboardSound()
5583
{
5684
return soundboardSound;
5785
}
5886

87+
/**
88+
* Represents the animation used in emoji effects.
89+
*/
5990
public static class Animation implements ISnowflake
6091
{
6192
public Animation(long id, Animation.Type type)
@@ -73,12 +104,20 @@ public long getIdLong()
73104
return id;
74105
}
75106

107+
/**
108+
* The type of animation
109+
*
110+
* @return The type of animation
111+
*/
76112
@Nonnull
77113
public Animation.Type getType()
78114
{
79115
return type;
80116
}
81117

118+
/**
119+
* Represents the animation type used in emoji effects.
120+
*/
82121
public enum Type
83122
{
84123
UNKNOWN(-1),
@@ -92,11 +131,24 @@ public enum Type
92131
this.value = value;
93132
}
94133

134+
/**
135+
* The raw value of this animation type.
136+
*
137+
* @return The raw value
138+
*/
95139
public int getValue()
96140
{
97141
return value;
98142
}
99143

144+
/**
145+
* Retrieves the animation type from the raw value.
146+
*
147+
* @param value
148+
* The raw value of the animation type
149+
*
150+
* @return The animation type, or {@link #UNKNOWN} for invalid values
151+
*/
100152
@Nonnull
101153
public static Animation.Type fromValue(int value)
102154
{

src/main/java/net/dv8tion/jda/api/events/channel/VoiceChannelEffectSendEvent.java

+10
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,22 @@ public VoiceChannelEffectSendEvent(@Nonnull JDA api, long responseNumber, VoiceC
3939
this.effect = effect;
4040
}
4141

42+
/**
43+
* The voice channel the effect was sent to.
44+
*
45+
* @return The voice channel the effect was sent to.
46+
*/
4247
@Nonnull
4348
public VoiceChannel getVoiceChannel()
4449
{
4550
return effect.getChannel();
4651
}
4752

53+
/**
54+
* The effect that was sent.
55+
*
56+
* @return The effect that was sent.
57+
*/
4858
@Nonnull
4959
public VoiceChannelEffect getEffect()
5060
{

src/main/java/net/dv8tion/jda/api/managers/SoundboardSoundManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public interface SoundboardSoundManager extends Manager<SoundboardSoundManager>
144144
* Sets the <b><u>emoji</u></b> of the selected {@link SoundboardSound}.
145145
*
146146
* @param emoji
147-
* The new emoji for the selected {@link SoundboardSound}
147+
* The new emoji for the selected {@link SoundboardSound}, can be {@code null}
148148
*
149149
* @return SoundboardSoundManager for chaining convenience
150150
*/

src/main/java/net/dv8tion/jda/api/requests/restaction/SoundboardSoundCreateAction.java

+19
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,29 @@ public interface SoundboardSoundCreateAction extends AuditableRestAction<Soundbo
5151
@CheckReturnValue
5252
SoundboardSoundCreateAction addCheck(@Nonnull BooleanSupplier checks);
5353

54+
/**
55+
* Sets the <b><u>volume</u></b> of the soundboard sound being created.
56+
*
57+
* @param volume
58+
* The new volume
59+
*
60+
* @throws IllegalArgumentException
61+
* If the provided volume is not between 0-1
62+
*
63+
* @return This action for chaining convenience
64+
*/
5465
@Nonnull
5566
@CheckReturnValue
5667
SoundboardSoundCreateAction setVolume(double volume);
5768

69+
/**
70+
* Sets the <b><u>emoji</u></b> of the soundboard sound being created.
71+
*
72+
* @param emoji
73+
* The new emoji, can be {@code null}
74+
*
75+
* @return This action for chaining convenience
76+
*/
5877
@Nonnull
5978
@CheckReturnValue
6079
SoundboardSoundCreateAction setEmoji(@Nullable Emoji emoji);

0 commit comments

Comments
 (0)