Add support for voice channel parties #33

Closed
wasi-master wants to merge 277 commits from master into 2.0
44 changed files with 7238 additions and 143 deletions
Showing only changes of commit 2b66f2288c - Show all commits

View File

@ -249,7 +249,6 @@ class Client:
self._connection = self._get_state(**options)
self._connection.shard_count = self.shard_count
self._connection.shortcuts = {}
self._closed = False
self._ready = asyncio.Event()
self._connection._get_websocket = self._get_websocket
@ -259,24 +258,6 @@ class Client:
VoiceClient.warn_nacl = False
log.warning("PyNaCl is not installed, voice will NOT be supported")
def add_guild_shortcut(self, name, config_dict):
"""Add a shortcut attribute to context.guild
.. versionadded:: 1.7.3.8
Parameters
-----------
name: :class:`str`
The name of the shortcut you want to add to context.guild
config_dict: :class:`dict`
The dict of {guild.id: other_data} where context.guild.<shortcut> will get the data from
"""
if not isinstance(name, str):
raise ValueError("Name must be a string")
if not isinstance(config_dict, dict):
raise ValueError("config_dict must be a dict")
self._connection.shortcuts[name] = config_dict
# internals
def get_message(self, id):

View File

@ -189,13 +189,6 @@ class Guild(Hashable):
self._voice_states = {}
self._state = state
self._from_data(data)
if state.shortcuts:
for name, config in state.shortcuts.items():
if name in self.__slots__:
continue
else:
self.__slots__ += (name,)
setattr(self, name, config.get(self.id))
def _add_channel(self, channel):
self._channels[channel.id] = channel