public class ChannelManagerUpdatable
extends java.lang.Object
Constructor and Description |
---|
ChannelManagerUpdatable(Channel channel) |
Modifier and Type | Method and Description |
---|---|
Channel |
getChannel()
Returns the
Channel object of this Manager. |
Guild |
getGuild() |
JDA |
getJDA() |
protected boolean |
needToUpdate() |
void |
reset()
Resets all queued updates.
|
ChannelManagerUpdatable |
setBitrate(int bitrate)
Used to set the bitrate that Discord clients will use when sending and receiving audio.
|
ChannelManagerUpdatable |
setName(java.lang.String name)
Sets the name of this Channel.
|
ChannelManagerUpdatable |
setTopic(java.lang.String topic)
Sets the topic of this Channel.
|
ChannelManagerUpdatable |
setUserLimit(int userLimit)
Used to set the maximum amount of users that can be connected to a
VoiceChannel at the same time. |
RestAction<java.lang.Void> |
update()
This method will apply all accumulated changes received by setters
|
protected final Channel channel
public ChannelManagerUpdatable(Channel channel)
public JDA getJDA()
public Channel getChannel()
Channel
object of this Manager. Useful if this Manager was returned via a create functionpublic Guild getGuild()
public ChannelManagerUpdatable setName(java.lang.String name)
update()
is called.
So multiple changes can be made at once.name
- The new name of the Channel, or null to keep current onepublic ChannelManagerUpdatable setTopic(java.lang.String topic)
VoiceChannels
and will result in a UnsupportedOperationException
.
This change will only be applied, if update()
is called.
So multiple changes can be made at once.
topic
- The new topic of the Channel, or null to keep current onejava.lang.UnsupportedOperationException
- thrown when attempting to set the topic for a VoiceChannel
public ChannelManagerUpdatable setUserLimit(int userLimit)
VoiceChannel
at the same time.
The accepted range is 0-99, with 0 representing no limit. -1 can be provided to reset the value.
The default is: 0
userLimit
- The maximum amount of Users that can be connected to a voice channel at a time.java.lang.UnsupportedOperationException
- thrown when attempting to set the userLimit for a TextChannel
java.lang.IllegalArgumentException
- thrown if the provided userLimit it outside the range of 0 to 99, not including the reset value: -1public ChannelManagerUpdatable setBitrate(int bitrate)
The accepted range is 8000-96000. -1 can be provided to reset the value.
The default value is: 64000
bitrate
- The bitrate which Discord clients will conform to when dealing with the audio from this channel.java.lang.UnsupportedOperationException
- thrown when attempting to set the bitrate for a TextChannel
java.lang.IllegalArgumentException
- thrown if the provided bitrate it outside the range of 8000 to 96000, not including the reset value: -1public void reset()
update()
will change nothing.public RestAction<java.lang.Void> update()
protected boolean needToUpdate()