Class GuildUpdateRegionEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.guild.GenericGuildEvent
-
- net.dv8tion.jda.api.events.guild.update.GenericGuildUpdateEvent<Region>
-
- net.dv8tion.jda.api.events.guild.update.GuildUpdateRegionEvent
-
- All Implemented Interfaces:
GenericEvent,UpdateEvent<Guild,Region>
public class GuildUpdateRegionEvent extends GenericGuildUpdateEvent<Region>
-
-
Field Summary
Fields Modifier and Type Field Description static StringIDENTIFIER
-
Constructor Summary
Constructors Constructor Description GuildUpdateRegionEvent(JDA api, long responseNumber, Guild guild, String oldRegion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RegiongetNewRegion()StringgetNewRegionRaw()The raw voice region name that was updated to in theGuild.RegiongetNewValue()The new valueRegiongetOldRegion()StringgetOldRegionRaw()The raw voice region name that was used prior to this update by theGuild.RegiongetOldValue()The old value-
Methods inherited from class net.dv8tion.jda.api.events.guild.update.GenericGuildUpdateEvent
getEntity, getPropertyIdentifier, toString
-
Methods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuild
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.dv8tion.jda.api.events.GenericEvent
getJDA, getResponseNumber
-
Methods inherited from interface net.dv8tion.jda.api.events.UpdateEvent
getEntityType
-
-
-
-
Field Detail
-
IDENTIFIER
public static final String IDENTIFIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOldRegion
@Nonnull public Region getOldRegion()
The oldRegionof theGuild.
If this region cannot be resolved to an enum constant this will returnUNKNOWN!You can use
getOldRegionRaw()to get the raw name that discord provides for this region!- Returns:
- Resolved
Regionconstant from the raw name
-
getOldRegionRaw
@Nonnull public String getOldRegionRaw()
The raw voice region name that was used prior to this update by theGuild.
This can be resolved usinggetOldRegion()to a constant of the enum. If that returnsUNKNOWNthis region is not currently registered in JDA.- Returns:
- Raw name of the old voice region
-
getNewRegion
@Nonnull public Region getNewRegion()
The newRegionof theGuild.
If this region cannot be resolved to an enum constant this will returnUNKNOWN!You can use
getNewRegionRaw()to get the raw name that discord provides for this region!- Returns:
- Resolved
Regionconstant from the raw name
-
getNewRegionRaw
@Nonnull public String getNewRegionRaw()
The raw voice region name that was updated to in theGuild.
This can be resolved usinggetNewRegion()to a constant of the enum. If that returnsUNKNOWNthis region is not currently registered in JDA.- Returns:
- Raw name of the updated voice region
-
getOldValue
@Nonnull public Region getOldValue()
Description copied from interface:UpdateEventThe old value- Specified by:
getOldValuein interfaceUpdateEvent<Guild,Region>- Overrides:
getOldValuein classGenericGuildUpdateEvent<Region>- Returns:
- The old value
-
getNewValue
@Nonnull public Region getNewValue()
Description copied from interface:UpdateEventThe new value- Specified by:
getNewValuein interfaceUpdateEvent<Guild,Region>- Overrides:
getNewValuein classGenericGuildUpdateEvent<Region>- Returns:
- The new value
-
-