Package net.dv8tion.jda.api.events.self
Class SelfUpdateMFAEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.self.GenericSelfUpdateEvent<java.lang.Boolean>
-
- net.dv8tion.jda.api.events.self.SelfUpdateMFAEvent
-
- All Implemented Interfaces:
GenericEvent,UpdateEvent<SelfUser,java.lang.Boolean>
public class SelfUpdateMFAEvent extends GenericSelfUpdateEvent<java.lang.Boolean>
Indicates that the mfa level of the current user changed.
This is relevant for elevated permissions (guild moderating/managing).Can be used to retrieve the old mfa level.
Identifier:
mfa_enabled
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringIDENTIFIER
-
Constructor Summary
Constructors Constructor Description SelfUpdateMFAEvent(JDA api, long responseNumber, boolean wasMfaEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleangetNewValue()The new valuejava.lang.BooleangetOldValue()The old valuebooleanwasMfaEnabled()Whether MFA was previously enabled or not-
Methods inherited from class net.dv8tion.jda.api.events.self.GenericSelfUpdateEvent
getEntity, getPropertyIdentifier, getSelfUser, toString
-
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 java.lang.String IDENTIFIER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SelfUpdateMFAEvent
public SelfUpdateMFAEvent(@Nonnull JDA api, long responseNumber, boolean wasMfaEnabled)
-
-
Method Detail
-
wasMfaEnabled
public boolean wasMfaEnabled()
Whether MFA was previously enabled or not- Returns:
- True, if the account had MFA enabled prior to this event
-
getOldValue
@Nonnull public java.lang.Boolean getOldValue()
Description copied from interface:UpdateEventThe old value- Specified by:
getOldValuein interfaceUpdateEvent<SelfUser,java.lang.Boolean>- Overrides:
getOldValuein classGenericSelfUpdateEvent<java.lang.Boolean>- Returns:
- The old value
-
getNewValue
@Nonnull public java.lang.Boolean getNewValue()
Description copied from interface:UpdateEventThe new value- Specified by:
getNewValuein interfaceUpdateEvent<SelfUser,java.lang.Boolean>- Overrides:
getNewValuein classGenericSelfUpdateEvent<java.lang.Boolean>- Returns:
- The new value
-
-