Class VoiceInputMode
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The type of an input mode specifying how voice transmission is activated. -
Constructor Summary
ConstructorDescriptionVoiceInputMode
(VoiceInputMode.InputModeType type, String shortcut) Constructs a new input mode with a type (VAD or PTT) and a hotkey for PTT. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the shortcut forVoiceInputMode.InputModeType.PUSH_TO_TALK
.getType()
Gets the type of this input mode.int
hashCode()
void
setShortcut
(String shortcut) Sets the shortcut forVoiceInputMode.InputModeType.PUSH_TO_TALK
.void
Sets the type of this input mode.toString()
Creates a simple string representation of this input mode containing: the type (getType()
) the shortcut (getShortcut()
)
-
Constructor Details
-
VoiceInputMode
Constructs a new input mode with a type (VAD or PTT) and a hotkey for PTT.- Parameters:
type
- The type of the input modeshortcut
- The shortcut forVoiceInputMode.InputModeType.PUSH_TO_TALK
-
-
Method Details
-
getType
Gets the type of this input mode.- Returns:
- An
VoiceInputMode.InputModeType
- See Also:
-
setType
Sets the type of this input mode.This does not directly affect the input mode currently set in Discord. You need to set it using
VoiceManager.setInputMode(VoiceInputMode, Consumer)
.- Parameters:
type
- The newVoiceInputMode.InputModeType
- See Also:
-
getShortcut
Gets the shortcut forVoiceInputMode.InputModeType.PUSH_TO_TALK
.Key combinations can be expressed by concatenating two or more key names with a
'+'
, e.g."shift + p"
or"ctrl + 5"
.- Returns:
- A shortcut string in the format further described in the documentation, max. 255 bytes
- See Also:
-
setShortcut
Sets the shortcut forVoiceInputMode.InputModeType.PUSH_TO_TALK
.Key combinations can be expressed by concatenating two or more key names with a
'+'
, e.g."shift + p"
or"ctrl + 5"
.This does not directly affect the input mode currently set in Discord. You need to set it using
VoiceManager.setInputMode(VoiceInputMode, Consumer)
.- Parameters:
shortcut
- A new shortcut string in the format further described in the documentation, max. 255 bytes- See Also:
-
toString
Creates a simple string representation of this input mode containing:- the type (
getType()
) - the shortcut (
getShortcut()
)
It is not recommended to use this method for serialization. It is only intended for debugging.
The methods uses the plain fields rather than the named getter methods. Overriding those will hence not change to return value of this method.
- the type (
-
equals
-
hashCode
public int hashCode()
-