mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-15 02:09:49 +00:00
Add Guild.voice_client shortcut.
This commit is contained in:
parent
3b1b26ffb1
commit
65bd510df6
@ -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
|
||||
@ -282,6 +281,11 @@ class Guild(Hashable):
|
||||
self_id = self._state.user.id
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user