mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
[Audio] ctx.message.guild -> ctx.guild + store ids rather than whole guild in skip_votes (#4867)
* ctx.invoke -> bot.invoke ctx.message.guild -> ctx.guild * remove the invoke stuff * remove invoke stuff * use id attrib instead of entire guild * change type hinting too * change second typehint
This commit is contained in:
@@ -199,9 +199,9 @@ class PlayerUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
|
||||
def update_player_lock(self, ctx: commands.Context, true_or_false: bool) -> None:
|
||||
if true_or_false:
|
||||
self.play_lock[ctx.message.guild.id] = True
|
||||
self.play_lock[ctx.guild.id] = True
|
||||
else:
|
||||
self.play_lock[ctx.message.guild.id] = False
|
||||
self.play_lock[ctx.guild.id] = False
|
||||
|
||||
def _player_check(self, ctx: commands.Context) -> bool:
|
||||
if self.lavalink_connection_aborted:
|
||||
@@ -252,7 +252,7 @@ class PlayerUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
).format(prefix=ctx.prefix),
|
||||
)
|
||||
try:
|
||||
if self.play_lock[ctx.message.guild.id]:
|
||||
if self.play_lock[ctx.guild.id]:
|
||||
return await self.send_embed_msg(
|
||||
ctx,
|
||||
title=_("Unable To Get Tracks"),
|
||||
@@ -361,7 +361,7 @@ class PlayerUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
) -> Union[discord.Message, List[lavalink.Track], lavalink.Track]:
|
||||
player = lavalink.get_player(ctx.guild.id)
|
||||
try:
|
||||
if self.play_lock[ctx.message.guild.id]:
|
||||
if self.play_lock[ctx.guild.id]:
|
||||
return await self.send_embed_msg(
|
||||
ctx,
|
||||
title=_("Unable To Get Tracks"),
|
||||
|
||||
@@ -564,7 +564,7 @@ class PlaylistUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
|
||||
if query.is_spotify:
|
||||
try:
|
||||
if self.play_lock[ctx.message.guild.id]:
|
||||
if self.play_lock[ctx.guild.id]:
|
||||
return await self.send_embed_msg(
|
||||
ctx,
|
||||
title=_("Unable To Get Tracks"),
|
||||
|
||||
Reference in New Issue
Block a user