fix when no controller
This commit is contained in:
parent
f98ed172c1
commit
4cfa321a53
1 changed files with 8 additions and 7 deletions
|
@ -163,7 +163,7 @@ class Player(wavelink.Player):
|
|||
embed.add_field(name="Volume", value=f"**`{self.volume}%`**")
|
||||
embed.add_field(name="Demandé par", value=track.requester.mention)
|
||||
embed.add_field(name="DJ", value=self.dj.mention)
|
||||
embed.add_field(name="Lien de la vidéo", value=f"[Clique ici]({track.uri})")
|
||||
embed.add_field(name="Lien vidéo", value=f"[Clique ici]({track.uri})")
|
||||
|
||||
return embed
|
||||
|
||||
|
@ -180,6 +180,7 @@ class Player(wavelink.Player):
|
|||
|
||||
async def teardown(self):
|
||||
"""Clear internal states, remove player controller and disconnect."""
|
||||
if self.controller:
|
||||
try:
|
||||
await self.controller.message.delete()
|
||||
except discord.HTTPException:
|
||||
|
@ -481,7 +482,7 @@ class Music(commands.Cog, wavelink.WavelinkMixin):
|
|||
if channel is None:
|
||||
raise NoChannelProvided
|
||||
|
||||
await player.connect(channel.id)
|
||||
await player.connect(channel.id, self_deaf = True)
|
||||
await ctx.send(f":thumbsup: **Connecté à __{channel.name}__**")
|
||||
if fromSlash != True:
|
||||
return await addReaction(ctx.message, 1)
|
||||
|
|
Reference in a new issue