aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-05-09 13:42:35 -0400
committerRapptz <[email protected]>2017-05-09 13:42:35 -0400
commita0fc1402d759c1982423bea704393c3e7b1c08a7 (patch)
tree39584f438391b1cbcd698d13eec3ea56c303047b
parentProperly check for audit log entry termination. (diff)
downloaddiscord.py-a0fc1402d759c1982423bea704393c3e7b1c08a7.tar.xz
discord.py-a0fc1402d759c1982423bea704393c3e7b1c08a7.zip
Rename GuildRegion to VoiceRegion.
This naming makes more sense since voice regions are not a guild exclusive concept.
-rw-r--r--discord/calls.py6
-rw-r--r--discord/enums.py4
-rw-r--r--discord/guild.py8
-rw-r--r--docs/api.rst4
4 files changed, 11 insertions, 11 deletions
diff --git a/discord/calls.py b/discord/calls.py
index c8670b3b..f6253d00 100644
--- a/discord/calls.py
+++ b/discord/calls.py
@@ -27,7 +27,7 @@ DEALINGS IN THE SOFTWARE.
import datetime
from . import utils
-from .enums import GuildRegion, try_enum
+from .enums import VoiceRegion, try_enum
from .member import VoiceState
class CallMessage:
@@ -91,7 +91,7 @@ class GroupCall:
Denotes if this group call is unavailable.
ringing: List[:class:`User`]
A list of users that are currently being rung to join the call.
- region: :class:`GuildRegion`
+ region: :class:`VoiceRegion`
The guild region the group call is being hosted on.
"""
@@ -106,7 +106,7 @@ class GroupCall:
self._update(**kwargs)
def _update(self, **kwargs):
- self.region = try_enum(GuildRegion, kwargs.get('region'))
+ self.region = try_enum(VoiceRegion, kwargs.get('region'))
lookup = {u.id: u for u in self.call.channel.recipients}
me = self.call.channel.me
lookup[me.id] = me
diff --git a/discord/enums.py b/discord/enums.py
index 962de1dc..1fcdea82 100644
--- a/discord/enums.py
+++ b/discord/enums.py
@@ -26,7 +26,7 @@ DEALINGS IN THE SOFTWARE.
from enum import Enum
-__all__ = ['ChannelType', 'MessageType', 'GuildRegion', 'VerificationLevel',
+__all__ = ['ChannelType', 'MessageType', 'VoiceRegion', 'VerificationLevel',
'ContentFilter', 'Status', 'DefaultAvatar', 'RelationshipType',
'AuditLogAction', 'AuditLogActionCategory', ]
@@ -49,7 +49,7 @@ class MessageType(Enum):
pins_add = 6
new_member = 7
-class GuildRegion(Enum):
+class VoiceRegion(Enum):
us_west = 'us-west'
us_east = 'us-east'
us_south = 'us-south'
diff --git a/discord/guild.py b/discord/guild.py
index 55e8fd53..a355f46d 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -37,7 +37,7 @@ from .permissions import PermissionOverwrite
from .colour import Colour
from .errors import InvalidArgument, ClientException
from .channel import *
-from .enums import GuildRegion, Status, ChannelType, try_enum, VerificationLevel, ContentFilter
+from .enums import VoiceRegion, Status, ChannelType, try_enum, VerificationLevel, ContentFilter
from .mixins import Hashable
from .user import User
from .invite import Invite
@@ -72,7 +72,7 @@ class Guild(Hashable):
A list of :class:`Role` that the guild has available.
emojis
A tuple of :class:`Emoji` that the guild owns.
- region: :class:`GuildRegion`
+ region: :class:`VoiceRegion`
The region the guild belongs on. There is a chance that the region
will be a ``str`` if the value is not recognised by the enumerator.
afk_timeout: int
@@ -195,7 +195,7 @@ class Guild(Hashable):
self._member_count = member_count
self.name = guild.get('name')
- self.region = try_enum(GuildRegion, guild.get('region'))
+ self.region = try_enum(VoiceRegion, guild.get('region'))
self.verification_level = try_enum(VerificationLevel, guild.get('verification_level'))
self.explicit_content_filter = try_enum(ContentFilter, guild.get('explicit_content_filter', 0))
self.afk_timeout = guild.get('afk_timeout')
@@ -581,7 +581,7 @@ class Guild(Hashable):
Only PNG/JPEG supported. Could be ``None`` to denote removing the
splash. Only available for partnered guilds with ``INVITE_SPLASH``
feature.
- region: :class:`GuildRegion`
+ region: :class:`VoiceRegion`
The new region for the guild's voice communication.
afk_channel: :class:`VoiceChannel`
The new channel that is the AFK channel. Could be ``None`` for no AFK channel.
diff --git a/docs/api.rst b/docs/api.rst
index dfcfe461..16ad04ef 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -579,9 +579,9 @@ All enumerations are subclasses of `enum`_.
The system message denoting that a pinned message has been added to a channel.
-.. class:: GuildRegion
+.. class:: VoiceRegion
- Specifies the region a :class:`Guild`'s voice server belongs to.
+ Specifies the region a voice server belongs to.
.. attribute:: us_west