Add support for querying information about group calls.

This commit is contained in:
Rapptz
2016-07-15 22:46:00 -04:00
parent 33eba31aac
commit 1c8ab25917
6 changed files with 207 additions and 31 deletions

View File

@ -2651,6 +2651,22 @@ class Client:
"""
return self.connection._get_voice_client(server.id)
def group_call_in(self, channel):
"""Returns the :class:`GroupCall` associated with a private channel.
If no group call is found then ``None`` is returned.
Parameters
-----------
channel: :class:`PrivateChannel`
The group private channel to query the group call for.
Returns
--------
Optional[:class:`GroupCall`]
The group call.
"""
return self.connection._calls.get(channel.id)
# Miscellaneous stuff