UpdateEvent<VoiceChannel,java.lang.Integer>
public class VoiceChannelUpdateBitrateEvent extends GenericVoiceChannelUpdateEvent<java.lang.Integer>
VoiceChannel
's bitrate changed.
Can be sued to get affected VoiceChannel, affected Guild and previous bitrate.
Identifier: bitrate
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
IDENTIFIER |
Constructor | Description |
---|---|
VoiceChannelUpdateBitrateEvent(JDA api,
long responseNumber,
VoiceChannel channel,
int oldBitrate) |
Modifier and Type | Method | Description |
---|---|---|
int |
getNewBitrate() |
The new bitrate
|
java.lang.Integer |
getNewValue() |
The new value
|
int |
getOldBitrate() |
The old bitrate
|
java.lang.Integer |
getOldValue() |
The old value
|
java.lang.String |
getPropertyIdentifier() |
The field name for the updated property
|
getJDA, getResponseNumber
getChannel, getGuild
getEntity, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEntityType
public static final java.lang.String IDENTIFIER
public VoiceChannelUpdateBitrateEvent(JDA api, long responseNumber, VoiceChannel channel, int oldBitrate)
public int getOldBitrate()
public int getNewBitrate()
public java.lang.String getPropertyIdentifier()
UpdateEvent
@Override
public void onGenericRoleUpdate(GenericRoleUpdateEvent event)
{
switch (event.getPropertyIdentifier())
{
case RoleUpdateColorEvent.IDENTIFIER:
System.out.printf("Updated color for role: %s%n", event);
break;
case RoleUpdatePositionEvent.IDENTIFIER:
RoleUpdatePositionEvent update = (RoleUpdatePositionEvent) event;
System.out.printf("Updated position for role: %s raw(%s->%s)%n", event, update.getOldPositionRaw(), update.getNewPositionRaw());
break;
default: return;
}
}
public java.lang.Integer getOldValue()
UpdateEvent
public java.lang.Integer getNewValue()
UpdateEvent