VoiceRegion
Represents Discord's voice regions.
Attributes
bool
Whether the voice region is custom (used for events, etc.).
bool
Whether the voice region is deprecated.
str
The name of the voice region.
str
The unique identifier of the voice region.
bool
Whether the voice region can be used only by guilds with VIP_REGIONS
feature.
Class Attributes
str
= 'Undefined'
The default name of the voice regions.
Stores the created VoiceRegion
-s.
type
= str
The voice regions' values' type.
Each predefined voice region is also stored as a class attribute:
Class attribute name | value | name | deprecated | vip | custom |
---|---|---|---|---|---|
_deprecated | deprecated | deprecated | True | False | False |
unknown | '' | 'unknown' | False | False | False |
brazil | brazil | Brazil | False | False | False |
dubai | dubai | Dubai | False | False | False |
eu_central | eu-central | Central Europe | False | False | False |
eu_west | eu-west | Western Europe | False | False | False |
europe | europe | Europe | False | False | False |
hongkong | hongkong | Hong Kong | False | False | False |
india | india | India | False | False | False |
japan | japan | Japan | False | False | False |
russia | russia | Russia | False | False | False |
singapore | singapore | Singapore | False | False | False |
africa_south | southafrica | South Africa | False | False | False |
sydney | sydney | Sydney | False | False | False |
us_central | us-central | US Central | False | False | False |
us_east | us-east | US East | False | False | False |
us_south | us-south | US South | False | False | False |
us_west | us-west | US West | False | False | False |
amsterdam | amsterdam | Amsterdam | True | False | False |
frankfurt | frankfurt | Frankfurt | True | False | False |
london | london | London | True | False | False |
vip_us_east | vip-us-east | VIP US West | False | True | False |
vip_us_west | vip-us-west | VIP US East | False | True | False |
vip_amsterdam | vip-amsterdam | VIP Amsterdam | True | True | False |
Methods
(value, name, deprecated, name, vip)
__init__Creates a new voice region with the given parameters and stores it at the class's .INSTANCES
.
Parameter | Type | Description |
---|---|---|
value |
| The unique identifier of the voice region. |
name |
| The voice region's name. |
deprecated |
| Whether the voice region is deprecated. |
name |
| The default name of the voice region. |
vip |
| Whether the voice region can be used only by guilds with |
(data)
from_dataCreates a voice region from the given data and stores it at the class's .INSTANCES
.
If the voice region already exists returns that instead.
Parameter | Type | Description |
---|---|---|
data |
| Received voice region data. |
Returns
self : VoiceRegion
(value)
getReturns the value's representation. If the value is already preinstanced, returns that, else creates a new object.
Parameter | Type | Description |
---|---|---|
value |
| The value to get it's representation. |
Returns
obj_ : PreinstancedBase
(value)
_from_valueCreates a voice region from the given id and stores it at class's .INSTANCES
.
Called by .get
when no voice region was found with the given id.
Parameter | Type | Description |
---|---|---|
value |
| The identifier of the voice region. |
Returns
self : VoiceRegion
()
__eq__Returns whether self's value equals to the other object's.
()
__ge__Returns whether self's value is greater or equal to the other object's.
()
__getattr__Drops a rich attribute error.
()
__gt__Returns whether self's value is greater than the other object's.
()
__hash__Returns the hash of the preinstanced object.
()
__le__Returns whether self's value is less or equal to the other object's.
()
__lt__Returns whether self's value is less than the other object's.
()
__ne__Returns whether self's not equals to the other object's.
()
__repr__Returns the representation of the preinstanced object.