aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-04-18 04:07:05 -0400
committerRapptz <[email protected]>2017-04-18 04:07:05 -0400
commit65bd510df615ce112d80913ff9b03508858f0ea3 (patch)
tree9d8de45f018a7aa6945f55f8c3c058648ee5b6ce
parentRe-implement voice sending. (diff)
downloaddiscord.py-65bd510df615ce112d80913ff9b03508858f0ea3.tar.xz
discord.py-65bd510df615ce112d80913ff9b03508858f0ea3.zip
Add Guild.voice_client shortcut.
-rw-r--r--discord/guild.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/discord/guild.py b/discord/guild.py
index 0c218c26..209d057b 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -32,7 +32,6 @@ from collections import namedtuple
from . import utils
from .role import Role
from .member import Member, VoiceState
-from .emoji import Emoji
from .game import Game
from .permissions import PermissionOverwrite
from .colour import Colour
@@ -283,6 +282,11 @@ class Guild(Hashable):
return self.get_member(self_id)
@property
+ def voice_client(self):
+ """Returns the :class:`VoiceClient` associated with this guild, if any."""
+ return self._state._get_voice_client(self.id)
+
+ @property
def text_channels(self):
"""List[:class:`TextChannel`]: A list of text channels that belongs to this guild.