Skip to content

Commit

Permalink
Update wavelink/player.py
Browse files Browse the repository at this point in the history
Co-authored-by: James <[email protected]>
  • Loading branch information
2 people authored and EvieePy committed Jul 30, 2020
1 parent 0f6712d commit 55096e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wavelink/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ async def hook(self, event) -> None:

def _get_shard_socket(self, shard_id: int) -> Optional[DiscordWebSocket]:
if isinstance(self.bot, commands.AutoShardedBot):
if hasattr(self.bot.shards[shard_id],"ws"):
try:
return self.bot.shards[shard_id].ws
else:
except AttributeError:
return self.bot.shards[shard_id]._parent.ws

if self.bot.shard_id is None or self.bot.shard_id == shard_id:
Expand Down

0 comments on commit 55096e7

Please sign in to comment.